Adding support for complex NIfTI files
Posted: Fri Mar 02, 2018 12:09 pm
I would like to add support for complex files to the NiftiReader class so that if I open a Nifti in ImageJ and it is complex, there is a default behavior.
I think it would be fine for the initial default behavior to simply read the real component of the image, and if there was interest it could be further developed to opening a 4D image or opening two stacks.
Unlike my last pull request (https://github.com/openmicroscopy/bioformats/pull/2493) I am having trouble figuring out where to get started. Obviously the populatePixelType() method requires an additional switch block
however I do not see where to add the functionality of reading every other value out of the NIfTI. So I have these starting questions:
1) What method reads the bytes of the body of the image in NiftiReader?
2) Should this method incorporate the isInterleaved() functionality, because technically the complex NIfTI is stored in an interleaved manner?
Eric
I think it would be fine for the initial default behavior to simply read the real component of the image, and if there was interest it could be further developed to opening a 4D image or opening two stacks.
Unlike my last pull request (https://github.com/openmicroscopy/bioformats/pull/2493) I am having trouble figuring out where to get started. Obviously the populatePixelType() method requires an additional switch block
- Code: Select all
case 16:
m.pixelType = FormatTools.FLOAT;
break;
// just add a condition for 32
// case 32:
// m.pixelType = FormatTools.DOUBLE;
case 64:
m.pixelType = FormatTools.DOUBLE;
break;
however I do not see where to add the functionality of reading every other value out of the NIfTI. So I have these starting questions:
1) What method reads the bytes of the body of the image in NiftiReader?
2) Should this method incorporate the isInterleaved() functionality, because technically the complex NIfTI is stored in an interleaved manner?
Eric