Dear Ajay,
There have been several queries around NIFTI support in the XNAT viewer (most recently
here), and it's worth reposting why we don't currently provide this support out-of-the-box.
I discussed the problem in some detail
back in 2021 and commented again on the
dangers of non-mandatory NIFTI metadata
here. I ended my 2021 post with a request for feedback on how we should best take this question forward as a community. I'd be more than happy to discuss ideas for the future, but we need the debate to be deeper than simply "the XNAT-OHIF viewer should display NIFTI".
If the research need is simply "I want to be able to view a NIFTI file", then the straightforward answer is: "download the file and use ITK-Snap". On the other hand, if the research need is to view the NIFTI file in the context of the rest of the images acquired in this session, then we need to be concerned with metadata and proper archival. There are also valuable questions to discuss related to the way XNAT itself is being used. If XNAT is being employed as a convenience tool to help gather together images in an ad hoc way for managing a small project for an individual or small group of users, this is very different from the situation of running a major imaging archive where images may be shared between multiple research groups from different institutions. Arguably, we should support both paradigms. One possibility is a separate pane for displaying NIFTI images or a separate viewport type that makes it very clear that the spatial relationships between these data and the DICOM data are not guaranteed.
The lowest hanging fruit is probably how to support BIDS-compliant NIFTI and this might be a starting point for future work.
With regard to how to store segmentation masks, a very common workflow is the following:
1. Store original DICOM data in XNAT.
2. Manipulate those data (e.g., downsample for machine learning; "stitch together" data from multiple MR imaging stations into a whole-body volume; register multiple datasets into a common coordinate system) and create NIFTI output in the form of a new "base image".
3. Create some segmentations, either manually or automatically.
When you finish point 3, you have a couple of NIFTI files that have lost all relationship (in terms of provenance or metadata in the NIFTI files) with the original data from which they were derived. What then? How do you share them with colleagues in a way that makes sense, without having to write additional "sidecar" descriptions.
We have a had a lot of success in turning the NIFTI files back into DICOM for
archival purposes. (Note that there are many good reasons
not to use DICOM for intermediate processing steps.) If you know where the original DICOM sources are, you can build all the important metadata and linkages back into the DICOM metadata. A suitable starting point for this was discussed
here.
Please do comment, everybody, I'd really like to know people's views on this subject.
Best wishes,
Simon