[Neuroimaging] [Nipy-devel] reading embedded PAR header in nii
matthew.brett at gmail.com
Sun Jul 5 00:59:07 CEST 2015
On Tue, May 26, 2015 at 6:03 PM, Matthew Brett <matthew.brett at gmail.com> wrote:
> On Tue, May 19, 2015 at 4:18 PM, Jeff Stevenson <mrjeffs at uw.edu> wrote:
>> hi matthew, i was fooling around with embedding the PAR header into nii files converted with parrec2nii using the --store-header flag in nibabel. later on we would need to retrieve that data from the extended
>> portion of the header in a structured way to get params not currently stored in the std nii header like flip angle etc.
> At the moment, the `store-header` option dumps the PAR header into the
> Nifti as a nifti 'comment' extension. I believe we can just
> reconstruct the header from this info, to generate a PARRECHeader
> object that can be queried for stuff.
> I suppose we have two options:
> * Do something to automatically recognize the PAR header as a comment,
> and convert to something specific for PAR, when we load the nifti
> image with the PAR header in the extension.
> * Have our own specific nifti header extension, with its own code, to
> contain the PAR information (in the same format).
> Either way we need a new NiftiExtension type to deal with the PAR
> header, but that should be pretty easy...
Following up on this one - I thought of another way, which is just to
make a helper function that collects PAR headers from the nifti image
header extensions, and creates PARHeader objects from them:
Any chance you could look over that PR to see if it would help?
More information about the Neuroimaging