Error loading tiff images as a 3D model

I am trying to load 15 tiff images which are basically images taken at different z slices and create a 3D model out of it. When I try doing this using the Image Stack option under Slicer Morph, the load button remains de-activated. Could anyone advise on what I might be doing wrong? Alternatively, when I try to load it using the ‘Add Data’ option, even though I de-select ‘Single output/ file’ and select ‘Volume’ option, I keep getting error messages of the kind shown below.

Any idea why this might be happening?

1 Like
  1. Upgrade to the latest stable (5.10), you are using and unmaintained version of Slicer.
  2. Copy the files somewhere that’s not on Onedrive. Cloud synced folders can sometimes cause weird issues.

If these don’t help, you need to share the dataset.

Hi @muratmaga thanks for the quick response.

I have upgraded to the 5.10 version, and also tried loading the images from a non One-Drive location. However, I still get the same error message, and still can’t get the Load option to work. I would be grateful if you could advice as to what might be going wrong here. What might be the best way to share these images here for troubleshooting?

1 Like

you can upload somewhere like google drive, onedrive, etc. and share the link.

Bone 1

Hopefully, this is accessible.

I am not seeing a link

Hi @muratmaga the folder Bone 1 contains the images. I have also included a separate link here if that helps: Bone 1

You have a space in your filenames. That’s not acceptable. Get rid off the space and it should work fine.

Traceback (most recent call last):
  File "/Applications/Slicer.app/Contents/Extensions-34045/SlicerMorph/lib/Slicer-5.10/qt-scripted-modules/ImageStacks.py", line 412, in populateFromArchetype
    self.setFilePaths(filePaths)
  File "/Applications/Slicer.app/Contents/Extensions-34045/SlicerMorph/lib/Slicer-5.10/qt-scripted-modules/ImageStacks.py", line 358, in setFilePaths
    self.logic.filePaths = filePaths
    ^^^^^^^^^^^^^^^^^^^^
  File "/Applications/Slicer.app/Contents/Extensions-34045/SlicerMorph/lib/Slicer-5.10/qt-scripted-modules/ImageStacks.py", line 694, in filePaths
    image = reader.Execute()
            ^^^^^^^^^^^^^^^^
  File "/Applications/Slicer.app/Contents/lib/Python/lib/python3.12/site-packages/SimpleITK/SimpleITK.py", line 6215, in Execute
    return _SimpleITK.ImageFileReader_Execute(self)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Exception thrown in SimpleITK ImageFileReader_Execute: /Users/svc-dashboard/D/S/A/ITK/Modules/IO/TIFF/src/itkTIFFImageIO.cxx:1414:
ITK ERROR: TIFFImageIO(0x7fe427b77b50): Problem reading the row: 120

Hi @muratmaga I have got rid of the spaces in the image name itself. However, I keep getting the same error. I might of course have just done the wrong thing. Does this look right? I just can’t get the Load button to activate.

I believe he meant in the directory path too, so “Bone1” not “Bone 1”.

ITK ERROR: TIFFImageIO(0x7fe427b77b50): Problem reading the row: 120

ITK’s TIFFImageIO can’t read these images. I’m not sure why, they’re multi-page, BTW.

This (extract 1st page) might help (I haven’t tested it in Slicer, but ITK’s TIFFImageIO can open output_Bone* images).

Edit:

convert belongs to ImageMagick

Edit:

the second page seems to be the same image, but 160 × 120 pixels, perhaps it is not important.

@issakomi thanks for looking into this. Apologies- but could you explain in a little more detail how I might rectify this? @pieper I tried it by changing the directory name as well- the issue persists.

1 Like

@Varsha I opened the image using Fiji. To me images look like series of a focus stack from a microscope. This is not a modality you can do much with 3D Slicer. We expect true, continuous 3D data. It is also clear as @issakomi pointed out that the TIFF format they are in is not compatible with the TIFF readers Slicer support.

What are you hoping to do with this in Slicer? Even if you get it, you cannot construct a 3D volume from these.

1 Like

I have simply extracted 1st page from multi-page tiff, in particular case there are 2 pages per image. I don’t know is it focus stack or whatever else. 1st is 2880 × 2160 pixels image, the 2nd page seems to be the same image, but 160 × 120 pixels. ITK’s TIFFImageIO can read extracted image. I have done with ImageMagick on Linux, s. screenshot.

Hi @muratmaga I was ideally hoping to stack these images to create a 3D model, and then attempt Geometric Morphometric analysis. Would it be possible to reconstruct this into a 3D model using alternate softwares and then input these into 3D Slicer for GM analysis?

This is not something I am particularly knowledgeable, but when I searched for it, I saw specific microscopy based photogrammetry tools in which you should be able to do what you want (e.g,. see this video https://www.youtube.com/watch?v=wznsRLOpSiw)

The real issue you have only one view, everything I saw (and typically requirement of photogrammetry) is you have multiple angles so that the software can triangulate the 3D model. If you repeat that with many angles (possibly using a motor controlled microscopy stage), and the generate focused images for every angle (i.e., acquire a your focus stack for each angle and generate the focused image), then you might even be able to do it with SlicerMorph’s Photogrammetry extension ( GitHub - SlicerMorph/SlicerPhotogrammetry · GitHub ).

If search for “3D models from focus stacks” on internet, there are a lot of resources.

But, yes, if you generate 3D models elsewhere you can do the GM in SlicerMorph.

Hi @muratmaga Thank you! This is really helpful.