Hi Ben,
Being able to view NIfTI in the new viewer is such a common request that it's probably worth spending a bit of time outlining why it is so long coming to XNAT-OHIF viewer.
There is nothing intrinsically problematical about taking the contents of a NIfTI file and rendering them within an OHIF viewport. We already do this with the output of the NVIDIA AIAA tool, which typically gets sent back from the AIAA server as NIfTI.
However, there is a big problem with the lack of metadata in a NIFTI file. It's not so much that one can't store metadata but that it is not mandatory.
A significant part of the utility of the DICOM standard is the way that object UIDs link together and allow one DICOM file to refer to another (for example, images, RT-STRUCTs, DICOM-SEGs and DICOM registration objects). DICOM conformance statements supported by "connectathons" guarantee (or at least are supposed to) that all vendor outputs handle this properly. The OHIF viewer makes extensive use of these linkages. When you load an ROI, say, you don't need the user to tell you which XNAT scan it should be placed on top of. When you want to display an image fusion of two different modalities, this is do-able (likely coming in the next viewer release) because a registration object tells you how their coordinate systems are related. When you load a whole-slide microscopy image (also next release, we hope), you can pan and zoom Google-maps style because of the metadata associated with the DICOM frames representing the individual image tiles.
Although, as I said above, it
is possible to put additional metadata in NIFTI files, there is no way that the viewer can guarantee in advance that all the necessary information will be there for any arbitary file that a user decides to upload. There are certainly conventions like
BIDS. This helps and is likely to be the route by which we get support in place first. However, for NIfTI in general, to quote the introduction to the BIDS page itself:
One of the more common issues that can arise for imaging researchers is receiving data from a colleague and not being able to make heads or tails of it: how the data are named and organized do not make intuitive sense.
For this (and probably other reasons, too), I'm told that it's not a priority for the core OHIF team to build this functionality into the vanilla OHIF viewer.
My team comes from a cancer background, where NIfTI has not, historically, seen widespread use. Radiotherapy, overwhelmingly makes use of DICOM, for example. However, not only do we understand that the needs of, say, the neuroimaging community are different, but cancer researchers are also increasingly becoming AI researchers. NIfTI is the dominant paradigm in that field, too, so things are changing for us.
The support that needs to be built is primarily in the form of NIfTI upload tools that take your source data, determine what metadata are lacking and request the additional information from you. For BIDS, this should be relatively straightforward, but for arbitary NIfTI with unspecified metadata, we'll need to build a GUI and the amount of user interaction could be quite painful, particularly for bulk image uploads. Any format for which vital metadata are provided by the image filename is intrinsically weak and problematic IMO.
Given the way the OHIF viewer internals operate, it's possible that the upshot of the upload will actually be to re-create "slimmed down" DICOM files from the uploaded NIFTI. This all seems a bit perverse when someone created the NIfTI from an original DICOM in the first place, but this may be the quickest route to getting things into the viewer.
I'm very interested in comments on the views above, so please do get back to me.
Simon