NIPY logo

Site Navigation

NIPY Community

Table Of Contents

Previous topic

io.imageformats.loadsave

Next topic

io.imageformats.nifti1

This Page

io.imageformats.minc

Module: io.imageformats.minc

Inheritance diagram for nipy.io.imageformats.minc:

Classes

MincError

class nipy.io.imageformats.minc.MincError

Bases: exceptions.Exception

__init__()

x.__init__(...) initializes x; see help(type(x)) for signature

args
message

MincHeader

class nipy.io.imageformats.minc.MincHeader(mincfile, endianness=None, check=True)

Bases: object

__init__(mincfile, endianness=None, check=True)
check_fix()
classmethod from_fileobj(klass, fileobj, endianness=None, check=True)
get_best_affine()
get_data_dtype()
get_data_shape()
get_scaled_data()
get_unscaled_data()
get_zooms()
items()
keys()
values()

MincImage

class nipy.io.imageformats.minc.MincImage(data, affine, header=None, extra=None)

Bases: nipy.io.imageformats.spatialimages.SpatialImage

__init__(data, affine, header=None, extra=None)
static filespec_to_files(filespec)
classmethod from_filename(klass, filename)
classmethod from_files(klass, files)
classmethod from_filespec(klass, img, filespec)
classmethod from_image(klass, img)

Create new instance of own class from img

This is a class method

Parameters :

img : spatialimage instance

In fact, an object with the API of spatialimage - specifically get_data, get_affine, get_header and extra.

Returns :

cimg : spatialimage instance

Image, of our own class

get_affine()

Get affine, correcting for spatial dims

get_data()

Lazy load of data

get_data_dtype()
get_header()
get_shape()
classmethod instance_to_filename(klass, img, filename)

Save img in our own format, to name implied by filename

This is a class method

Parameters :

img : spatialimage instance

In fact, an object with the API of spatialimage - specifically get_data, get_affine, get_header and extra.

filename : str

Filename, implying name to which to save image.

classmethod load(klass, filename)
classmethod save(klass, img, filename)
set_data_dtype(dtype)
to_filename(filename)

Write image to files implied by filename string

Returns :None :
to_files(files=None)
to_filespec(filename)

netcdf_fileobj

class nipy.io.imageformats.minc.netcdf_fileobj(fileobj)

Bases: scipy.io.netcdf.netcdf_file

__init__(fileobj)
close()
createDimension(name, length)
createVariable(name, type, dimensions)
flush()
sync()