Replies: 3 comments 6 replies
-
These all are very good questions, @Zrrr1997. Yes, MONAI Label now supports multimodality/multichannel. As a demo, we've used the BRATS dataset, which has 4 modalities stacked in a single Nifti file.
Assuming all image channels/modalities are registered, you should stack them into a single nifti file.
Great question! If using MONAI Label, you should use a single file containing all the modalities. For BRATS I've used a single Nifti file with all 4 modalities stacked together. The issue is that 3D Slicer can visualize 4D volumes, but loading of 4D Nifti files is currently not supported. You can check the recent discussion about this here: #22 and an ugly/temporary "solution" here: #729 (comment) I hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Let's separate the discussion of 4D image support and 4D Nifti support in Slicer. Slicer supports 4D images. Loading of 4D images from DICOM and NRRD (and from MetaImage with SlicerIGT extension) works well. 4D data can be edited, replayed (in slice views, as volume rendering, etc.), in sync with time sequences of other information (transforms, segmentations, annotations, etc.) There are 4D processing (cropping, registration, etc.) and plotting tools. 4D images can be saved as a single 4D NRRD files if geometry (origin, spacing, axis directions, and extent) of all 3D images in it are the same, otherwise each volume is saved in a separate file, metadata is written to an XML file, and these files are zipped into a single file. Slicer just does not support 4D Nifti files, because Nifti already have been causing so much trouble for us with its ambiguities and it is so limited and neuroimaging focused, that it ends up being a very poor file format for generic medical image computing tasks. For example, while it is technically possible to store multichannel data in a Nifti file, there is no way to specify what each channel contains. The "best practice" for such needs among Nifti users is to add a similarly named .json file to the same folder and store additional metadata there. Storing metadata in such loosely attached additional files make workflows more complex and error-prone. In contrast, NRRD files can store arbitrary metadata fields, so we could easily store all necessary metadata in a single file. Slicer already supports this, for example if you stack 4 3D volumes into a 4D file (such as it is done in some BRATS data set example) then Slicer stores it with this NRRD header:
( I would recommend to use NRRD for general-purpose medical image storage and 4D NRRD file with the above fields for storage of multiple independent channels in a single file. We can discuss adding 4D Nifti support for Slicer, but multi-modality image support would not be a valid driver for it, because Nifti is ill-suited for multi-modality image storage (too complex, yet too limited), and it does not officially support multi-modality image storage in multiple channels (the BRATS dataset example that I saw was a misuse of the Nifti standard). If we add 4D Nifti support then a valid motivation would be fMRI or DCE-MRI support, which can be properly stored in Nifti. |
Beta Was this translation helpful? Give feedback.
-
Hi all, Merging multiple 3D volumes into one 4D NRRD To merge multiple 3D volumes in one 4D NRDD file you can just follow @lassoan's comment above and add the However, in order to make it possible to switch between views in Slicer, I had to save it as Annotation of 4D NRRD files? My idea would be that a clinician could annotate one of the "modalities" with a paintbrush like in the video, then switch to the other modality to check if any structures are not annotated correctly (this would be even more relevant for PET-CT scans where the visual difference is extreme). However, it seems like MONAILabel cannot load Another question would be: How should user annotations be integrated into the input of the segmentation model? For example, if the input has the shape (2, H, W, D), where 2 refers to 2 modalities, should the scribbles also be (2, H, W, D), where we just have two identical (1, H, W, D) scribbles (just copy the annotations for each modality)? Or should one design an entirely new multi-modal segmentation model to handle this question (something in the lines of middle/late fusion)? I hope that these questions open a fruitful discussion! @diazandr3s, please let me know if I have misunderstood that two-modality-annotation.mp4 |
Beta Was this translation helpful? Give feedback.
-
Hi there MONAILabel team,
I already read the FAQ and saw that the multimodality functionality is currently underway (PR #753).
I was wondering what the workflow for multimodal datasets will look like, e.g. PET-CT scans. Should all the PET and CT images get channel-stacked so that the model processes them in an early fusion way? Or will there also be late fusion support?
Another interesting question would be how would 3D-Slicer or any other annotation tool manage to visualize multiple modalities. Would you have to specify which channels correspond to which modality? Or would you just split them into two separate directories with corresponding filenames?
It would be great to have some insight on how this workflow would look since multimodality would be beneficial in gathering quality labels. I hope that these questions are not too vague, and as always, keep up the great work!
Beta Was this translation helpful? Give feedback.
All reactions