mlavik1/UnityVolumeRendering

Load image sequence - format not supported

Opened this issue · 7 comments

Hello, it seems like tif format image slices are supported based on #30. I have 15 image slices in .tif format and would like to load it in Unity, but it shows "Found no image files of supported formats." Any help would be appreciated :)

image

Hi! So there are two image sequence importers

  • The default one: Works on all platforms - TIFF not supported
  • SimpleITK: Works on Windows, Linux, Mac - TIFF support

From your screenshot it looks like you're not using SimpleITK. Could you enable it and try again maybe?
Documentation on how to enable SimpleITK: https://github.com/mlavik1/UnityVolumeRendering/blob/master/Documentation/SimpleITK/SimpleITK.md

Thank you for your quick reply. I checked the option to enable simpleTK and also switched the platform to PC, Mac, and Linux standalone in Unity, but it's still showing me the same error. Here are some more infor:
Unity version: 2019.4.23
TIFF data: EmbryoCE.zip from https://scif.io/images/
image
image

Nice catch @yangx789 !
Apparently SimpleITK's importer was never used for image sequences (and it couldnt, without some modifications..).
I've fixed that in this PR: https://scif.io/images/

However, I noticed: This seems to be a 4D dataset. Is it a time series?
We currently don't support that, but we could probably load the first time frame at least.. I did an attempt at that in that PR. Feel free to try out my branch: simpleitk-imgseq

This is how it looks (data values are inverted, so I had to invert the TF:
image
Do you have any images of it rendered in another application, that I could use as a reference?

Thank you @mlavik1 The new branch works for me. Yep, it seems like that is a time-series dataset. There's another brain MRI dataset at this site: https://people.math.sc.edu/Burkardt/data/tif/tif.html They have 26 png brain slices that are available to download, and I've attached the zipped files here.
mri_brain.zip

image

I get another question regarding image sequence importer. I was wondering how does the X, Y, Z spacing dimension was calculated :)

@yangx789 great to hear it worked!
I'll merge my PR once I've fixed one of the hacks I had to do there..
And thanks for the dataset! I'll have a look at that too.
Are you interesting in rendering time series btw? I've been thinking about adding support for that, so I'm interested in hearing about possible use cases.

And regarding your question: SimpleITK takes care of that. I read the size and spacing, if available. Not all image sequence formats have that info though, and will probably be uniformly spaced... Do you know if TIFF has any such info?
See releavant code here:

Update: I removed the hack, and added a new "import image file" option in the "Volume rendering" -> "Load dataset" menu. Now you can use that to load a single .tiff file.
The previous hack I did always loaded the first one - so now you can choose which one to import.

I'll merge this after some more testing. Then I'll see if I can find some time to implement support for time series :)