Inheritance diagram for nipy.io.imageformats.compat:
The module provides the NiftiImage interface, which is backward-compatible to the previous C-based implementation.
Bases: nipy.io.imageformats.nifti1.Nifti1Image
Create new instance of own class from img
This is a class method
Parameters : | img : spatialimage instance
|
---|---|
Returns : | cimg : spatialimage instance
|
Lazy load of data
Return header
Update header to match data, affine etc in object
Return image data without image scaling applied
Summary: please use the get_data method instead of this method unless you are sure what you are doing, and that you will only be using image formats for which this method exists and returns sensible results.
Use this method with care; the modified Analyze-type formats such as SPM formats, and nifti1, specify that the image data array, as they are expecting to return it, is given by the raw data on disk, multiplied by a scalefactor and maybe with the addition of a constant. This method returns the data on the disk, without these format-specific scalings applied. Please use this method only if you absolutely need the unscaled data, and the magnitude of the data, as given by the scalefactor, is not relevant to your application. The Analyze-type formats have a single scalefactor +/- offset per image on disk. If you do not care about the absolute values, and will be removing the mean from the data, then the unscaled values will have preserved intensity ratios compared to the mean-centered scaled data. However, this is not necessarily true of other formats with more complicated scaling - such as MINC.
Note that - unlike the scaled get_data method, we do not cache the array, to minimize the memory taken by the object.
Save img in our own format, to name implied by filename
This is a class method
Parameters : | img : spatialimage instance
filename : str
|
---|
Write image to files implied by filename string
Returns : | None : |
---|
Write image to files passed, or self._files