Image viewer error classic segmentation jupyter notebook

Hi All,

New error experienced when running the look up table demo via jupyter notebook (through anaconda).

During the loading the data step I get the following error:

Failed to parse XML for the provided file. Error: not well-formed (invalid token): line 1, column 6

The next error I get when running the Preview of the Image is:
np.int is a deprecated alias for the builtin int. To silence this warning, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
Deprecated in NumPy 1.20; for more details and guidance: NumPy 1.20.0 Release Notes — NumPy v1.24.dev0 Manual

Has anyone come across this? I am attempting to open single channel z-stack .tif files.

Cheers,
Aidan

Has anyone fixed this problem? I’m having the same issue.

Hello,

For the first error (“Failed to parse XML for the provided file. Error: not well-formed (invalid token): line 1, column 6”), that usually means there is an error with how AICSImage is reading the file but it should still be loaded successfully. After you’ve read the image, try running “print(IMG.shape)” to print out the dimensions of your image. If that works, you know that the image has been read and loaded successfully.

For the second error when trying to run the preview of the image, numpy deprecated the command “np.int” and replaced with “int”. To fix this, simply replace “np.int” with “int” and it should run without issue.

I hope that helps! Please feel free to reach out if you have any other questions.

Best,
Sandi

Hi Sandi!

Thanks for your suggestions. However, I’m still not being able to see the output image. The specific issue I’m having is with the following line of code in the playground_filament3d_Original jupyter notebook available in the aics-segmentation github (aics-segmentation/lookup_table_demo at master · AllenInstitute/aics-segmentation · GitHub).

After running the following code, I get nothing. Not even an error.

## PARAMETER ##
structure_channel = 0
#####################

struct_img0 = IMG[0,structure_channel,:,:,:].copy()

print(struct_img0.shape)

view(single_fluorescent_view(struct_img0))

The output of “print(struct_img0.shape)” is (60, 441, 555). I’m not sure what this is telling me about the image.

Thank you for your help!

Hi Monica,

That print statement is telling you the dimensions of your image. After running that code block, that print statement is saying your image is a single channel with 60 z-slices with 441 pixels by 555 pixels (60,441,555).

Now for the issue with not seeing the output image: it looks like there’s an issue with our built-in image viewer. It is that last line of code that’s supposed to output a widget where you can view your image. Looks like the current image viewer is outdated, and we are working on getting it functional with the newer versions of Python.

However, the rest of the code should still be able to run; you just won’t be able to view the image until you reach the last step and save out the image where you can then open the segmented image in ImageJ.

Thank you for bringing this to our attention and apologies for the inconvenience. Hopefully we should have an updated version up and running soon!

Best,
Sandi