loadsave
¶
Utilities to load and save image objects
|
Guess image type from file filename |
|
Load file given filename, guessing at file type |
|
Read data from image associated with files |
|
Save an image to file adapting format to filename |
guessed_image_type¶
- nibabel.loadsave.guessed_image_type(filename)¶
Guess image type from file filename
guessed_image_type deprecated.
deprecated from version: 3.2
Raises <class ‘nibabel.deprecator.ExpiredDeprecationError’> as of version: 5.0
load¶
- nibabel.loadsave.load(filename: FileSpec, **kwargs) FileBasedImage ¶
Load file given filename, guessing at file type
- Parameters:
- filenamestr or os.PathLike
specification of file to load
- **kwargskeyword arguments
Keyword arguments to format-specific load
- Returns:
- img
SpatialImage
Image of guessed type
- img
read_img_data¶
- nibabel.loadsave.read_img_data(img, prefer='scaled')¶
Read data from image associated with files
read_img_data deprecated. Please use
img.dataobj.get_unscaled()
instead.deprecated from version: 3.2
Raises <class ‘nibabel.deprecator.ExpiredDeprecationError’> as of version: 5.0
save¶
- nibabel.loadsave.save(img: FileBasedImage, filename: FileSpec, **kwargs) None ¶
Save an image to file adapting format to filename
- Parameters:
- img
SpatialImage
image to save
- filenamestr or os.PathLike
filename (often implying filenames) to which to save img.
- **kwargskeyword arguments
Keyword arguments to format-specific save
- img
- Returns:
- None