Module: soma.aims

Here are listed members (classes, functions) of the soma.aims module. Note that this module is mainly a binding of the C++ aimsdata library, and corresponds to a C++ namespace. Thus once soma.aimsalgo is also imported, the namespace is fed with more classes. As a result the list here includes members from both libraries.

The aims module allows access to the AIMS library in python.

  • organization: NeuroSpin and former IFR 49

  • license: CeCILL-B (a free licence comparable to BSD)

Comptibility and requirements

Since version 4.5.1 both Python 2 (2.7 and higher) and Python 3 (3.4 and higher) are supported. However as the module contains compiled code (python / C++ bindings) using specific python C interfaces (APIs/ABIs), PyAIMS has to be compiled separately for a given version of python.

PyAIMS also has bindings to the numpy library, allowing easy array manipulations. This also involves constraints on the Numpy ABI version: once PyAims is compiled, it is not possible to swith numpy to a different version featuring a different ABI (which pip often does without warning, unfortunately).

Most of it is a set of direct bindings to the AIMS C++ library API. But a few classes have been customized or specially written to make easy links to the python world. See also the small AIMS C++ developer doc.

aims contains mainly the AIMS and carto data structures and IO system. It covers several C++ libraries: cartobase, cartodata, graph, aimsdata, plus some C++ classes from the standard library (like std::vector)

Main classes

  • Reader and Writer for the generic IO system, which allows to read and write everything, and which can be, in most cases, replaced with the more convenient global read() and write() functions. Finder is also part of the IO system to identify files and get information about them.

  • Volume_<type>: volumes. An important feature of Volumes is the link with the numpy.ndarray arrays, so all the power of numpy can be used to work on volumes. See for instance Volume_FLOAT. Volumes of various types can be build using the convenience factory function Volume(). Note that the older classes AimsData are deprecated in the C++ library and have been removed from the python bindings in Aims 5.1.

  • carto.GenericObject: the dynamic C++ generic object which behaves much like a python object, and its proxy Object which should always be used to access a GenericObject

  • AimsVector_<type>_<size> for fixed-size vectors, and their aliases for points: Point3df, Point2df, Point3d

  • vector_<type>, set_<type>, list_<type>, map_<type1>_<type2> provide bindings to the C++ std::vector, std::list, std::set, std::map template classes and easy conversions from / to python lists

  • rc_ptr_<type>: bridge with C++ reference counters, which should interact quite well, and most of the time transparently, with python reference counting

  • BucketMap_VOID: list of voxels. Created using the factory function BucketMap()

  • AimsTimeSurface_<polygons_size>_<texture_type=VOID>: meshes, and the factory function AimsTimeSurface(). See for instance AimsTimeSurface_3_VOID.

  • TimeTexture_<type>: textures to map on meshes, and the factory function TimeTexture().

  • Graph

  • Tree

  • AffineTransformation3d: the transformation class that allows referential conversions

  • Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2>: conversions between data types (mainly volume types). See the factory functions Converter() and ShallowConverter()

  • a few algorithms will be added

class soma.aims.AffineTransformation3d
class soma.aims.AffineTransformation3d(a0: aims.AffineTransformation3d)
class soma.aims.AffineTransformation3d(a0: aims.Quaternion)
class soma.aims.AffineTransformation3d(a0: carto.Object)
class soma.aims.AffineTransformation3d(a0: vector_FLOAT)

Bases: AffineTransformation3dBase

affine()
isDirect(self) bool
isIdentity(self) bool
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
rotation(self) rc_ptr_Volume_FLOAT
rotationaroundx(a0: float) rc_ptr_Volume_FLOAT
rotationaroundy(a0: float) rc_ptr_Volume_FLOAT
rotationaroundz(a0: float) rc_ptr_Volume_FLOAT
scale(self, a0: AimsVector_FLOAT_3, a1: AimsVector_FLOAT_3)
setRotationAffine(self, a0: float, a1: float, a2: float, a3: AimsVector_FLOAT_3 = Point3df(0, 0, 0))
setToIdentity(self)
setTranslation(self, a0: AimsVector_FLOAT_3)
transformDouble(self, a0: float, a1: float, a2: float) AimsVector_DOUBLE_3
transformNormalDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformNormalFloat(self, x: float, y: float, z: float) AimsVector_FLOAT_3
transformNormalPoint3dd(self, dir: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformNormalPoint3df(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transformVectorDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformVectorFloat(self, x: float, y: float, z: float) AimsVector_FLOAT_3
transformVectorPoint3dd(self, vec: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformVectorPoint3df(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
translation(self) AimsVector_FLOAT_3
translationTransform(tx: float, ty: float, tz: float) aims.AffineTransformation3d
translationTransform(t: AimsVector_FLOAT_3) aims.AffineTransformation3d
translationTransform(t: vector_FLOAT) aims.AffineTransformation3d
class soma.aims.AffineTransformation3dBase
class soma.aims.AffineTransformation3dBase(other: soma.AffineTransformation3dBase)
class soma.aims.AffineTransformation3dBase(mat: vector_FLOAT)
class soma.aims.AffineTransformation3dBase(mat: carto.Object)

Bases: Transformation3d, AffineTransformationBase

extendOrder(self, n: int)
getInverse(self) rc_ptr_Transformation
invertible(self) bool
isDirect(self) bool
isIdentity(self) bool
scale(self, sizeFrom: AimsVector_FLOAT_3, sizeTo: AimsVector_FLOAT_3)
setToIdentity(self)
setTranslation(self, trans: AimsVector_FLOAT_3)
transform(self, p: AimsVector_S16_3) AimsVector_S16_3
transform(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transform(self, pos: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transform(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transform(self, pos: vector_S32) vector_S32
transform(self, pos: vector_FLOAT) vector_FLOAT
transform(self, pos: vector_DOUBLE) vector_DOUBLE
transformDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformNormal(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transformNormal(self, dir: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformNormal(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformUnitNormal(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transformUnitNormal(self, dir: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformUnitNormal(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformVector(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transformVector(self, vec: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformVector(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformVector(self, pos: vector_S32) vector_S32
transformVector(self, pos: vector_FLOAT) vector_FLOAT
transformVector(self, pos: vector_DOUBLE) vector_DOUBLE
class soma.aims.AffineTransformationBase(order: int = 3)
class soma.aims.AffineTransformationBase(other: soma.AffineTransformationBase)
class soma.aims.AffineTransformationBase(mat: vector_FLOAT)
class soma.aims.AffineTransformationBase(mat: carto.Object)

Bases: Transformation

extendOrder(self, n: int)
fromColumnVector(self, vec: vector_FLOAT)
fromMatrix(value)
getInverse(self) rc_ptr_Transformation
invertible(self) bool
isDirect(self) bool
isIdentity(self) bool
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
order(self) int
setToIdentity(self)
squeezeOrder(self, n: int, check: bool = True, notify_fail: bool = True)
toColumnVector(self) vector_FLOAT
toMatrix()

This function return a copy of the transformation matrix

toVector(self) vector_FLOAT
transform(self, pos: vector_S32) vector_S32
transform(self, pos: vector_FLOAT) vector_FLOAT
transform(self, pos: vector_DOUBLE) vector_DOUBLE
class soma.aims.AimsApplication(a0: List, a1: object)
class soma.aims.AimsApplication(a0: aims.AimsApplication)

Bases: wrapper

initialize(self)
verbose(self) int
soma.aims.AimsConnectedComponent(data: rc_ptr_Volume_S16, connectivity: aims.Connectivity.Type, valids: object, backgrnd: int = 0, bin: bool = True, minSize: int = 0, numMax: int = 0, verbose: bool = True)
void AimsConnectedComponent(data, connectivity, valids, backgrnd=0,

bin=True, minSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • valids (dict short: size_t)

  • backgrnd (short)

  • bin (bool (optional))

  • minSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_S16, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (short)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: BucketMap_S16, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction, Bucket version. The function modifies the input data, and does not return a new one.

Parameters:
  • data (BucketMap_S16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (short)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxsize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_U16, connectivity: aims.Connectivity.Type, valids: object, backgrnd: int = 0, bin: bool = True, minSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, valids, backgrnd=0,

bin=True, minSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • valids (dict unsigned short: size_t)

  • backgrnd (unsigned short)

  • bin (bool (optional))

  • minSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_U16, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (unsigned short)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: BucketMap_U16, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction, Bucket version. The function modifies the input data, and does not return a new one.

Parameters:
  • data (BucketMap_U16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (unsigned short)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxsize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_S32, connectivity: aims.Connectivity.Type, valids: object, backgrnd: int = 0, bin: bool = True, minSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, valids, backgrnd=0,

bin=True, minSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • valids (dict int: size_t)

  • backgrnd (int)

  • bin (bool (optional))

  • minSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_S32, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (int)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: BucketMap_S32, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction, Bucket version. The function modifies the input data, and does not return a new one.

Parameters:
  • data (BucketMap_S32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (int)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxsize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_U32, connectivity: aims.Connectivity.Type, valids: object, backgrnd: int = 0, bin: bool = True, minSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, valids, backgrnd=0,

bin=True, minSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • valids (dict unsigned: size_t)

  • backgrnd (unsigned)

  • bin (bool (optional))

  • minSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_U32, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (unsigned)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: BucketMap_U32, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction, Bucket version. The function modifies the input data, and does not return a new one.

Parameters:
  • data (BucketMap_U32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (unsigned)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxsize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

class soma.aims.AimsGraphReader(filename: object)
class soma.aims.AimsGraphReader(a0: aims.AimsGraphReader)

Bases: wrapper

readElements(self, g: Graph, mask: int = 1)
setExcludeFilter(self, toexclude: set_STRING)
setReadFilter(self, toread: set_STRING)
class soma.aims.AimsGraphWriter(filename: object)
class soma.aims.AimsGraphWriter(a0: aims.AimsGraphWriter)

Bases: wrapper

Global = 1
Keep = 0
Local = 2
class SavingMode

Bases: int

writeElements(self, g: Graph, newmode: aims.AimsGraphWriter.SavingMode = aims.AimsGraphWriter.Keep, oldmode: aims.AimsGraphWriter.SavingMode = aims.AimsGraphWriter.Keep, saveOnlyModified: bool = False)
class soma.aims.AimsHSV(a0: AimsHSV)
class soma.aims.AimsHSV(a0: int = 0, a1: int = 0, a2: int = 0)

Bases: wrapper

hue(self) int
saturation(self) int
value(self) int
class soma.aims.AimsMerge_S16_S16(type: merge_t, value: int = 0, label: int = 0)
class soma.aims.AimsMerge_S16_S16(a0: AimsMerge_S16_S16)

Bases: wrapper

class soma.aims.AimsRGB(a0: AimsRGB)
class soma.aims.AimsRGB(a0: AimsRGBA)
class soma.aims.AimsRGB(a0: int = 0, a1: int = 0, a2: int = 0)

Bases: wrapper

blue(self) int
green(self) int
red(self) int
class soma.aims.AimsRGBA(a0: AimsRGBA)
class soma.aims.AimsRGBA(a0: AimsRGB)
class soma.aims.AimsRGBA(a0: int = 0, a1: int = 0, a2: int = 0, a3: int = 0)

Bases: wrapper

alpha(self) int
blue(self) int
green(self) int
red(self) int
soma.aims.AimsSurfaceTriangle

alias of AimsTimeSurface_3_VOID

soma.aims.AimsThreshold(*args, **kwargs)[source]

Create a AimsThreshold instance from input and output types. Types may be passed as keyword arguments intype and outtype, or dtype if both are the same. Otherwise the arguments are parsed to find types arguments. Types may be specified as allowed by typeCode().

Other arguments are otherwise passed to the constructor of the underlying threshold object. See for instance: soma.aims.AimsThreshold_S16_S16.

class soma.aims.AimsThreshold_FLOAT_S16(a0: threshold_t, a1: float, a2: float = 0, a3: float = 0)

Bases: wrapper

AimsThreshold_FLOAT_S16(ttype, th1, th2=0,

background=0)

Thresholding types are specified as the soma.aims.threshold_t enum. Values are:

  • AIMS_LOWER_THAN

  • AIMS_LOWER_OR_EQUAL_TO

  • AIMS_GREATER_THAN

  • AIMS_GREATER_OR_EQUAL_TO

  • AIMS_EQUAL_TO

  • AIMS_DIFFER

  • AIMS_BETWEEN

  • AIMS_OUTSIDE

  • AIMS_BETWEEN_EXCLUDE_LOWER_BOUND

  • AIMS_BETWEEN_EXCLUDE_HIGHER_BOUND

  • AIMS_BETWEEN_EXCLUDE_BOUNDS

  • AIMS_OUTSIDE_INCLUDE_LOWER_BOUND

  • AIMS_OUTSIDE_INCLUDE_HIGHER_BOUND

  • AIMS_OUTSIDE_INCLUDE_BOUNDS

Use:

thresholded_vol = threshold(volume)

Apply non-binary thresholding: voxels passing the theshold are left with their initial value.

thresholded_vol = threshold.bin(volume)

Apply binary thresholding: voxels passing the theshold are set to a constant value – which one ?

Parameters:
  • ttype (soma.aims.threshold_t enum) – thresholding type (see above)

  • th1 (float) – first (main) threshold

  • th2 (float) – second threshold (in case of double thresholding)

  • background (float) – value set to elements not passing the threshold condition

  • volume (Volume_S16) – input volume to be thresholded

  • volume – input volume to be thresholded

Returns:

  • thresholded_vol (rc_ptr_Volume_FLOAT) – thresholded volume

  • AimsThreshold_FLOAT_S16(a0 (AimsThreshold_FLOAT_S16))

  • thresholded_vol = threshold(volume)

  • Apply non-binary thresholding (voxels passing the theshold are left with)

  • their initial value.

Returns:

thresholded_vol – thresholded volume

Return type:

rc_ptr_Volume_FLOAT

bin(self, a0: rc_ptr_Volume_FLOAT) rc_ptr_Volume_S16

thresholded_vol = threshold.bin(volume)

Apply binary thresholding: voxels passing the theshold are set to a constant value – which one ?

Parameters:

volume (Volume_FLOAT) – input volume to be thresholded

Returns:

thresholded_vol – thresholded volume

Return type:

rc_ptr_Volume_S16

class soma.aims.AimsThreshold_S16_S16(a0: threshold_t, a1: int, a2: int = 0, a3: int = 0)

Bases: wrapper

AimsThreshold_S16_S16(ttype, th1, th2=0,

background=0)

Thresholding types are specified as the soma.aims.threshold_t enum. Values are:

  • AIMS_LOWER_THAN

  • AIMS_LOWER_OR_EQUAL_TO

  • AIMS_GREATER_THAN

  • AIMS_GREATER_OR_EQUAL_TO

  • AIMS_EQUAL_TO

  • AIMS_DIFFER

  • AIMS_BETWEEN

  • AIMS_OUTSIDE

  • AIMS_BETWEEN_EXCLUDE_LOWER_BOUND

  • AIMS_BETWEEN_EXCLUDE_HIGHER_BOUND

  • AIMS_BETWEEN_EXCLUDE_BOUNDS

  • AIMS_OUTSIDE_INCLUDE_LOWER_BOUND

  • AIMS_OUTSIDE_INCLUDE_HIGHER_BOUND

  • AIMS_OUTSIDE_INCLUDE_BOUNDS

Use:

thresholded_vol = threshold(volume)

Apply non-binary thresholding: voxels passing the theshold are left with their initial value.

thresholded_vol = threshold.bin(volume)

Apply binary thresholding: voxels passing the theshold are set to a constant value – which one ?

Parameters:
  • ttype (soma.aims.threshold_t enum) – thresholding type (see above)

  • th1 (short) – first (main) threshold

  • th2 (short) – second threshold (in case of double thresholding)

  • background (short) – value set to elements not passing the threshold condition

  • volume (Volume_S16) – input volume to be thresholded

  • volume – input volume to be thresholded

Returns:

  • thresholded_vol (rc_ptr_Volume_S16) – thresholded volume

  • AimsThreshold_S16_S16(a0 (AimsThreshold_S16_S16))

  • thresholded_vol = threshold(volume)

  • Apply non-binary thresholding (voxels passing the theshold are left with)

  • their initial value.

Returns:

thresholded_vol – thresholded volume

Return type:

rc_ptr_Volume_S16

bin(self, a0: rc_ptr_Volume_S16) rc_ptr_Volume_S16

thresholded_vol = threshold.bin(volume)

Apply binary thresholding: voxels passing the theshold are set to a constant value – which one ?

Parameters:

volume (Volume_S16) – input volume to be thresholded

Returns:

thresholded_vol – thresholded volume

Return type:

rc_ptr_Volume_S16

soma.aims.AimsTimeSurface(*args, **kwargs)[source]

Create an instance of Aims mesh (AimsTimeSurface_<dim>_<dtype>) from a dimension parameter, or copies a mesh, or build it from arrays.

See for instance AimsTimeSurface_3_VOID

Usages:

mesh1 = AimsTimeSurface()
mesh2 = AimsTimeSurface(3)
mesh3 = AimsTimeSurface(3, 'VOID')
mesh4 = AimsTimeSurface(3, dtype='VOID')
mesh5 = AimsTimeSurface(dim=3, dtype='VOID')
mesh6 = AimsTimeSurface(mesh)
mesh7 = AimsTimeSurface(vertices=[[1,2,3], [3,4,5.6]],
                        polygons=[[0,1]])
mesh8 = AimsTimeSurface([[1,2,3], [3,4,5.6]], polygons=[[0,1]])
mesh9 = AimsTimeSurface([[1,2,3], [3,4,5.6]], None, [[0,1]])
mesh10 = AimsTimeSurface([[1,2,3], [3,4,5.6]], [[0,1]], normals=[])
soma.aims.AimsTimeSurface_2

alias of AimsTimeSurface_2_VOID

class soma.aims.AimsTimeSurface_2_FLOAT
class soma.aims.AimsTimeSurface_2_FLOAT(a0: AimsTimeSurface_2_FLOAT)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_2_FLOAT
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_2 | None
size(self) int
texture(self, a0: int = 0) vector_FLOAT | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
class soma.aims.AimsTimeSurface_2_POINT2DF
class soma.aims.AimsTimeSurface_2_POINT2DF(a0: AimsTimeSurface_2_POINT2DF)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_2_POINT2DF
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_2 | None
size(self) int
texture(self, a0: int = 0) vector_POINT2DF | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
class soma.aims.AimsTimeSurface_2_VOID
class soma.aims.AimsTimeSurface_2_VOID(a0: AimsTimeSurface_2_VOID)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_2_VOID
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_2 | None
size(self) int
texture(self, a0: int = 0) vector_VOID | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
soma.aims.AimsTimeSurface_3

alias of AimsTimeSurface_3_VOID

class soma.aims.AimsTimeSurface_3_FLOAT
class soma.aims.AimsTimeSurface_3_FLOAT(a0: AimsTimeSurface_3_FLOAT)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_3_FLOAT
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_3 | None
size(self) int
texture(self, a0: int = 0) vector_FLOAT | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
class soma.aims.AimsTimeSurface_3_POINT2DF
class soma.aims.AimsTimeSurface_3_POINT2DF(a0: AimsTimeSurface_3_POINT2DF)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_3_POINT2DF
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_3 | None
size(self) int
texture(self, a0: int = 0) vector_POINT2DF | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
class soma.aims.AimsTimeSurface_3_VOID
class soma.aims.AimsTimeSurface_3_VOID(a0: AimsTimeSurface_3_VOID)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_3_VOID
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_3 | None
size(self) int
texture(self, a0: int = 0) vector_VOID | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
soma.aims.AimsTimeSurface_4

alias of AimsTimeSurface_4_VOID

class soma.aims.AimsTimeSurface_4_FLOAT
class soma.aims.AimsTimeSurface_4_FLOAT(a0: AimsTimeSurface_4_FLOAT)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_4_FLOAT
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_4 | None
size(self) int
texture(self, a0: int = 0) vector_FLOAT | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
class soma.aims.AimsTimeSurface_4_POINT2DF
class soma.aims.AimsTimeSurface_4_POINT2DF(a0: AimsTimeSurface_4_POINT2DF)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_4_POINT2DF
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_4 | None
size(self) int
texture(self, a0: int = 0) vector_POINT2DF | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
class soma.aims.AimsTimeSurface_4_VOID
class soma.aims.AimsTimeSurface_4_VOID(a0: AimsTimeSurface_4_VOID)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_AimsTimeSurface_4_VOID
header(self) Any

The header contains all meta-data.

keys(self) List
normal(self, a0: int = 0) vector_POINT3DF | None
polygon(self, a0: int = 0) vector_AimsVector_U32_4 | None
size(self) int
texture(self, a0: int = 0) vector_VOID | None
updateNormals(self)
vertex(self, a0: int = 0) vector_POINT3DF | None
soma.aims.AimsVector(*args, **kwargs)[source]

Create an AimsVector instance from type and dimension arguments. Types may be passed as the keyword argument dtype. Otherwise the arguments are parsed to find types arguments. Dimension should be passed as the keyword argument dim, or is guessed from the input value(s).

Types may be specified as allowed by typeCode().

If unspecified, type is guessed from the 1st element of the vector data.

class soma.aims.AimsVector_DOUBLE_2
class soma.aims.AimsVector_DOUBLE_2(a0: float)
class soma.aims.AimsVector_DOUBLE_2(a0: float, a1: float, a2: float)
class soma.aims.AimsVector_DOUBLE_2(a0: AimsVector_DOUBLE_2)
class soma.aims.AimsVector_DOUBLE_2(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_DOUBLE_2 | None)
crossed(self, a0: AimsVector_DOUBLE_2) AimsVector_DOUBLE_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_DOUBLE_2) float
fromObject(a0: carto.GenericObject) AimsVector_DOUBLE_2 | None
isNull(self) bool
item(self, a0: int) float
items(self, a0: int = 2) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_DOUBLE_2
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_DOUBLE_2)
class soma.aims.AimsVector_DOUBLE_3
class soma.aims.AimsVector_DOUBLE_3(a0: float)
class soma.aims.AimsVector_DOUBLE_3(a0: float, a1: float, a2: float)
class soma.aims.AimsVector_DOUBLE_3(a0: AimsVector_DOUBLE_3)
class soma.aims.AimsVector_DOUBLE_3(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_DOUBLE_3 | None)
crossed(self, a0: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_DOUBLE_3) float
fromObject(a0: carto.GenericObject) AimsVector_DOUBLE_3 | None
isNull(self) bool
item(self, a0: int) float
items(self, a0: int = 3) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_DOUBLE_3
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_DOUBLE_3)
class soma.aims.AimsVector_DOUBLE_4
class soma.aims.AimsVector_DOUBLE_4(a0: float)
class soma.aims.AimsVector_DOUBLE_4(a0: float, a1: float, a2: float)
class soma.aims.AimsVector_DOUBLE_4(a0: AimsVector_DOUBLE_4)
class soma.aims.AimsVector_DOUBLE_4(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_DOUBLE_4 | None)
crossed(self, a0: AimsVector_DOUBLE_4) AimsVector_DOUBLE_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_DOUBLE_4) float
fromObject(a0: carto.GenericObject) AimsVector_DOUBLE_4 | None
isNull(self) bool
item(self, a0: int) float
items(self, a0: int = 4) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_DOUBLE_4
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_DOUBLE_4)
class soma.aims.AimsVector_FLOAT_2
class soma.aims.AimsVector_FLOAT_2(a0: float)
class soma.aims.AimsVector_FLOAT_2(a0: float, a1: float, a2: float)
class soma.aims.AimsVector_FLOAT_2(a0: AimsVector_FLOAT_2)
class soma.aims.AimsVector_FLOAT_2(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_FLOAT_2 | None)
crossed(self, a0: AimsVector_FLOAT_2) AimsVector_FLOAT_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_FLOAT_2) float
fromObject(a0: carto.GenericObject) AimsVector_FLOAT_2 | None
isNull(self) bool
item(self, a0: int) float
items(self, a0: int = 2) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_FLOAT_2
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_FLOAT_2)
class soma.aims.AimsVector_FLOAT_3

Bases: wrapper

This class wraps an aims Point3df aka AimsVector<3, float> use the method items() to get a tuple out of it use setItems(Point3df) to affect new values

arraydata(self) Any
assign(self, a0: AimsVector_FLOAT_3 | None)
crossed(self, a0: AimsVector_FLOAT_3) AimsVector_FLOAT_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_FLOAT_3) float
fromObject(a0: carto.GenericObject) AimsVector_FLOAT_3 | None
isNull(self) bool
item(self, a0: int) float
items(self, a0: int = 3) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_FLOAT_3
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_FLOAT_3)
class soma.aims.AimsVector_FLOAT_4
class soma.aims.AimsVector_FLOAT_4(a0: float)
class soma.aims.AimsVector_FLOAT_4(a0: float, a1: float, a2: float)
class soma.aims.AimsVector_FLOAT_4(a0: AimsVector_FLOAT_4)
class soma.aims.AimsVector_FLOAT_4(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_FLOAT_4 | None)
crossed(self, a0: AimsVector_FLOAT_4) AimsVector_FLOAT_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_FLOAT_4) float
fromObject(a0: carto.GenericObject) AimsVector_FLOAT_4 | None
isNull(self) bool
item(self, a0: int) float
items(self, a0: int = 4) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_FLOAT_4
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_FLOAT_4)
class soma.aims.AimsVector_S16_2
class soma.aims.AimsVector_S16_2(a0: int)
class soma.aims.AimsVector_S16_2(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S16_2(a0: AimsVector_S16_2)
class soma.aims.AimsVector_S16_2(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S16_2 | None)
crossed(self, a0: AimsVector_S16_2) AimsVector_S16_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S16_2) int
fromObject(a0: carto.GenericObject) AimsVector_S16_2 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 2) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S16_2
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S16_2)
class soma.aims.AimsVector_S16_3
class soma.aims.AimsVector_S16_3(a0: int)
class soma.aims.AimsVector_S16_3(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S16_3(a0: AimsVector_S16_3)
class soma.aims.AimsVector_S16_3(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S16_3 | None)
crossed(self, a0: AimsVector_S16_3) AimsVector_S16_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S16_3) int
fromObject(a0: carto.GenericObject) AimsVector_S16_3 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 3) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S16_3
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S16_3)
class soma.aims.AimsVector_S16_4
class soma.aims.AimsVector_S16_4(a0: int)
class soma.aims.AimsVector_S16_4(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S16_4(a0: AimsVector_S16_4)
class soma.aims.AimsVector_S16_4(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S16_4 | None)
crossed(self, a0: AimsVector_S16_4) AimsVector_S16_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S16_4) int
fromObject(a0: carto.GenericObject) AimsVector_S16_4 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 4) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S16_4
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S16_4)
class soma.aims.AimsVector_S32_2
class soma.aims.AimsVector_S32_2(a0: int)
class soma.aims.AimsVector_S32_2(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S32_2(a0: AimsVector_S32_2)
class soma.aims.AimsVector_S32_2(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S32_2 | None)
crossed(self, a0: AimsVector_S32_2) AimsVector_S32_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S32_2) int
fromObject(a0: carto.GenericObject) AimsVector_S32_2 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 2) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S32_2
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S32_2)
class soma.aims.AimsVector_S32_3
class soma.aims.AimsVector_S32_3(a0: int)
class soma.aims.AimsVector_S32_3(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S32_3(a0: AimsVector_S32_3)
class soma.aims.AimsVector_S32_3(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S32_3 | None)
crossed(self, a0: AimsVector_S32_3) AimsVector_S32_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S32_3) int
fromObject(a0: carto.GenericObject) AimsVector_S32_3 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 3) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S32_3
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S32_3)
class soma.aims.AimsVector_S32_4
class soma.aims.AimsVector_S32_4(a0: int)
class soma.aims.AimsVector_S32_4(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S32_4(a0: AimsVector_S32_4)
class soma.aims.AimsVector_S32_4(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S32_4 | None)
crossed(self, a0: AimsVector_S32_4) AimsVector_S32_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S32_4) int
fromObject(a0: carto.GenericObject) AimsVector_S32_4 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 4) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S32_4
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S32_4)
class soma.aims.AimsVector_S64_2
class soma.aims.AimsVector_S64_2(a0: int)
class soma.aims.AimsVector_S64_2(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S64_2(a0: AimsVector_S64_2)
class soma.aims.AimsVector_S64_2(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S64_2 | None)
crossed(self, a0: AimsVector_S64_2) AimsVector_S64_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S64_2) int
fromObject(a0: carto.GenericObject) AimsVector_S64_2 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 2) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S64_2
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S64_2)
class soma.aims.AimsVector_S64_3
class soma.aims.AimsVector_S64_3(a0: int)
class soma.aims.AimsVector_S64_3(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S64_3(a0: AimsVector_S64_3)
class soma.aims.AimsVector_S64_3(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S64_3 | None)
crossed(self, a0: AimsVector_S64_3) AimsVector_S64_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S64_3) int
fromObject(a0: carto.GenericObject) AimsVector_S64_3 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 3) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S64_3
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S64_3)
class soma.aims.AimsVector_S64_4
class soma.aims.AimsVector_S64_4(a0: int)
class soma.aims.AimsVector_S64_4(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_S64_4(a0: AimsVector_S64_4)
class soma.aims.AimsVector_S64_4(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_S64_4 | None)
crossed(self, a0: AimsVector_S64_4) AimsVector_S64_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_S64_4) int
fromObject(a0: carto.GenericObject) AimsVector_S64_4 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 4) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_S64_4
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_S64_4)
class soma.aims.AimsVector_U32_2
class soma.aims.AimsVector_U32_2(a0: int)
class soma.aims.AimsVector_U32_2(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_U32_2(a0: AimsVector_U32_2)
class soma.aims.AimsVector_U32_2(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_U32_2 | None)
crossed(self, a0: AimsVector_U32_2) AimsVector_U32_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_U32_2) int
fromObject(a0: carto.GenericObject) AimsVector_U32_2 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 2) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_U32_2
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_U32_2)
class soma.aims.AimsVector_U32_3
class soma.aims.AimsVector_U32_3(a0: int)
class soma.aims.AimsVector_U32_3(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_U32_3(a0: AimsVector_U32_3)
class soma.aims.AimsVector_U32_3(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_U32_3 | None)
crossed(self, a0: AimsVector_U32_3) AimsVector_U32_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_U32_3) int
fromObject(a0: carto.GenericObject) AimsVector_U32_3 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 3) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_U32_3
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_U32_3)
class soma.aims.AimsVector_U32_4
class soma.aims.AimsVector_U32_4(a0: int)
class soma.aims.AimsVector_U32_4(a0: int, a1: int, a2: int)
class soma.aims.AimsVector_U32_4(a0: AimsVector_U32_4)
class soma.aims.AimsVector_U32_4(a0: Any)

Bases: wrapper

arraydata(self) Any
assign(self, a0: AimsVector_U32_4 | None)
crossed(self, a0: AimsVector_U32_4) AimsVector_U32_3 | None
dnorm(self) float
dnorm2(self) float
dot(self, a0: AimsVector_U32_4) int
fromObject(a0: carto.GenericObject) AimsVector_U32_4 | None
isNull(self) bool
item(self, a0: int) int
items(self, a0: int = 4) Any
list(self) List
norm(self) float
norm2(self) float
normalize(self) AimsVector_U32_4
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
setItems(self, a0: AimsVector_U32_4)
class soma.aims.BorderFiller_BOOL
class soma.aims.BorderFiller_BOOL(a0: BorderFiller_BOOL)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_BOOL, value: bool = False, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_BOOL data,

const bool & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_BOOL instance to fill border.)

  • value (bool value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_BOOL, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_BOOL data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_BOOL instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_BOOL, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_BOOL data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_BOOL instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_BOOL, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_BOOL data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_BOOL instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_DOUBLE
class soma.aims.BorderFiller_DOUBLE(a0: BorderFiller_DOUBLE)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_DOUBLE, value: float = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_DOUBLE data,

const double & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_DOUBLE instance to fill border.)

  • value (double value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_DOUBLE, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_DOUBLE data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_DOUBLE instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_DOUBLE, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_DOUBLE data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_DOUBLE instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_DOUBLE, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_DOUBLE data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_DOUBLE instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_FLOAT
class soma.aims.BorderFiller_FLOAT(a0: BorderFiller_FLOAT)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_FLOAT, value: float = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_FLOAT data,

const float & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_FLOAT instance to fill border.)

  • value (float value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_FLOAT, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_FLOAT data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_FLOAT instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_FLOAT, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_FLOAT data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_FLOAT instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_FLOAT, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_FLOAT data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_FLOAT instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_RGB
class soma.aims.BorderFiller_RGB(a0: BorderFiller_RGB)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_RGB, value: AimsRGB = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_RGB data,

const AimsRGB & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_RGB instance to fill border.)

  • value (AimsRGB value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_RGB, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_RGB data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_RGB instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_RGB, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_RGB data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_RGB instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_RGB, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_RGB data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_RGB instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_RGBA
class soma.aims.BorderFiller_RGBA(a0: BorderFiller_RGBA)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_RGBA, value: AimsRGBA = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_RGBA data,

const AimsRGBA & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_RGBA instance to fill border.)

  • value (AimsRGBA value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_RGBA, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_RGBA data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_RGBA instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_RGBA, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_RGBA data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_RGBA instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_RGBA, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_RGBA data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_RGBA instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_S16
class soma.aims.BorderFiller_S16(a0: BorderFiller_S16)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_S16, value: int = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_S16 data,

const short & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S16 instance to fill border.)

  • value (short value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_S16, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_S16 data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S16 instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_S16, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_S16 data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S16 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_S16, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_S16 data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S16 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_S32
class soma.aims.BorderFiller_S32(a0: BorderFiller_S32)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_S32, value: int = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_S32 data,

const int & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S32 instance to fill border.)

  • value (int value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_S32, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_S32 data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S32 instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_S32, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_S32 data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S32 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_S32, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_S32 data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S32 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_U16
class soma.aims.BorderFiller_U16(a0: BorderFiller_U16)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_U16, value: int = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_U16 data,

const unsigned short & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U16 instance to fill border.)

  • value (unsigned short value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_U16, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_U16 data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U16 instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_U16, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_U16 data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U16 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_U16, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_U16 data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U16 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_U32
class soma.aims.BorderFiller_U32(a0: BorderFiller_U32)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_U32, value: int = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_U32 data,

const unsigned & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U32 instance to fill border.)

  • value (unsigned value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_U32, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_U32 data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U32 instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_U32, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_U32 data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U32 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_U32, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_U32 data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U32 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

class soma.aims.BorderFiller_U8
class soma.aims.BorderFiller_U8(a0: BorderFiller_U8)

Bases: wrapper

fillConstant(data: rc_ptr_Volume_U8, value: bytes = 0, unread_only: bool = False)
static void fillConstant( rc_ptr_Volume_U8 data,

const unsigned char & value = 0, bool unread_only = false )

Fills volume border with a constant value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U8 instance to fill border.)

  • value (unsigned char value to fill border with (optional)) – Default is 0.

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False

fillMedian(data: rc_ptr_Volume_U8, size: AimsVector_S64_4 = Point4dl(-1, -1, -1, -1), unreadOnly: bool = False)
static void fillMedian( rc_ptr_Volume_U8 data,

Point4dl size = Point4dl(-1,-1,-1,-1), bool unreadOnly = false )

Fills the border with a median value. The median value is processed in the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U8 instance to fill border.)

  • size (Point4dl size of inside border to use to define median value) – [-1,-1,-1,-1] means that the median value is processed in the inside border of equal outside border size. if the outside border is of size (2, 2, 0) in dimensions x, y, z, the inside border is also of size (2, 2, 0) (optional). Default is [-1,-1,-1,-1].

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillMirror(data: rc_ptr_Volume_U8, unreadOnly: bool = False)
static void fillMirror( rc_ptr_Volume_U8 data,

bool unreadOnly = false )

Fills the border mirroring the inside border. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U8 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

fillNearest(data: rc_ptr_Volume_U8, unreadOnly: bool = False)
static void fillNearest( rc_ptr_Volume_U8 data,

bool unreadOnly = false )

Fills the border with the nearest inside voxel value. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U8 instance to fill border.)

  • unread_only (bool (optional)) – For partial reading, fill the data only where it has not been read. Default is False.

soma.aims.BucketMap(*args, **kwargs)[source]

Create an instance of Aims bucket (BucketMap_<type>) from a type parameter, which may be specified as the dtype keyword argument, or as one of the arguments if one is identitied as a type.

The default type is ‘VOID’.

Type definitions should match those accepted by typeCode().

class soma.aims.BucketMap_DOUBLE
class soma.aims.BucketMap_DOUBLE(a0: BucketMap_DOUBLE)

Bases: RCObject

class Bucket
class Bucket(a0: BucketMap_DOUBLE.Bucket)

Bases: wrapper

clear(self)
has_key(self, a0: AimsVector_S16_3) bool
items()
iteritems()
keys(self) Tuple
size(self) int
clear(self)
erase(self, a0: int)
erase(self, a0: AimsVector_S16_3) None
fromObject(a0: carto.GenericObject) rc_ptr_BucketMap_DOUBLE
header(self) Any

The header contains all meta-data.

insert(self, a0: AimsVector_S16_3, a1: float = double())
insert(self, t: int, a1: AimsVector_S16_3, a2: float = double()) None
items()
iteritems()
keys(self) List
merge(self, a0: BucketMap_DOUBLE)
rcToObject(self) carto.Object
setSizeT(self, a0: float)
setSizeX(self, a0: float)
setSizeXYZT(self, a0: float, a1: float, a2: float, a3: float)
setSizeY(self, a0: float)
setSizeZ(self, a0: float)
size(self) int
sizeT(self) float
sizeX(self) float
sizeY(self) float
sizeZ(self) float
class soma.aims.BucketMap_FLOAT
class soma.aims.BucketMap_FLOAT(a0: BucketMap_FLOAT)

Bases: RCObject

class Bucket
class Bucket(a0: BucketMap_FLOAT.Bucket)

Bases: wrapper

clear(self)
has_key(self, a0: AimsVector_S16_3) bool
items()
iteritems()
keys(self) Tuple
size(self) int
clear(self)
erase(self, a0: int)
erase(self, a0: AimsVector_S16_3) None
fromObject(a0: carto.GenericObject) rc_ptr_BucketMap_FLOAT
header(self) Any

The header contains all meta-data.

insert(self, a0: AimsVector_S16_3, a1: float = float())
insert(self, t: int, a1: AimsVector_S16_3, a2: float = float()) None
items()
iteritems()
keys(self) List
merge(self, a0: BucketMap_FLOAT)
rcToObject(self) carto.Object
setSizeT(self, a0: float)
setSizeX(self, a0: float)
setSizeXYZT(self, a0: float, a1: float, a2: float, a3: float)
setSizeY(self, a0: float)
setSizeZ(self, a0: float)
size(self) int
sizeT(self) float
sizeX(self) float
sizeY(self) float
sizeZ(self) float
class soma.aims.BucketMap_S16
class soma.aims.BucketMap_S16(a0: BucketMap_S16)

Bases: RCObject

class Bucket
class Bucket(a0: BucketMap_S16.Bucket)

Bases: wrapper

clear(self)
has_key(self, a0: AimsVector_S16_3) bool
items()
iteritems()
keys(self) Tuple
size(self) int
clear(self)
erase(self, a0: int)
erase(self, a0: AimsVector_S16_3) None
fromObject(a0: carto.GenericObject) rc_ptr_BucketMap_S16
header(self) Any

The header contains all meta-data.

insert(self, a0: AimsVector_S16_3, a1: int = short())
insert(self, t: int, a1: AimsVector_S16_3, a2: int = short()) None
items()
iteritems()
keys(self) List
merge(self, a0: BucketMap_S16)
rcToObject(self) carto.Object
setSizeT(self, a0: float)
setSizeX(self, a0: float)
setSizeXYZT(self, a0: float, a1: float, a2: float, a3: float)
setSizeY(self, a0: float)
setSizeZ(self, a0: float)
size(self) int
sizeT(self) float
sizeX(self) float
sizeY(self) float
sizeZ(self) float
class soma.aims.BucketMap_S32
class soma.aims.BucketMap_S32(a0: BucketMap_S32)

Bases: RCObject

class Bucket
class Bucket(a0: BucketMap_S32.Bucket)

Bases: wrapper

clear(self)
has_key(self, a0: AimsVector_S16_3) bool
items()
iteritems()
keys(self) Tuple
size(self) int
clear(self)
erase(self, a0: int)
erase(self, a0: AimsVector_S16_3) None
fromObject(a0: carto.GenericObject) rc_ptr_BucketMap_S32
header(self) Any

The header contains all meta-data.

insert(self, a0: AimsVector_S16_3, a1: int = int())
insert(self, t: int, a1: AimsVector_S16_3, a2: int = int()) None
items()
iteritems()
keys(self) List
merge(self, a0: BucketMap_S32)
rcToObject(self) carto.Object
setSizeT(self, a0: float)
setSizeX(self, a0: float)
setSizeXYZT(self, a0: float, a1: float, a2: float, a3: float)
setSizeY(self, a0: float)
setSizeZ(self, a0: float)
size(self) int
sizeT(self) float
sizeX(self) float
sizeY(self) float
sizeZ(self) float
class soma.aims.BucketMap_U16
class soma.aims.BucketMap_U16(a0: BucketMap_U16)

Bases: RCObject

class Bucket
class Bucket(a0: BucketMap_U16.Bucket)

Bases: wrapper

clear(self)
has_key(self, a0: AimsVector_S16_3) bool
items()
iteritems()
keys(self) Tuple
size(self) int
clear(self)
erase(self, a0: int)
erase(self, a0: AimsVector_S16_3) None
fromObject(a0: carto.GenericObject) rc_ptr_BucketMap_U16
header(self) Any

The header contains all meta-data.

insert(self, a0: AimsVector_S16_3, a1: int = ::uint16_t())
insert(self, t: int, a1: AimsVector_S16_3, a2: int = ::uint16_t()) None
items()
iteritems()
keys(self) List
merge(self, a0: BucketMap_U16)
rcToObject(self) carto.Object
setSizeT(self, a0: float)
setSizeX(self, a0: float)
setSizeXYZT(self, a0: float, a1: float, a2: float, a3: float)
setSizeY(self, a0: float)
setSizeZ(self, a0: float)
size(self) int
sizeT(self) float
sizeX(self) float
sizeY(self) float
sizeZ(self) float
class soma.aims.BucketMap_U32
class soma.aims.BucketMap_U32(a0: BucketMap_U32)

Bases: RCObject

class Bucket
class Bucket(a0: BucketMap_U32.Bucket)

Bases: wrapper

clear(self)
has_key(self, a0: AimsVector_S16_3) bool
items()
iteritems()
keys(self) Tuple
size(self) int
clear(self)
erase(self, a0: int)
erase(self, a0: AimsVector_S16_3) None
fromObject(a0: carto.GenericObject) rc_ptr_BucketMap_U32
header(self) Any

The header contains all meta-data.

insert(self, a0: AimsVector_S16_3, a1: int = uint())
insert(self, t: int, a1: AimsVector_S16_3, a2: int = uint()) None
items()
iteritems()
keys(self) List
merge(self, a0: BucketMap_U32)
rcToObject(self) carto.Object
setSizeT(self, a0: float)
setSizeX(self, a0: float)
setSizeXYZT(self, a0: float, a1: float, a2: float, a3: float)
setSizeY(self, a0: float)
setSizeZ(self, a0: float)
size(self) int
sizeT(self) float
sizeX(self) float
sizeY(self) float
sizeZ(self) float
class soma.aims.BucketMap_VOID
class soma.aims.BucketMap_VOID(a0: BucketMap_VOID)

Bases: RCObject

class Bucket
class Bucket(a0: BucketMap_VOID.Bucket)

Bases: wrapper

clear(self)
has_key(self, a0: AimsVector_S16_3) bool
items()
iteritems()
keys(self) Tuple
size(self) int
clear(self)
erase(self, a0: int)
erase(self, a0: AimsVector_S16_3) None
fromObject(a0: carto.GenericObject) rc_ptr_BucketMap_VOID
header(self) Any

The header contains all meta-data.

insert(self, a0: AimsVector_S16_3, a1: object = Void())
insert(self, t: int, a1: AimsVector_S16_3, a2: object = Void()) None
items()
iteritems()
keys(self) List
merge(self, a0: BucketMap_VOID)
rcToObject(self) carto.Object
setSizeT(self, a0: float)
setSizeX(self, a0: float)
setSizeXYZT(self, a0: float, a1: float, a2: float, a3: float)
setSizeY(self, a0: float)
setSizeZ(self, a0: float)
size(self) int
sizeT(self) float
sizeX(self) float
sizeY(self) float
sizeZ(self) float
class soma.aims.BucketUtil

Bases: wrapper

Utility class related to buckets

volumeFromBucket(bucket: BucketMap_VOID, borderwidth: int = 0, enable_shift: bool = True)
volume, offser = BucketUtil.volumeFromBucket(bucket, borderwidth=0,

enable_shift=True)

Bucket to volume conversion. Compared to Converter_BucketMap_Volume, this function has options to handle min bounding box, and allows to have borders.

If enable_shift is False, the volume will start at coordinates (0, 0, 0), without an offset (thus the volume may be much lager than needed, or may not contain the whole bucket if it has negative coordinates). In such case, pos is not used (thus passing 0 is OK).

volumeFromBucket(bucket: BucketMap_VOID, bbmin: AimsVector_S16_3, bbmax: AimsVector_S16_3, borderwidth: int = 0) -> rc_ptr_Volume_S16 volume = BucketUtil.volumeFromBucket(bucket, bbmin, bmax, borderwidth=0)

Bucket to volume conversion. Compared to Converter_BucketMap_Volume, this function has options to handle bounding box, and allows to have borders.

class soma.aims.BundleInfo
class soma.aims.BundleInfo(name: object)
class soma.aims.BundleInfo(id: int)
class soma.aims.BundleInfo(id: int, name: object)
class soma.aims.BundleInfo(a0: aims.BundleInfo)

Bases: wrapper

id(self) int
name(self) object
class soma.aims.BundleListener

Bases: wrapper

Serial processing of bundles.

BundleListener listens events from a BundleProducer object, typically emitted when a new bundle starts or ends, a fiber starts or ends etc.

To use it, BundleListener has to be subclassed and some of the following methods overloaded: * bundleStarted * bundleTerminated * fiberStarted * fiberTerminated * newFiberPoint * noMoreBundle

To connect the listener to a producer, use BundleProducer::addBundleListener().

Inherited classes may inherit both BundleListener and BundleProducer, if they are part of a processing chain.

bundleStarted(self, a0: aims.BundleProducer, a1: aims.BundleInfo)
bundleStarted(producer, bundle_info) None
bundleTerminated(self, a0: aims.BundleProducer, a1: aims.BundleInfo)
bundleTerminated(producer, bundle_info) None
fiberStarted(self, a0: aims.BundleProducer, a1: aims.BundleInfo, a2: aims.FiberInfo)
fiberStarted(producer, bundle_info, fiber_info) None
fiberTerminated(self, a0: aims.BundleProducer, a1: aims.BundleInfo, a2: aims.FiberInfo)
fiberTerminated(producer, bundle_info, fiber_info) None
newFiberPoint(self, a0: aims.BundleProducer, a1: aims.BundleInfo, a2: aims.FiberInfo, a3: AimsVector_FLOAT_3)
newFiberPoint(producer, bundle_info, fiber_info, point) None
noMoreBundle(self, a0: aims.BundleProducer)
noMoreBundle(producer) None
class soma.aims.BundleMotion(a0: object)
class soma.aims.BundleMotion(a0: aims.AffineTransformation3d)
class soma.aims.BundleMotion(a0: aims.BundleMotion)

Bases: BundleProducer, BundleListener

class soma.aims.BundleProducer

Bases: wrapper

Serial processing of bundles.

BundleProducer emits events to a BundleListener object while walking through a bundles set structure (or a bundles file), typically when a new bundle starts or ends, a fiber starts or ends etc.

To connect the listener to a producer, use BundleProducer::addBundleListener().

Inherited classes may inherit both BundleListener and BundleProducer, if they are part of a processing chain.

addBundleListener(self, a0: aims.BundleListener)
addBundleListener(listener) None

Connects a BundleProducer to a BunsdleListener.

addFiberPoint(self, a0: aims.BundleInfo, a1: aims.FiberInfo, a2: AimsVector_FLOAT_3)
noMoreBundle(self)
startBundle(self, a0: aims.BundleInfo)
startFiber(self, a0: aims.BundleInfo, a1: aims.FiberInfo)
terminateBundle(self, a0: aims.BundleInfo)
terminateFiber(self, a0: aims.BundleInfo, a1: aims.FiberInfo)
class soma.aims.BundleROISelect(roiIterator: carto.rc_ptr_RoiIterator, a1: object, defaultROIMinimumOverlap: float = 0)
class soma.aims.BundleROISelect(a0: aims.BundleROISelect)

Bases: BundleProducer, BundleListener

class soma.aims.BundleROISplit(roiIterator: carto.rc_ptr_RoiIterator, keepOriginalBundle: bool = False)
class soma.aims.BundleROISplit(a0: aims.BundleROISplit)

Bases: BundleProducer, BundleListener

class soma.aims.BundleReader

Bases: BundleProducer

Reads a bundles file, and emits events while walking through its data.

BundleReader is a BundleProducer, so can be listened by any BundleListener. It may read several bundles/fibers formats, using a lower-level BundleProducer dedicated to a specific format.

Currently .bundles (AIMS/Connectomist) and .trk (Trackvis) formats are supported.

formatExtensions(format: object = 'ALL') set_STRING
formatExtensions(format='ALL') None

return a set of file extensions associated with the given format. If the format is “ALL” (default) then all extensions of all supported formats are returned. If the format does not exist, an empty set is returned, and no error is issued.

read(self)
read() None

read() is the entry point to fibers processing, and triggers the producer machinery.

supportedFormats() set_STRING
supportedFormats() None

return a set of fiber tracts formats names supported by the BundlesReader.

class soma.aims.BundleSampler(percent: float, bundle_name: object, sampled_bundle_name: object, mode: int)
class soma.aims.BundleSampler(percent: float, bundle_name: object, sampled_bundle_name: object, mode: int, discarded: bool)
class soma.aims.BundleSampler(a0: aims.BundleSampler)

Bases: BundleProducer, BundleListener

class soma.aims.BundleToGraph

Bases: BundleListener, PropertySet

Bundles structure building as a Graph

The Graph structure is used to represent bundles and fibers when we need to keep their complete structure in memory. This structure is especially used for 3D rendering in Anatomist.

BundleToGraph is a BundleListener, thus has to be connected to a BundleProducer to work (typically, a BundleReader).

Note that the BundleProducer / BundleListener system work as processing chains, and allows to keep only a small set of data in memory at one time. The Graph structure, on the contrary, keeps all information in memory, so may need a large amount of memory.

class soma.aims.BundleToGraphWriter
class soma.aims.BundleToGraphWriter(a0: aims.BundleToGraphWriter)

Bases: BundleToGraph

setFileString(self, a0: object)
class soma.aims.BundleWriter

Bases: BundleListener, PropertySet

Writes bundles information to a bundles file.

BundleWriter is a BundleListener, thus must be connected to a BundleProducer, and is fed by it.

It will write the .bundles format.

setFileString(self, a0: object)
setFileString(filename) None

Set the output file name.

class soma.aims.BundlesSlicer
class soma.aims.BundlesSlicer(a0: aims.BundlesSlicer)

Bases: BundleListener

addBundlesSlicerListener(self, a0: aims.BundlesSlicerListener)
class soma.aims.BundlesSlicerListener
class soma.aims.BundlesSlicerListener(a0: aims.BundlesSlicerListener)

Bases: wrapper

newBundleSlice(self, slicer: aims.BundlesSlicer, bundle: aims.BundleInfo, time: float, points: vector_POINT3DF)
noMoreBundleSlice(self, slicer: aims.BundlesSlicer)
startBundleSlicing(self, slicer: aims.BundlesSlicer, bundle: aims.BundleInfo)
terminateBundleSlicing(self, slicer: aims.BundlesSlicer, bundle: aims.BundleInfo)
class soma.aims.CiftiTools(matrix: rc_ptr_SparseOrDenseMatrix, smap: object = aims.CiftiTools.BrainStuctureToMeshMap())
class soma.aims.CiftiTools(matrix, smap={})

Bases: wrapper

Parameters:
  • mat (rc_ptr_SparseOrDenseMatrix) – matrix with CIFTI header (typically, read from CIFTI format via aims.read())

  • smap (map_STRING_S32) – brain structure name to mesh number map: defaults to the result of defaultBrainStructureToMeshMap()

  • aims.CiftiTools(a0 (aims.CiftiTools))

  • tools. (CIFTI-2 shaped matrices manipulation)

  • with (This class eases manipulation of matrices (SparseOrDenseMatrix))

  • nature (CIFTI information in their header. CIFTI information specify the)

  • matrix (of data contained in the)

  • parcellations (and can bring ROIs or)

  • information.

  • meshes. (Mainly one can obtain textures to map matrix information onto)

  • textures (Textures may be ROI information (label)

  • TimeTexture_S32)

:param : :param or matrix values textures: :param possibly expanded onto brain regions: :param (TimeTexture_FLOAT in this case).:

brainStructureMap(self) object
buildDimensionObjectFromLabelsTexture(self, dim: int, tex: TimeTexture_FLOAT)
buildDimensionObjectFromLabelsTexture(self, dim: int, tex: TimeTexture_S16) None
buildDimensionObjectFromLabelsTexture(self, dim: int, tex: TimeTexture_S32) None
defaultBrainStructureToMeshMap() object
defaultBrainStructureToMeshMap() None

Define the brain structure to mesh mapping: several meshes may be involved in CIFTI data mapping (typically a left hemisphere mesh and a right

Returns:

mesh_map – mesh identifier to index mapping

Return type:

map_STRING_S32

dimensionType(cifti_info: carto.Object, dim: int) object
dimensionType(self, dim: int) object
expandedValueTextureFromDimension(self, dim: int, other_dim_index_pos: vector_S32) List
expandedValueTextureFromDimension(dim, other_dim_index_pos) None

Get matrix data in textures, possibly expanded to regions if needed.

Parcels data will be expanded to all vertices of each parcel, etc. The resulting textures can be mapped on appropriate brain meshes.

Parameters:
  • dim (int) – dimension in the matrix to get info for

  • other_dim_index_pos (vector_S32) – position in fixed dimensions. Actually all dimensions must be specified (the size of this list must match the number of dimensions) but the specified dimension position will not be used (since all values will be extracted in textures), and possibly another one (scalars, series, labels dimension will be extracted in time steps or several textures).

Returns:

textures – Scalar or time series data will be stored in texture timepoints. Labels data will be stored in separate textures because they provide possibly different colormaps. In this case the returned list will have the size meshes_number * labels_number, and will be stored in this order: [mesh0_label0, mesh1_label0, .. meshN_label0, mesh0_label1, ..

meshN_label1, .. mesh0_label0, .. meshN_labelM]

Return type:

list of TimeTexture_FLOAT

getBrainStructureMeshNumberOfNodes(self, dim: int, struct_name: object) int
getBrainStructures(self, dim: int, keepSurfaces: bool = True, keepVoxels: bool = True) list_STRING
getBrainStructures(dim, keepSurfaces=True, keepVoxels=True) None

Retreive brain structures list in a brain models dimension

Parameters:
  • dim (int) – dimension in Cifti matrix

  • keepSurfaces (bool) – keep or filter out surface models

  • keepVoxels (bool) – keep or filter out voxesl models

Returns:

brain_structures – brain structures names list

Return type:

list of string

getDimensionObject(self, dim: int) carto.Object
getIndicesForBrainStructure(self, dim: int, struct_name: object) vector_S32
getIndicesForBrainStructure(dim, struct_name) None

Get the list of indices corresponding to a given brain structure in the matrix, on a given dimension.

getIndicesForSurfaceIndices(self, dim: int, surface_num: int, roi_indices: vector_S32) vector_S32
getIndicesForSurfaceIndices(dim, surface_num, roi_indices) None

Get the list of matrix indices corresponding to a given region on a mesh, for a given dimension.

Parameters:
  • dim (int) – matrix dimension

  • surface_num (int) – surface number (same as given by brainStructureMap())

  • roi_indices (list or array of int) – indices in the surface mesh of vertices if interest

Returns:

indices – list of indices in the matrix

Return type:

vector_S32

isMatchingSurface(self, dim: int, mesh: AimsTimeSurface_3_VOID, brainmodels: list_STRING, surf_hint: int = 0)
isMatchingSurfaceOrTexture(self, dim: int, nvertices: int, header: carto.Object, brainmodels: list_STRING, surf_hint: int = 0)
isMatchingTexture(self, dim: int, tex: TimeTexture_S16, brainmodels: list_STRING, surf_hint: int = 0)
isMatchingTexture(self, dim: int, tex: TimeTexture_S32, brainmodels: list_STRING, surf_hint: int = 0) None
isMatchingTexture(self, dim: int, tex: TimeTexture_FLOAT, brainmodels: list_STRING, surf_hint: int = 0) None
matrix(self) rc_ptr_SparseOrDenseMatrix
roiTextureFromDimension(self, dim: int) List
roiTextureFromDimension(dim) None

Get ROI information for a given matrix dimension.

If the matrix dimension defines ROIs (parcels, brain regions), textures defining these regions are built.

If the matrix dimension defines labels, an empty texture will be created, with appropriate colormap information

If the matrix dimensions defines scalars or series, this function will probably not be useful.

Parameters:

dim (int) – dimension in the matrix to get info for

Returns:

textures – textures of regions, possibly with colormaps in headers, for regions, parcels etc. One texture per mesh. For scalars or series, the list will be empty since no particular ROI description is contained in the header for this dimension.

Return type:

list of TimeTexture_S32

setBrainStructureMap(self, smap: object)
setMatrix(self, matrix: rc_ptr_SparseOrDenseMatrix)
valuesDimNum(self) int
valuesDimNum(cifti_info: carto.Object) int
valuesDimSize(mat: aims.SparseOrDenseMatrix, value_dim: int) int
class soma.aims.Connectivity(oline: int, oslice: int, type: aims.Connectivity.Type)
class soma.aims.Connectivity(a0: aims.Connectivity)

Bases: wrapper

CONNECTIVITY_18_XYZ = 7
CONNECTIVITY_26_XYZ = 8
CONNECTIVITY_4_XY = 0
CONNECTIVITY_4_XYdiag = 28
CONNECTIVITY_4_XZ = 1
CONNECTIVITY_4_XZdiag = 29
CONNECTIVITY_4_YZ = 2
CONNECTIVITY_4_YZdiag = 30
CONNECTIVITY_5_XYminus = 17
CONNECTIVITY_5_XYplus = 18
CONNECTIVITY_5_XZminus = 21
CONNECTIVITY_5_XZplus = 22
CONNECTIVITY_5_XminusY = 15
CONNECTIVITY_5_XminusZ = 19
CONNECTIVITY_5_XplusY = 16
CONNECTIVITY_5_XplusZ = 20
CONNECTIVITY_5_YZminus = 25
CONNECTIVITY_5_YZplus = 26
CONNECTIVITY_5_YminusZ = 23
CONNECTIVITY_5_YplusZ = 24
CONNECTIVITY_6_XYZ = 3
CONNECTIVITY_8_XY = 4
CONNECTIVITY_8_XYZ = 27
CONNECTIVITY_8_XZ = 5
CONNECTIVITY_8_YZ = 6
CONNECTIVITY_9_XY_Zminus = 9
CONNECTIVITY_9_XY_Zplus = 10
CONNECTIVITY_9_XZ_Yminus = 11
CONNECTIVITY_9_XZ_Yplus = 12
CONNECTIVITY_9_YZ_Xminus = 13
CONNECTIVITY_9_YZ_Xplus = 14
class Type

Bases: int

dir(self, n: int) AimsVector_FLOAT_3
nbNeighbors(self) int
offset(self, n: int) int
type(self) aims.Connectivity.Type
type_from_string(a0: object) aims.Connectivity.Type
type_string(self) object
type_to_string(a0: aims.Connectivity.Type) object
xyzOffset(self, n: int) AimsVector_S16_3
soma.aims.Converter(*args, **kwargs)[source]

Create a Converter instance from input and output types. Types may be passed as keyword arguments intype and outtype, or dtype if both are the same (not very useful for a converter). Otherwise the arguments are parsed to find types arguments.

Types may be specified as allowed by typeCode().

Note that for volumes, the method astype is often more convenient than using a Converter object (with the same result).

class soma.aims.Converter_BucketMap_DOUBLE_rc_ptr_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_DOUBLE

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_DOUBLE_rc_ptr_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_FLOAT

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_DOUBLE_rc_ptr_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S16

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_DOUBLE_rc_ptr_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S32

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_DOUBLE_rc_ptr_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U16

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_DOUBLE_rc_ptr_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U32

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_DOUBLE_rc_ptr_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U8

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_FLOAT_rc_ptr_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_DOUBLE

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_FLOAT_rc_ptr_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_FLOAT

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_FLOAT_rc_ptr_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S16

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_FLOAT_rc_ptr_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S32

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_FLOAT_rc_ptr_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U16

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_FLOAT_rc_ptr_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U32

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_FLOAT_rc_ptr_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U8

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S16_rc_ptr_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_DOUBLE

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S16_rc_ptr_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_FLOAT

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S16_rc_ptr_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S16

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S16_rc_ptr_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S32

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S16_rc_ptr_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U16

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S16_rc_ptr_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U32

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S16_rc_ptr_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U8

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S32_rc_ptr_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_DOUBLE

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S32_rc_ptr_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_FLOAT

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S32_rc_ptr_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S16

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S32_rc_ptr_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S32

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S32_rc_ptr_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U16

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S32_rc_ptr_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U32

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_S32_rc_ptr_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_S32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U8

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U16_rc_ptr_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_DOUBLE

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U16_rc_ptr_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_FLOAT

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U16_rc_ptr_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S16

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U16_rc_ptr_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S32

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U16_rc_ptr_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U16

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U16_rc_ptr_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U32

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U16_rc_ptr_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U16) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U8

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U32_rc_ptr_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_DOUBLE

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U32_rc_ptr_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_FLOAT

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U32_rc_ptr_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S16

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U32_rc_ptr_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S32

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U32_rc_ptr_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U16

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U32_rc_ptr_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U32

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_U32_rc_ptr_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_U32) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U8

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_VOID_rc_ptr_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_VOID) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_DOUBLE

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_VOID_rc_ptr_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_VOID) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_FLOAT

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_VOID_rc_ptr_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_VOID) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S16

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_VOID_rc_ptr_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_VOID) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_S32

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_VOID_rc_ptr_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_VOID) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U16

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_VOID_rc_ptr_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_VOID) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U32

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_BucketMap_VOID_rc_ptr_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (BucketMap_VOID) – data to be converted

Returns:

output data – converted data

Return type:

rc_ptr_Volume_U8

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_DOUBLE, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_DOUBLE, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_DOUBLE, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_DOUBLE, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_DOUBLE, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_DOUBLE, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_DOUBLE, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_DOUBLE, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_DOUBLE, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_DOUBLE_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_DOUBLE, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_DOUBLE) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_FLOAT, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_FLOAT, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_FLOAT, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_FLOAT, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_FLOAT, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_FLOAT, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_FLOAT, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_FLOAT, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_FLOAT, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_FLOAT_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_FLOAT, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_FLOAT) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_HSV, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_HSV, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_HSV, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_HSV, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_HSV, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_HSV, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_HSV, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_HSV, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_HSV, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_HSV_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_HSV) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_HSV, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_HSV) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_RGBA, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_RGBA, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_RGBA, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_RGBA, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_RGBA, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_RGBA, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_RGBA, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_RGBA, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_RGBA, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGBA_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGBA) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_RGBA, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGBA) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_RGB, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_RGB, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_RGB, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_RGB, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_RGB, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_RGB, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_RGB, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_RGB, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_RGB, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_RGB_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_RGB) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_RGB, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_RGB) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_S16, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_S16, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_S16, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_S16, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_S16, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_S16, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_S16, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_S16, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_S16, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S16_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_S16, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S16) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_S32, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_S32, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_S32, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_S32, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_S32, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_S32, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_S32, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_S32, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_S32, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_S32_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_S32, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_S32) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_U16, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_U16, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_U16, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_U16, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_U16, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_U16, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_U16, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_U16, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_U16, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U16_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_U16, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U16) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_U32, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_U32, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_U32, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_U32, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_U32, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_U32, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_U32, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_U32, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_U32, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U32_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_U32, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U32) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_DOUBLE

convert(self, a0: Volume_U8, a1: Volume_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_DOUBLE) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_FLOAT

convert(self, a0: Volume_U8, a1: Volume_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_FLOAT) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_HSV

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_HSV

convert(self, a0: Volume_U8, a1: Volume_HSV)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_HSV) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_RGB

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGB

convert(self, a0: Volume_U8, a1: Volume_RGB)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_RGB) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_RGBA

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_RGBA

convert(self, a0: Volume_U8, a1: Volume_RGBA)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_RGBA) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S16

convert(self, a0: Volume_U8, a1: Volume_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_S16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_S32

convert(self, a0: Volume_U8, a1: Volume_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_S32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U16

convert(self, a0: Volume_U8, a1: Volume_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_U16) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U32

convert(self, a0: Volume_U8, a1: Volume_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_U32) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_Volume_U8_Volume_U8

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

Volume_U8

convert(self, a0: Volume_U8, a1: Volume_U8)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
  • input_data (Volume_U8) – data to be converted

  • output_data (Volume_U8) – conversion output will be done into this data

Return type:

None

class soma.aims.Converter_rc_ptr_Volume_DOUBLE_BucketMap_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_DOUBLE

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_DOUBLE_BucketMap_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_FLOAT

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_DOUBLE_BucketMap_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S16

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_DOUBLE_BucketMap_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S32

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_DOUBLE_BucketMap_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U16

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_DOUBLE_BucketMap_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U32

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_DOUBLE_BucketMap_VOID

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_DOUBLE) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_VOID

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_VOID)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_FLOAT_BucketMap_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_DOUBLE

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_FLOAT_BucketMap_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_FLOAT

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_FLOAT_BucketMap_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S16

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_FLOAT_BucketMap_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S32

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_FLOAT_BucketMap_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U16

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_FLOAT_BucketMap_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U32

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_FLOAT_BucketMap_VOID

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_FLOAT) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_VOID

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_VOID)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S16_BucketMap_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_DOUBLE

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S16_BucketMap_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_FLOAT

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S16_BucketMap_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S16

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S16_BucketMap_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S32

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S16_BucketMap_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U16

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S16_BucketMap_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U32

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S16_BucketMap_VOID

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_VOID

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_VOID)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S32_BucketMap_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_DOUBLE

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S32_BucketMap_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_FLOAT

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S32_BucketMap_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S16

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S32_BucketMap_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S32

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S32_BucketMap_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U16

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S32_BucketMap_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U32

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_S32_BucketMap_VOID

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_S32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_VOID

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_VOID)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U16_BucketMap_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_DOUBLE

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U16_BucketMap_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_FLOAT

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U16_BucketMap_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S16

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U16_BucketMap_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S32

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U16_BucketMap_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U16

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U16_BucketMap_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U32

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U16_BucketMap_VOID

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U16) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_VOID

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_VOID)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U32_BucketMap_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_DOUBLE

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U32_BucketMap_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_FLOAT

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U32_BucketMap_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S16

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U32_BucketMap_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S32

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U32_BucketMap_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U16

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U32_BucketMap_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U32

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U32_BucketMap_VOID

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U32) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_VOID

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_VOID)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U8_BucketMap_DOUBLE

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_DOUBLE

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_DOUBLE)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U8_BucketMap_FLOAT

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_FLOAT

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_FLOAT)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U8_BucketMap_S16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S16

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_S16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U8_BucketMap_S32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_S32

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_S32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U8_BucketMap_U16

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U16

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_U16)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U8_BucketMap_U32

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_U32

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_U32)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.Converter_rc_ptr_Volume_U8_BucketMap_VOID

Bases: wrapper

Converter classes can be used using the convert() method, or as a callable object:

result = converter(input_data)

Parameters:

input_data (rc_ptr_Volume_U8) – data to be converted

Returns:

output data – converted data

Return type:

BucketMap_VOID

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_VOID)
convert(input_data, output_data) None

In-place converson inside existing allocated data

Parameters:
Return type:

None

class soma.aims.CurveSelection(minimumLength: float)
class soma.aims.CurveSelection(a0: aims.CurveSelection)

Bases: BundleProducer, BundleListener

class soma.aims.CutMesh

Bases: wrapper

Cut meshes by a plane. The output of the operation is one cut mesh per input mesh, and possibly a border polygon mesh, and a plane intersection mesh.

The plane mesh is not always correct, it is now preferred to use GLU’s tesselation algorithm.

To use it:

  • initialize using a constructor and/or set input parameters (see also the CutTexturedMesh subclasses to handle textured meshes)

  • call cut() or cutBorder(), these are the methods actually doing things

  • get outputs using cutMeshes(), borderLine(), planeMesh() and CutTexturedMesh.cutTextures()

borderLine(self) rc_ptr_AimsTimeSurface_2_VOID
cut(self, buildborderline: bool = True, meshplane: bool = False, checkplane: bool = True)
cutBorder(self, timestep: int = 0)
cutMeshes(self) vector_rc_ptr_AimsTimeSurface_3_VOID
planeMesh(self) rc_ptr_AimsTimeSurface_3_VOID
class soma.aims.Edge(*args, **kwargs)

Bases: GraphObject

hasVertex(self, a0: Vertex | None) bool
vertices(self) Tuple
verticesSize(self) int
class soma.aims.FiberInfo
class soma.aims.FiberInfo(id: int)
class soma.aims.FiberInfo(a0: aims.FiberInfo)

Bases: wrapper

id(self) int
class soma.aims.FileFormatDictionary_AimsTimeSurface_2_VOID
class soma.aims.FileFormatDictionary_AimsTimeSurface_2_VOID(a0: FileFormatDictionary_AimsTimeSurface_2_VOID)

Bases: wrapper

fileExtension(filename: object) object
fileFormat(format: object) FileFormat_AimsTimeSurface_2_VOID | None
formats() set_STRING
init()
registerBaseFormats()
registerFormat(formatID: object, format: FileFormat_AimsTimeSurface_2_VOID | None, extensions: vector_STRING, before: object = '')
unregisterFormat(formatID: object)
class soma.aims.FileFormatDictionary_AimsTimeSurface_3_VOID
class soma.aims.FileFormatDictionary_AimsTimeSurface_3_VOID(a0: FileFormatDictionary_AimsTimeSurface_3_VOID)

Bases: wrapper

fileExtension(filename: object) object
fileFormat(format: object) FileFormat_AimsTimeSurface_3_VOID | None
formats() set_STRING
init()
registerBaseFormats()
registerFormat(formatID: object, format: FileFormat_AimsTimeSurface_3_VOID | None, extensions: vector_STRING, before: object = '')
unregisterFormat(formatID: object)
class soma.aims.FileFormatDictionary_Object
class soma.aims.FileFormatDictionary_Object(a0: FileFormatDictionary_Object)

Bases: wrapper

fileExtension(filename: object) object
fileFormat(format: object) FileFormat_Object | None
formats() set_STRING
init()
registerBaseFormats()
registerFormat(formatID: object, format: FileFormat_Object | None, extensions: vector_STRING, before: object = '')
unregisterFormat(formatID: object)
class soma.aims.FileFormatDictionary_SparseOrDenseMatrix
class soma.aims.FileFormatDictionary_SparseOrDenseMatrix(a0: FileFormatDictionary_SparseOrDenseMatrix)

Bases: wrapper

fileExtension(filename: object) object
fileFormat(format: object) FileFormat_SparseOrDenseMatrix | None
formats() set_STRING
init()
registerBaseFormats()
registerFormat(formatID: object, format: FileFormat_SparseOrDenseMatrix | None, extensions: vector_STRING, before: object = '')
unregisterFormat(formatID: object)
class soma.aims.FileFormatDictionary_Transformation3d
class soma.aims.FileFormatDictionary_Transformation3d(a0: FileFormatDictionary_Transformation3d)

Bases: wrapper

fileExtension(filename: object) object
fileFormat(format: object) FileFormat_Transformation3d | None
formats() set_STRING
init()
registerBaseFormats()
registerFormat(formatID: object, format: FileFormat_Transformation3d | None, extensions: vector_STRING, before: object = '')
unregisterFormat(formatID: object)
class soma.aims.FileFormatDictionary_TransformationGraph3d
class soma.aims.FileFormatDictionary_TransformationGraph3d(a0: FileFormatDictionary_TransformationGraph3d)

Bases: wrapper

fileExtension(filename: object) object
fileFormat(format: object) FileFormat_TransformationGraph3d | None
formats() set_STRING
init()
registerBaseFormats()
registerFormat(formatID: object, format: FileFormat_TransformationGraph3d | None, extensions: vector_STRING, before: object = '')
unregisterFormat(formatID: object)
class soma.aims.FileFormat_AimsTimeSurface_2_VOID
class soma.aims.FileFormat_AimsTimeSurface_2_VOID(a0: FileFormat_AimsTimeSurface_2_VOID)

Bases: wrapper

read(self, filename: object, obj: AimsTimeSurface_2_VOID, context: carto.AllocatorContext, options: carto.Object) bool
read(self, filename: object, context: carto.AllocatorContext, options: carto.Object) AimsTimeSurface_2_VOID | None
write(self, a0: object, a1: AimsTimeSurface_2_VOID, options: carto.Object = carto.none()) bool
class soma.aims.FileFormat_AimsTimeSurface_3_VOID
class soma.aims.FileFormat_AimsTimeSurface_3_VOID(a0: FileFormat_AimsTimeSurface_3_VOID)

Bases: wrapper

read(self, filename: object, obj: AimsTimeSurface_3_VOID, context: carto.AllocatorContext, options: carto.Object) bool
read(self, filename: object, context: carto.AllocatorContext, options: carto.Object) AimsTimeSurface_3_VOID | None
write(self, a0: object, a1: AimsTimeSurface_3_VOID, options: carto.Object = carto.none()) bool
class soma.aims.FileFormat_Object
class soma.aims.FileFormat_Object(a0: FileFormat_Object)

Bases: wrapper

read(self, filename: object, obj: carto.Object, context: carto.AllocatorContext, options: carto.Object) bool
read(self, filename: object, context: carto.AllocatorContext, options: carto.Object) carto.Object | None
write(self, a0: object, a1: carto.Object, options: carto.Object = carto.none()) bool
class soma.aims.FileFormat_SparseOrDenseMatrix
class soma.aims.FileFormat_SparseOrDenseMatrix(a0: FileFormat_SparseOrDenseMatrix)

Bases: wrapper

read(self, filename: object, obj: aims.SparseOrDenseMatrix, context: carto.AllocatorContext, options: carto.Object) bool
read(self, filename: object, context: carto.AllocatorContext, options: carto.Object) aims.SparseOrDenseMatrix | None
write(self, a0: object, a1: aims.SparseOrDenseMatrix, options: carto.Object = carto.none()) bool
class soma.aims.FileFormat_Transformation3d
class soma.aims.FileFormat_Transformation3d(a0: FileFormat_Transformation3d)

Bases: wrapper

read(self, filename: object, obj: soma.Transformation3d, context: carto.AllocatorContext, options: carto.Object) bool
read(self, filename: object, context: carto.AllocatorContext, options: carto.Object) soma.Transformation3d | None
write(self, a0: object, a1: soma.Transformation3d, options: carto.Object = carto.none()) bool
class soma.aims.FileFormat_TransformationGraph3d
class soma.aims.FileFormat_TransformationGraph3d(a0: FileFormat_TransformationGraph3d)

Bases: wrapper

read(self, filename: object, obj: aims.TransformationGraph3d, context: carto.AllocatorContext, options: carto.Object) bool
read(self, filename: object, context: carto.AllocatorContext, options: carto.Object) aims.TransformationGraph3d | None
write(self, a0: object, a1: aims.TransformationGraph3d, options: carto.Object = carto.none()) bool
class soma.aims.Finder
class soma.aims.Finder(a0: aims.Finder)

Bases: wrapper

check(self, a0: object) bool
dataType(self) object
extensions(a0: object) List
finderFormat(format: object) aims.FinderFormat | None
format(self) object
header(self) carto.Object
objectType(self) object
possibleDataTypes(self) vector_STRING
registerFormat(fmtid: object, format: aims.FinderFormat | None, extensions: vector_STRING, before: object = '')
setDataType(self, dat: object)
setFormat(self, format: object)
setHeader(self, hdr: carto.Object)
setObjectType(self, obj: object)
setPossibleDataTypes(self, dt: vector_STRING)
unregisterFormat(format: object)
class soma.aims.FinderFormat
class soma.aims.FinderFormat(a0: aims.FinderFormat)

Bases: wrapper

check(self, filename: object, f: aims.Finder) bool
class soma.aims.GenericHandlers[source]

Bases: object

Static generic handlers used as import rules.

static moveChildren(namespace, extendedModule, referedModule)[source]

This static method is used to move child objects of a referred module to the extended module.

Parameters:
  • namespace (string) – namespace of the referedModule to get objects to move from.

  • extendedModule (ExtendedModule) – ExtendedModule object into which move objects.

  • referedModule (module) – referred module object to get objects to move from.

static removeChildren(namespace, prefixes, extendedModule, referedModule)[source]

This static method is used to remove children from the extended module.

Parameters:
  • namespace (string) – namespace of the referedModule.

  • prefixes (list) – list of prefixes of objects to remove.

  • extendedModule (ExtendedModule) – ExtendedModule object to remove objects from.

  • referedModule (module) – referred module object.

class soma.aims.Graph(a0: object = '')

Bases: GraphObject

addDirectedEdge(self, vertex1: Vertex | None, vertex2: Vertex | None, s: object = '') Edge | None
addEdge(self, vertex1: Vertex | None, vertex2: Vertex | None, s: object = '') Edge | None
addVertex(self, a0: object = '') Vertex | None
clear(self)
cloneVertex(self, a0: Vertex | None) Vertex | None
edges(self) set_EdgePtr
edgesSize(self) int
extract(self, a0: Graph, a1: Any)
hasVertex(self, a0: Vertex | None) bool
isDirected(self) bool
isUndirected(self) bool
loadAllMissingElements(self)
order(self) int
randomVertex(self) Vertex | None
removeEdge(self, edge: Edge | None)
removeVertex(self, a0: Vertex | None)
size(self) int
vertices(self) set_VertexPtr
class soma.aims.GraphManip
class soma.aims.GraphManip(a0: aims.GraphManip)

Bases: wrapper

attributeColor(self, graph: Graph, att: object) vector_S32
buckets2Volume(g: Graph)
completeGraph(a0: Graph)
getICBM2009cTemplateTransform(g: Graph) aims.AffineTransformation3d

transform = aims.GraphManip.getICBM2009cTemplateTransform(graph)

Extract the transformation to the MNI ICBM152 space, shifted to the “most standard” field of view of the template image, the one from the ICBM2009c_nlin_asym template from the MNI. Actually we find various fields of view for the templates. The one we use here is (193, 229, 193). The transform to the “real” ICBM space (0 roughly at AC) is provided in the output transformation header. This space has a fixed transformation with our Aims Talairach, along with the template volume size and voxel size. This space has a fixed transformation with our Aims Talairach. Includes shifts and axes inversions.

getICBMTransform(g: Graph) aims.AffineTransformation3d

transform = aims.GraphManip.getICBMTransform(graph)

Extract the transformation to the MNI ICBM152 space. This space has a fixed transformation with our Aims Talairach.

getPath(from_: Vertex | None, to: Vertex | None) list_EdgePtr
get_element_table(graph: Graph) Any

Get the GraphElementTable as a dict. The dict has the following shape:

{
    syntax_name: {
        id_name: GraphElementCode_object
    }
}

GraphElementCode objects are given as dicts (str, str):

{
    'id': <same_as_key: filename (globals) or attribute for filename (locals)>,
    'attribute': <attribute_name_in_graph_element>,
    'objectType': <type of object>,
    'dataType': <data type of object>,
    'storageType': <'Global', 'Local', or 'GlobalPacked'>,
    'local_file_attribute': <attribute giving the filename for local storage in each graph elememt>,
    'global_index_attribute': <attribute giving the index for global storage in each graph elememt>,
    'global_filename': <filename for global storage>,
    'global_attribute': <attribute>,
    'syntax': <syntax_name>
}
graphFromVolume(vol: rc_ptr_Volume_S16, background: int = 0, trans: object | None = None) Graph | None

graph = graphFromVolume(vol, background=0, trans=None) graphFromVolume(vol, graph, background=0, trans=None,

automaticBackgroundSearch=True)

builds a ROI graph from a volume of labels

graphFromVolume(vol: rc_ptr_Volume_S32, background: int = 0, trans: Optional[object] = None) -> Optional[Graph]

graphFromVolume(vol: rc_ptr_Volume_S16, g: Graph, background: int = 0, trans: Optional[object] = None, automaticBackgroundSearch: bool = True)

graphFromVolume(vol: rc_ptr_Volume_S32, g: Graph, background: int = 0, trans: Optional[object] = None, automaticBackgroundSearch: bool = True)

printGraphElementTable(a0: Graph)
setAttributeColor(graph: Graph, att: object, a2: AimsRGB)
setAttributeColor(graph: Graph, att: object, a2: AimsRGBA) None
setAttributeColor(graph: Graph, att: object, a2: vector_S32) None
storeAims(graph: Graph, vertex: GraphObject | None, attribute: object, obj: rc_ptr_AimsTimeSurface_3_VOID)
storeAims(graph: Graph, vertex: GraphObject | None, attribute: object, obj: rc_ptr_AimsTimeSurface_2_VOID) None
storeAims(graph: Graph, vertex: GraphObject | None, attribute: object, obj: rc_ptr_BucketMap_VOID) None
storeTalairach(g: Graph, m: aims.AffineTransformation3d)
talairach(g: Graph) aims.AffineTransformation3d
volume2Buckets(g: Graph)
class soma.aims.GraphObject(a0: GraphObject)
class soma.aims.GraphObject(a0: object)

Bases: AttributedObject

clone(self) carto.Object
currentValue(self) carto.Object
getScalar(self) float
getString(self) object
has_key(self, a0: object) bool
intKey(self) int
isArray(self) bool
isDictionary(self) bool
isDictionaryIterator(self) bool
isDynArray(self) bool
isIterable(self) bool
isIterator(self) bool
isNone(self) bool
isScalar(self) bool
isString(self) bool
isValid(self) bool
key(self) object
objectIterator(self) carto.Object
size(self) int
type(self) object
class soma.aims.Hierarchy
class soma.aims.Hierarchy(a0: aims.Hierarchy)

Bases: Tree

find(name)
find_color(name, default_color=<class 'KeyError'>)
soma.aims.IOError

alias of OSError

class soma.aims.IOObjectTypesDictionary
class soma.aims.IOObjectTypesDictionary(a0: aims.IOObjectTypesDictionary)

Bases: wrapper

formats(objectType: object, datatype: object) set_STRING
hasType(objtype: object, datatype: object) bool
objectsTypes() Dict
class soma.aims.Interpolator(*args)

Bases: RCObject

isValid(self, a0: float, a1: float, a2: float) bool
isValid(self, a0: AimsVector_FLOAT_3) bool
value(self, a0: float, a1: float, a2: float) float
value(self, a0: AimsVector_FLOAT_3) float
values(self, a0: float, a1: float, a2: float) vector_DOUBLE
values(self, a0: AimsVector_FLOAT_3) vector_DOUBLE
class soma.aims.LightResampler_BOOL

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_BOOL, tr: soma.AffineTransformationBase) rc_ptr_Volume_BOOL
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_BOOL, output: Volume_BOOL, tr: soma.AffineTransformationBase, background: bool = False)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_CDOUBLE

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_CDOUBLE, tr: soma.AffineTransformationBase) rc_ptr_Volume_CDOUBLE
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_CDOUBLE, output: Volume_CDOUBLE, tr: soma.AffineTransformationBase, background: object = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_CFLOAT

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_CFLOAT, tr: soma.AffineTransformationBase) rc_ptr_Volume_CFLOAT
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_CFLOAT, output: Volume_CFLOAT, tr: soma.AffineTransformationBase, background: object = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_DOUBLE

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_DOUBLE, tr: soma.AffineTransformationBase) rc_ptr_Volume_DOUBLE
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_DOUBLE, output: Volume_DOUBLE, tr: soma.AffineTransformationBase, background: float = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_FLOAT

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_FLOAT, tr: soma.AffineTransformationBase) rc_ptr_Volume_FLOAT
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_FLOAT, output: Volume_FLOAT, tr: soma.AffineTransformationBase, background: float = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_HSV

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_HSV, tr: soma.AffineTransformationBase) rc_ptr_Volume_HSV
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_HSV, output: Volume_HSV, tr: soma.AffineTransformationBase, background: AimsHSV = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_POINT3DF

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_POINT3DF, tr: soma.AffineTransformationBase) rc_ptr_Volume_POINT3DF
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_POINT3DF, output: Volume_POINT3DF, tr: soma.AffineTransformationBase, background: AimsVector_FLOAT_3 = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_RGB

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_RGB, tr: soma.AffineTransformationBase) rc_ptr_Volume_RGB
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_RGB, output: Volume_RGB, tr: soma.AffineTransformationBase, background: AimsRGB = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_RGBA

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_RGBA, tr: soma.AffineTransformationBase) rc_ptr_Volume_RGBA
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_RGBA, output: Volume_RGBA, tr: soma.AffineTransformationBase, background: AimsRGBA = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_S16

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_S16, tr: soma.AffineTransformationBase) rc_ptr_Volume_S16
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_S16, output: Volume_S16, tr: soma.AffineTransformationBase, background: int = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_S32

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_S32, tr: soma.AffineTransformationBase) rc_ptr_Volume_S32
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_S32, output: Volume_S32, tr: soma.AffineTransformationBase, background: int = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_U16

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_U16, tr: soma.AffineTransformationBase) rc_ptr_Volume_U16
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_U16, output: Volume_U16, tr: soma.AffineTransformationBase, background: int = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_U32

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_U32, tr: soma.AffineTransformationBase) rc_ptr_Volume_U32
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_U32, output: Volume_U32, tr: soma.AffineTransformationBase, background: int = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.LightResampler_U8

Bases: wrapper

Light, simple resampler used for flipping operations.

Contrarily to Resampler classes in aimsalgo, no interpolation is done, neither in space nor in values. We take the nearest voxel, report its value in the output. This also ensures the conservation of values in flipping operations.

allocateResampledVolume(vol: Volume_U8, tr: soma.AffineTransformationBase) rc_ptr_Volume_U8
getTransformedDims(dims: vector_S32, tr: soma.AffineTransformationBase) vector_S32
getTransformedVoxelSize(vs: vector_FLOAT, tr: soma.AffineTransformationBase) vector_FLOAT
resampleVolume(input: Volume_U8, output: Volume_U8, tr: soma.AffineTransformationBase, background: bytes = 0)
transformHeader(header: carto.Object, tr: soma.AffineTransformationBase) carto.Object

adapt info in header (referential, transformations)

class soma.aims.MaskIterator(*args)

Bases: RCObject

contains(self, a0: AimsVector_S16_3) bool
contains(self, a0: AimsVector_FLOAT_3) bool
isValid(self) bool
next(self)
regionName(self) object
restart(self)
value(self) AimsVector_S16_3
valueMillimeters(self) AimsVector_FLOAT_3
volumeDimension(self) AimsVector_S16_3
voxelSize(self) AimsVector_FLOAT_3
class soma.aims.MassCenters_BOOL(data: rc_ptr_Volume_BOOL, bin: bool = False)
class soma.aims.MassCenters_BOOL(data: rc_ptr_Volume_BOOL, roiIterator: aims.RoiIterator, bin: bool = False)
class soma.aims.MassCenters_BOOL(a0: MassCenters_BOOL)

Bases: wrapper

doit(self, force: bool = False)
infos(self) Any
maskedmasscenter(self, maskIterator: aims.MaskIterator) Any
class soma.aims.MassCenters_DOUBLE(data: rc_ptr_Volume_DOUBLE, bin: bool = False)
class soma.aims.MassCenters_DOUBLE(data: rc_ptr_Volume_DOUBLE, roiIterator: aims.RoiIterator, bin: bool = False)
class soma.aims.MassCenters_DOUBLE(a0: MassCenters_DOUBLE)

Bases: wrapper

doit(self, force: bool = False)
infos(self) Any
maskedmasscenter(self, maskIterator: aims.MaskIterator) Any
class soma.aims.MassCenters_FLOAT(data: rc_ptr_Volume_FLOAT, bin: bool = False)
class soma.aims.MassCenters_FLOAT(data: rc_ptr_Volume_FLOAT, roiIterator: aims.RoiIterator, bin: bool = False)
class soma.aims.MassCenters_FLOAT(a0: MassCenters_FLOAT)

Bases: wrapper

doit(self, force: bool = False)
infos(self) Any
maskedmasscenter(self, maskIterator: aims.MaskIterator) Any
class soma.aims.MassCenters_S16(data: rc_ptr_Volume_S16, bin: bool = False)
class soma.aims.MassCenters_S16(data: rc_ptr_Volume_S16, roiIterator: aims.RoiIterator, bin: bool = False)
class soma.aims.MassCenters_S16(a0: MassCenters_S16)

Bases: wrapper

doit(self, force: bool = False)
infos(self) Any
maskedmasscenter(self, maskIterator: aims.MaskIterator) Any
class soma.aims.MassCenters_S32(data: rc_ptr_Volume_S32, bin: bool = False)
class soma.aims.MassCenters_S32(data: rc_ptr_Volume_S32, roiIterator: aims.RoiIterator, bin: bool = False)
class soma.aims.MassCenters_S32(a0: MassCenters_S32)

Bases: wrapper

doit(self, force: bool = False)
infos(self) Any
maskedmasscenter(self, maskIterator: aims.MaskIterator) Any
class soma.aims.MassCenters_U16(data: rc_ptr_Volume_U16, bin: bool = False)
class soma.aims.MassCenters_U16(data: rc_ptr_Volume_U16, roiIterator: aims.RoiIterator, bin: bool = False)
class soma.aims.MassCenters_U16(a0: MassCenters_U16)

Bases: wrapper

doit(self, force: bool = False)
infos(self) Any
maskedmasscenter(self, maskIterator: aims.MaskIterator) Any
class soma.aims.MassCenters_U32(data: rc_ptr_Volume_U32, bin: bool = False)
class soma.aims.MassCenters_U32(data: rc_ptr_Volume_U32, roiIterator: aims.RoiIterator, bin: bool = False)
class soma.aims.MassCenters_U32(a0: MassCenters_U32)

Bases: wrapper

doit(self, force: bool = False)
infos(self) Any
maskedmasscenter(self, maskIterator: aims.MaskIterator) Any
class soma.aims.MassCenters_U8(data: rc_ptr_Volume_U8, bin: bool = False)
class soma.aims.MassCenters_U8(data: rc_ptr_Volume_U8, roiIterator: aims.RoiIterator, bin: bool = False)
class soma.aims.MassCenters_U8(a0: MassCenters_U8)

Bases: wrapper

doit(self, force: bool = False)
infos(self) Any
maskedmasscenter(self, maskIterator: aims.MaskIterator) Any
soma.aims.Motion

alias of AffineTransformation3d

class soma.aims.Object

Bases: rc_ptr_GenericObject

Generic dynamic polymorphic object proxy.

Object is a proxy and a reference counter to a GenericObject. In most cases, Object and GenericObject are interchangeable and play the same role, there are two objects for technical reasons in the C++ layer, but in Python it whould make no difference.

The C++ generic object is an implementation of a mutable dynamic container which can hold any type of concrete data, with a generic access API which abstracts the concrete type of the object stored within it.

According to the underlying object type, Object can behave like a number, a string, or a container: sequence or dictionary. The python bindings can therefore support the sequence protocol, or the dictionary protocol, like a ‘real’ python object.

The only part which makes it visibly different from a python object is the conversions with stored objects, which are generally C++ objects (but can also be any python objects). Transparent conversions are done when possible.

We will take an example to show how to use it: a volume header. Suppose the files volume.img/volume.hdr[/volume.img.minf] represent a 3D volume (a MRI volume, typically, here in Analyze/SPM or Nifti format). We will read it using aims, and access its header data, which comes as a generic object.

>>> from __future__ import print_function # work using python 2 or 3
>>> from soma import aims
>>> vol = aims.read('volume.img')
>>> hdr = vol.header()

Now vol is the volume, and hdr its header, of type Object.

>>> type(hdr)
<class 'soma.aims.Object'>
>>> print(hdr)
{ 'voxel_size' : [ 1.875, 1.875, 4, 1 ], 'file_type' : 'SPM',
'byte_swapping' : 0, 'volume_dimension' : [ 128, 128, 16, 1 ],
'vox_units' : 'mm  ', 'cal_units' : '', 'data_type' : 'S16',
'disk_data_type' : 'S16', 'bits_allocated' : 2, 'tr' : 1,
'minimum' : 0, 'maximum' : 13645, 'scale_factor' : 1,
'scale_factor_applied' : 0, 'db_name' : '',
'aux_file' : '', 'orient' : 3, 'generated' : '', 'scannum' : '',
'patient_id' : '', 'exp_date' : '', 'exp_time' : '', 'views' : 0,
'start_field' : 32768, 'field_skip' : 8192, 'omax' : 0,
'omin' : 0, 'smax' : 32, 'smin' : 0, 'SPM_data_type' : '',
'possible_data_types' : [ 'S16' ], 'spm_radio_convention' : 1,
'spm_origin' : [ 65, 65, 9 ], 'origin' : [ 64, 63, 7 ] }

hdr prints like a dictionary, but is not really a python dictionary object. However it behaves like a dictionary:

>>> print(hdr['voxel_size'])
[ 1.875, 1.875, 4, 1 ]
>>> print(hdr['data_type'])
S16
>>> print(hdr['voxel_size'][0])
1.875
>>> for x in hdr:
>>>     print(x)
>>>
voxel_size
file_type
byte_swapping
volume_dimension
vox_units
cal_units
data_type
disk_data_type
bits_allocated
tr
minimum
maximum
scale_factor
scale_factor_applied
db_name
aux_file
orient
generated
scannum
patient_id
exp_date
exp_time
views
start_field
field_skip
omax
omin
smax
smin
SPM_data_type
possible_data_types
spm_radio_convention
spm_origin
origin
>>> for x,y in hdr.items():
>>>     print(x, ':', y)
>>>
voxel_size : [ 1.875, 1.875, 4, 1 ]
file_type : 'SPM'
byte_swapping : 0
volume_dimension : [ 128, 128, 16, 1 ]
vox_units : 'mm  '
cal_units : ''
data_type : 'S16'
disk_data_type : 'S16'
bits_allocated : 2
tr : 1
minimum : 0
maximum : 13645
scale_factor : 1
scale_factor_applied : 0
db_name : ''
aux_file : ''
orient : 3
generated : ''
scannum : ''
patient_id : ''
exp_date : ''
exp_time : ''
views : 0
start_field : 32768
field_skip : 8192
omax : 0
omin : 0
smax : 32
smin : 0
SPM_data_type : ''
possible_data_types : [ 'S16' ]
spm_radio_convention : 1
spm_origin : [ 65, 65, 9 ]
origin : [ 64, 63, 7 ]

Elements returned by the dictionary queries can have various types, althrough they are all stored internally in a C++ structure through soma.aims.Object wrappers. But when the underlying type of the element is known and can be retreived as a python object (either a standard python type or a python binding of a C++ class), it is done automatically. Such conversion is not possible when the underlying object has no python binding and is a pure C++ object, or when there is no conversion function. In this case, an Object is returned and contains the selected data.

Conversions are done using conversion methods that you generally do not need to call by hand: getScalar(), getString(), or the more general conversion method soma.aims.Object.getPython(). Elements types that cannot be converted to python concrete types are retreived in their Object container.

The generic conversion function in Object: getPython, is a static method and can be extended.

Elements in Object containers can generally be read and written:

>>> hdr['data_type'] = 'FLOAT'
>>> hdr['data_type']
'FLOAT'

This generally suits your needs. But in a few cases there will be a problem in internal types handling in the C++ layer.

Here, the underlying C++ generic object which did hold a C++ string (std::string) 'S16' is now replaced by another generic object built from the python string 'FLOAT', and which now wraps an element of type PyObject (or PyString). It just behaves the same way, so this operation is perfectly valid, but if C++ programs expect it to be a C++ std::string, they may fail.

Moreover, when writing back to existing concrete objects, some additional conversions may take place: for instance hdr['voxel_size'] is a C++ object of type std::vector<float>, so writing to hdr['voxel_size'][0] needs to enure we are actually writing a float, and if not, convert to it if possible.

You can query a type identifier for a generic object via the type() method:

>>> hdr.type()
'PropertySet'

Objects that can be converted from C++ generic objects to python are not necessarily known in advance. A conversion table is kept in the global variable soma.aims.convertersObjectToPython (in the aims module) and can be extended. Therefore other python modules using aims (such as sigraph) can extend this conversion table.

Details and tricks

There are some limitations and “unexpected behaviours” caused by the underlying C++ implementation of generic objects, and general behaviour differences between Python and C++. The following is expert-level details, so read it only if you have problems or you are a C++ expert with good knowledge of the cartobase C++ library…

Generic object - specialized object conversions

Putting a specific object in a generic Object makes a copy of it the first time it is done, because C++ generic objects contain the specialized elements. Once this has been done once, generic objects are shared and not copied anymore, which is consistent with the normal python behaviour. The non-pythonic thing is the first insertion in a generic object:

>>> a = aims.vector_FLOAT([12.6, -5.7])
>>> print(a)
[ 12.6, -5.7 ]
>>> hdr['foo'] = a # here a is copied into hdr['foo']
>>> a.append( 6.8 ) # a is changed but not hdr
>>> print(a)
[ 12.6, -5.7, 6.8 ]
>>> print(hdr['foo'])
[ 12.6, -5.7 ]
>>> hdr['dummy'] = hdr['foo']
>>> hdr['foo'].append(4.2)
>>> print(hdr['dummy']) # this time hdr['dummy'] is changed
[ 12.6, -5.7, 4.2 ]

To overcome the first copy problem, you may have to reassign the initial variable to the copy instance:

>>> a = aims.vector_FLOAT([1.2, 2.3, 3.4])
>>> hdr['foo'] = a
>>> a = hdr['foo']
>>> print(hdr['foo'])
[ 1.2, 2.3, 3.4 ]
>>> a[1] = 12.8
>>> print(a)
[ 1.2, 12.8, 3.4 ]
>>> print(hdr['foo'])
[ 1.2, 12.8, 3.4 ]

There are exceptions to this behaviour:

  • pure python objects, like lists or dictionaries are never copied since it is only a pointer to them (the C PyObject * pointer) which is stored.

  • small builtin types: numbers and strings are always copied since they are always converted and copied, not wrapped, when passed from python to C++ and vice versa.

The get() method

On Object the get method is ambiguous and has 2 meanings:

  • get() without arguments is a wrapping to the C++ rc_ptr::get() which returns the underlying wrapped object (here, a GenericObject)

  • get(key, default=None) is the dict-like method that is available on GenericObject since aims 4.6.1.

Depending on the arguments the Object method will redirect to the right one, thus:

myobject.get()            # gets the GenericObject
myobject.get('key')       # gets the dict item under keyt 'key'
myobject.get().get('key') # does both, but this is what the previous line
                          # already does, so the result is the same

To avoid this ambiguity, Object.get() and rc_ptr.get() have been renamed _get() years ago (in aims 4.0 I think) but get() is still present for compatibility. This use (without argument) is obsolete and may be removed in the future.

getPython()

Conversion to python types: extracts what is in the Object (when possible). The global dictionary soma.aims.convertersObjectToPython stores converters

isNone(self) bool
static ptrToObject(x)
static rcToObject(x)
static toObject(x)
soma.aims.Point2d

alias of AimsVector_S16_2

soma.aims.Point2dd

alias of AimsVector_DOUBLE_2

soma.aims.Point2df

alias of AimsVector_FLOAT_2

soma.aims.Point2dl

alias of AimsVector_S64_2

soma.aims.Point2du

alias of AimsVector_U32_2

soma.aims.Point3d

alias of AimsVector_S16_3

soma.aims.Point3dd

alias of AimsVector_DOUBLE_3

soma.aims.Point3df

alias of AimsVector_FLOAT_3

soma.aims.Point3di

alias of AimsVector_S32_3

soma.aims.Point3dl

alias of AimsVector_S64_3

soma.aims.Point3du

alias of AimsVector_U32_3

soma.aims.Point4d

alias of AimsVector_S16_4

soma.aims.Point4dd

alias of AimsVector_DOUBLE_4

soma.aims.Point4df

alias of AimsVector_FLOAT_4

soma.aims.Point4dl

alias of AimsVector_S64_4

soma.aims.Point4du

alias of AimsVector_U32_4

class soma.aims.Quaternion
class soma.aims.Quaternion(q: AimsVector_FLOAT_4)
class soma.aims.Quaternion(q: aims.Quaternion)
class soma.aims.Quaternion(x: float, y: float, z: float, t: float)
class soma.aims.Quaternion(tr: aims.AffineTransformation3d)

Bases: wrapper

angle(self) float
axis(self) AimsVector_FLOAT_3
buildFromMatrix(self, m: vector_FLOAT)
buildFromMatrix(m) None
Parameters:

m (vector_FLOAT) – 4x4 matrix in columns (OpenGL-style). Be careful that it is not the expected order for a numpy array using ravel(), which have to be transposed.

buildFromMotion(self, m: aims.AffineTransformation3d)
buildFromTransformation(self, m: aims.AffineTransformation3d)
compose(value, /)

Return self*value.

fromAxis(self, c: AimsVector_FLOAT_3, phi: float)
inverse(self) aims.Quaternion
norm(self)
normalized(self) aims.Quaternion
setVector(self, vec: AimsVector_FLOAT_4)
transform(self, p: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transform(self, x: float, y: float, z: float) AimsVector_FLOAT_3
transformInverse(self, p: AimsVector_FLOAT_3) AimsVector_FLOAT_3
vector(self) AimsVector_FLOAT_4
class soma.aims.RawConverter_BucketMap_VOID_rc_ptr_Volume_S16(timeislabel: bool = False, withConstantValue: bool = False, value: int = 0)
class soma.aims.RawConverter_BucketMap_VOID_rc_ptr_Volume_S16(a0: RawConverter_BucketMap_VOID_rc_ptr_Volume_S16)

Bases: wrapper

constValue(self) int
convert(self, in_: BucketMap_VOID, out: rc_ptr_Volume_S16)
hasConstantValue(self) bool
printToVolume(self, in_: BucketMap_VOID, out: rc_ptr_Volume_S16, offset: AimsVector_S16_3 = Point3d(0, 0, 0))
setConstValue(self, x: int)
setHasConstValue(self, x: bool)
setTimeIsLabel(self, x: bool)
timeIsLabel(self) bool
class soma.aims.RawConverter_rc_ptr_Volume_S16_BucketMap_VOID(timeislabel: bool = False)
class soma.aims.RawConverter_rc_ptr_Volume_S16_BucketMap_VOID(a0: RawConverter_rc_ptr_Volume_S16_BucketMap_VOID)

Bases: wrapper

convert(self, in_: rc_ptr_Volume_S16, out: BucketMap_VOID)
setTimeIsLabel(self, x: bool)
timeIsLabel(self) bool
class soma.aims.Reader(typemap=None, allocmode=None, options=None)[source]

Bases: object

Generic reader that can theorerically load any SIP-mapped AIMS or Cartograph object. A translation table can be provided to correctly map readers and objects. For quick and simple operations, you can also use the gloabl soma.aims.read() and soma.aims.write() functions, which use a Reader object internally.

typemap can be provided to specify which reader may be used to load objects whose type has been read. A default internal map is present but can be replaced.

The map has 2 modes:

  • object_type : object_type (ex: {'Volume' : 'Volume'} )

  • object_type : dict( data_type : full_type ) (ex: 'Mesh' : { 'VOID' : 'AimsSurfaceTriangle' } )

    A default object_type can be specified if the data_type is not found:

    'Mesh' : { 'VOID' : 'AimsSurfaceTriangle',
                'default_object_type' : 'AimsTimeSurface_3_VOID' }
    

    (and this example corresponds to the default internal map if none is specified)

Parameters:
mapType(iotype, aimstype)[source]

Get the translated type correspondance between identified data type (from IO system) and the data type that will actually be read. This is generally the identity, but a few IO/types allow some variations.

read(filename, border=0, frame=-1, dtype=None, object=None)[source]

Reads the object contained in the file <filename>, whatever the type of the contents of the file. All objects types supported by Aims IO system can be read. A border width and a frame number may be specified and will be only used by formats that support them. If <dtype> is specified, the corresponding object/data type is forced. It may be useful to force reading a volume with float voxels for instance. It is only supported by a few formats. <dtype> may contain a string or a type object, as accepted by soma.aims.typeCode(). The read function may follow other object/data types rules, allocators and options, as specified in the Reader constructor.

Parameters:
  • filename (str)

  • border (int)

  • frame (int)

  • dtype

  • object (existing object to be read/filled) – If not specified the function will return a new object. If specified, this is considered the existing object to be read and filled by the reader.

class soma.aims.Replacer_FLOAT

Bases: wrapper

Replacement of (label) values in a volume.

Values are replaced at once, thus it does not suffer from overlapping values if ivol is ovol (which would happen for instance in a loop replacing one value after another).

replace(ivol: Volume_FLOAT, ovol: Volume_FLOAT, repl: object)
replace(ivol, ovol, repl) None

Replace values from “repl” keys, from the input volume ivol, to the corresponding repl values in the output volume ovol.

Only actually replaced values will be written in ovol, other will be left untouched.

It is OK to specify the same volume as ivol and ovol, then it will be replaced in-place.

class soma.aims.Replacer_S16

Bases: wrapper

Replacement of (label) values in a volume.

Values are replaced at once, thus it does not suffer from overlapping values if ivol is ovol (which would happen for instance in a loop replacing one value after another).

replace(ivol: Volume_S16, ovol: Volume_S16, repl: object)
replace(ivol, ovol, repl) None

Replace values from “repl” keys, from the input volume ivol, to the corresponding repl values in the output volume ovol.

Only actually replaced values will be written in ovol, other will be left untouched.

It is OK to specify the same volume as ivol and ovol, then it will be replaced in-place.

class soma.aims.Replacer_S32

Bases: wrapper

Replacement of (label) values in a volume.

Values are replaced at once, thus it does not suffer from overlapping values if ivol is ovol (which would happen for instance in a loop replacing one value after another).

replace(ivol: Volume_S32, ovol: Volume_S32, repl: object)
replace(ivol, ovol, repl) None

Replace values from “repl” keys, from the input volume ivol, to the corresponding repl values in the output volume ovol.

Only actually replaced values will be written in ovol, other will be left untouched.

It is OK to specify the same volume as ivol and ovol, then it will be replaced in-place.

class soma.aims.Replacer_U16

Bases: wrapper

Replacement of (label) values in a volume.

Values are replaced at once, thus it does not suffer from overlapping values if ivol is ovol (which would happen for instance in a loop replacing one value after another).

replace(ivol: Volume_U16, ovol: Volume_U16, repl: object)
replace(ivol, ovol, repl) None

Replace values from “repl” keys, from the input volume ivol, to the corresponding repl values in the output volume ovol.

Only actually replaced values will be written in ovol, other will be left untouched.

It is OK to specify the same volume as ivol and ovol, then it will be replaced in-place.

class soma.aims.Replacer_U32

Bases: wrapper

Replacement of (label) values in a volume.

Values are replaced at once, thus it does not suffer from overlapping values if ivol is ovol (which would happen for instance in a loop replacing one value after another).

replace(ivol: Volume_U32, ovol: Volume_U32, repl: object)
replace(ivol, ovol, repl) None

Replace values from “repl” keys, from the input volume ivol, to the corresponding repl values in the output volume ovol.

Only actually replaced values will be written in ovol, other will be left untouched.

It is OK to specify the same volume as ivol and ovol, then it will be replaced in-place.

class soma.aims.RoiDiff
class soma.aims.RoiDiff(a0: aims.RoiDiff)

Bases: wrapper

class DiffStat
class DiffStat(a0: aims.RoiDiff.DiffStat)

Bases: wrapper

dice
g2_bucket
matching_voxels
unmatching_voxels
diff(self, g1: Graph, g2: Graph)
globalStats(self) aims.RoiDiff.DiffStat
graph2LabelVolume(self) rc_ptr_Volume_S16
mismatch_bucket(self) rc_ptr_BucketMap_VOID
roiNames(self) vector_STRING
roiNamesInv(self) object
statsByLabel(self, label: object) aims.RoiDiff.DiffStat | None
writeCSV(self, name: object)
class soma.aims.RoiIterator(*args)

Bases: RCObject

count(self) int
isValid(self) bool
maskIterator(self) carto.rc_ptr_MaskIterator
next(self)
regionName(self) object
restart(self)
setRegionNameAttributes(self, a0: vector_STRING)
setRegionNameAttributes(attributes) None

set region name attribute in graph. Normally “name” or “label”. If several values are provided, attributes are searched in each graph vertex, in that order. If the attributes list is empty, then the graph “label_property” attribute will be used, and if it is not specified there, the default search list (“name”, “label”) will be used.

setRegionNameAttributes(self, a0: object)

soma.aims.ShallowConverter(*args, **kwargs)[source]

Create a ShallowConverter instance from input and output types. Types may be passed as keyword arguments intype and outtype, or dtype if both are the same (not very useful for a converter). Otherwise the arguments are parsed to find types arguments.

Types may be specified as allowed by typeCode().

Note that for volumes, the method astype is often more convenient than using a Converter object (with the same result).

class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_DOUBLE(a0: ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_DOUBLE)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_FLOAT(a0: ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_FLOAT)

Bases: wrapper

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_FLOAT)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_S16(a0: ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_S16)

Bases: wrapper

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_S16)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_S32(a0: ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_S32)

Bases: wrapper

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_S32)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U16(a0: ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U16)

Bases: wrapper

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_U16)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U32(a0: ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U32)

Bases: wrapper

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_U32)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U8(a0: ShallowConverter_BucketMap_DOUBLE_rc_ptr_Volume_U8)

Bases: wrapper

convert(self, a0: BucketMap_DOUBLE, a1: rc_ptr_Volume_U8)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_DOUBLE(a0: ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_DOUBLE)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_FLOAT(a0: ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_FLOAT)

Bases: wrapper

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_FLOAT)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_S16(a0: ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_S16)

Bases: wrapper

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_S16)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_S32(a0: ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_S32)

Bases: wrapper

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_S32)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U16(a0: ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U16)

Bases: wrapper

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_U16)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U32(a0: ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U32)

Bases: wrapper

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_U32)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U8(a0: ShallowConverter_BucketMap_FLOAT_rc_ptr_Volume_U8)

Bases: wrapper

convert(self, a0: BucketMap_FLOAT, a1: rc_ptr_Volume_U8)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_DOUBLE(a0: ShallowConverter_BucketMap_S16_rc_ptr_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_DOUBLE)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_FLOAT(a0: ShallowConverter_BucketMap_S16_rc_ptr_Volume_FLOAT)

Bases: wrapper

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_FLOAT)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_S16(a0: ShallowConverter_BucketMap_S16_rc_ptr_Volume_S16)

Bases: wrapper

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_S16)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_S32(a0: ShallowConverter_BucketMap_S16_rc_ptr_Volume_S32)

Bases: wrapper

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_S32)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_U16(a0: ShallowConverter_BucketMap_S16_rc_ptr_Volume_U16)

Bases: wrapper

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_U16)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_U32(a0: ShallowConverter_BucketMap_S16_rc_ptr_Volume_U32)

Bases: wrapper

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_U32)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S16_rc_ptr_Volume_U8(a0: ShallowConverter_BucketMap_S16_rc_ptr_Volume_U8)

Bases: wrapper

convert(self, a0: BucketMap_S16, a1: rc_ptr_Volume_U8)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_DOUBLE(a0: ShallowConverter_BucketMap_S32_rc_ptr_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_DOUBLE)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_FLOAT(a0: ShallowConverter_BucketMap_S32_rc_ptr_Volume_FLOAT)

Bases: wrapper

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_FLOAT)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_S16(a0: ShallowConverter_BucketMap_S32_rc_ptr_Volume_S16)

Bases: wrapper

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_S16)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_S32(a0: ShallowConverter_BucketMap_S32_rc_ptr_Volume_S32)

Bases: wrapper

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_S32)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_U16(a0: ShallowConverter_BucketMap_S32_rc_ptr_Volume_U16)

Bases: wrapper

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_U16)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_U32(a0: ShallowConverter_BucketMap_S32_rc_ptr_Volume_U32)

Bases: wrapper

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_U32)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_S32_rc_ptr_Volume_U8(a0: ShallowConverter_BucketMap_S32_rc_ptr_Volume_U8)

Bases: wrapper

convert(self, a0: BucketMap_S32, a1: rc_ptr_Volume_U8)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_DOUBLE(a0: ShallowConverter_BucketMap_U16_rc_ptr_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_DOUBLE)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_FLOAT(a0: ShallowConverter_BucketMap_U16_rc_ptr_Volume_FLOAT)

Bases: wrapper

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_FLOAT)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_S16(a0: ShallowConverter_BucketMap_U16_rc_ptr_Volume_S16)

Bases: wrapper

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_S16)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_S32(a0: ShallowConverter_BucketMap_U16_rc_ptr_Volume_S32)

Bases: wrapper

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_S32)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_U16(a0: ShallowConverter_BucketMap_U16_rc_ptr_Volume_U16)

Bases: wrapper

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_U16)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_U32(a0: ShallowConverter_BucketMap_U16_rc_ptr_Volume_U32)

Bases: wrapper

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_U32)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U16_rc_ptr_Volume_U8(a0: ShallowConverter_BucketMap_U16_rc_ptr_Volume_U8)

Bases: wrapper

convert(self, a0: BucketMap_U16, a1: rc_ptr_Volume_U8)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_DOUBLE(a0: ShallowConverter_BucketMap_U32_rc_ptr_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_DOUBLE)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_FLOAT(a0: ShallowConverter_BucketMap_U32_rc_ptr_Volume_FLOAT)

Bases: wrapper

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_FLOAT)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_S16(a0: ShallowConverter_BucketMap_U32_rc_ptr_Volume_S16)

Bases: wrapper

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_S16)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_S32(a0: ShallowConverter_BucketMap_U32_rc_ptr_Volume_S32)

Bases: wrapper

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_S32)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_U16(a0: ShallowConverter_BucketMap_U32_rc_ptr_Volume_U16)

Bases: wrapper

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_U16)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_U32(a0: ShallowConverter_BucketMap_U32_rc_ptr_Volume_U32)

Bases: wrapper

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_U32)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_U32_rc_ptr_Volume_U8(a0: ShallowConverter_BucketMap_U32_rc_ptr_Volume_U8)

Bases: wrapper

convert(self, a0: BucketMap_U32, a1: rc_ptr_Volume_U8)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_DOUBLE(a0: ShallowConverter_BucketMap_VOID_rc_ptr_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_DOUBLE)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_FLOAT(a0: ShallowConverter_BucketMap_VOID_rc_ptr_Volume_FLOAT)

Bases: wrapper

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_FLOAT)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_S16(a0: ShallowConverter_BucketMap_VOID_rc_ptr_Volume_S16)

Bases: wrapper

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_S16)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_S32(a0: ShallowConverter_BucketMap_VOID_rc_ptr_Volume_S32)

Bases: wrapper

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_S32)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U16(a0: ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U16)

Bases: wrapper

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_U16)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U32(a0: ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U32)

Bases: wrapper

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_U32)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U8(a0: ShallowConverter_BucketMap_VOID_rc_ptr_Volume_U8)

Bases: wrapper

convert(self, a0: BucketMap_VOID, a1: rc_ptr_Volume_U8)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_DOUBLE(a0: ShallowConverter_Volume_DOUBLE_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_FLOAT(a0: ShallowConverter_Volume_DOUBLE_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_HSV(a0: ShallowConverter_Volume_DOUBLE_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_RGB(a0: ShallowConverter_Volume_DOUBLE_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_RGBA(a0: ShallowConverter_Volume_DOUBLE_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_S16(a0: ShallowConverter_Volume_DOUBLE_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_S32(a0: ShallowConverter_Volume_DOUBLE_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_U16(a0: ShallowConverter_Volume_DOUBLE_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_U32(a0: ShallowConverter_Volume_DOUBLE_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_DOUBLE_Volume_U8(a0: ShallowConverter_Volume_DOUBLE_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_DOUBLE, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_DOUBLE(a0: ShallowConverter_Volume_FLOAT_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_FLOAT(a0: ShallowConverter_Volume_FLOAT_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_HSV(a0: ShallowConverter_Volume_FLOAT_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_RGB(a0: ShallowConverter_Volume_FLOAT_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_RGBA(a0: ShallowConverter_Volume_FLOAT_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_S16(a0: ShallowConverter_Volume_FLOAT_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_S32(a0: ShallowConverter_Volume_FLOAT_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_U16(a0: ShallowConverter_Volume_FLOAT_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_U32(a0: ShallowConverter_Volume_FLOAT_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_FLOAT_Volume_U8(a0: ShallowConverter_Volume_FLOAT_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_FLOAT, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_HSV_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_DOUBLE(a0: ShallowConverter_Volume_HSV_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_HSV_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_FLOAT(a0: ShallowConverter_Volume_HSV_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_HSV_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_HSV(a0: ShallowConverter_Volume_HSV_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_HSV_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_RGB(a0: ShallowConverter_Volume_HSV_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_HSV_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_RGBA(a0: ShallowConverter_Volume_HSV_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_HSV_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_S16(a0: ShallowConverter_Volume_HSV_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_HSV_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_S32(a0: ShallowConverter_Volume_HSV_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_HSV_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_U16(a0: ShallowConverter_Volume_HSV_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_HSV_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_U32(a0: ShallowConverter_Volume_HSV_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_HSV_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_HSV_Volume_U8(a0: ShallowConverter_Volume_HSV_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_HSV, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_DOUBLE(a0: ShallowConverter_Volume_RGBA_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_FLOAT(a0: ShallowConverter_Volume_RGBA_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_HSV(a0: ShallowConverter_Volume_RGBA_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_RGB(a0: ShallowConverter_Volume_RGBA_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_RGBA(a0: ShallowConverter_Volume_RGBA_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_S16(a0: ShallowConverter_Volume_RGBA_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_S32(a0: ShallowConverter_Volume_RGBA_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_U16(a0: ShallowConverter_Volume_RGBA_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_U32(a0: ShallowConverter_Volume_RGBA_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGBA_Volume_U8(a0: ShallowConverter_Volume_RGBA_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_RGBA, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_RGB_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_DOUBLE(a0: ShallowConverter_Volume_RGB_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_RGB_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_FLOAT(a0: ShallowConverter_Volume_RGB_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_RGB_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_HSV(a0: ShallowConverter_Volume_RGB_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_RGB_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_RGB(a0: ShallowConverter_Volume_RGB_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_RGB_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_RGBA(a0: ShallowConverter_Volume_RGB_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_RGB_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_S16(a0: ShallowConverter_Volume_RGB_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_RGB_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_S32(a0: ShallowConverter_Volume_RGB_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_RGB_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_U16(a0: ShallowConverter_Volume_RGB_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_RGB_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_U32(a0: ShallowConverter_Volume_RGB_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_RGB_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_RGB_Volume_U8(a0: ShallowConverter_Volume_RGB_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_RGB, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_S16_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_DOUBLE(a0: ShallowConverter_Volume_S16_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_S16_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_FLOAT(a0: ShallowConverter_Volume_S16_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_S16_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_HSV(a0: ShallowConverter_Volume_S16_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_S16_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_RGB(a0: ShallowConverter_Volume_S16_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_S16_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_RGBA(a0: ShallowConverter_Volume_S16_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_S16_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_S16(a0: ShallowConverter_Volume_S16_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_S16_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_S32(a0: ShallowConverter_Volume_S16_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_S16_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_U16(a0: ShallowConverter_Volume_S16_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_S16_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_U32(a0: ShallowConverter_Volume_S16_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_S16_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S16_Volume_U8(a0: ShallowConverter_Volume_S16_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_S16, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_S32_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_DOUBLE(a0: ShallowConverter_Volume_S32_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_S32_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_FLOAT(a0: ShallowConverter_Volume_S32_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_S32_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_HSV(a0: ShallowConverter_Volume_S32_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_S32_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_RGB(a0: ShallowConverter_Volume_S32_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_S32_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_RGBA(a0: ShallowConverter_Volume_S32_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_S32_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_S16(a0: ShallowConverter_Volume_S32_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_S32_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_S32(a0: ShallowConverter_Volume_S32_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_S32_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_U16(a0: ShallowConverter_Volume_S32_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_S32_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_U32(a0: ShallowConverter_Volume_S32_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_S32_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_S32_Volume_U8(a0: ShallowConverter_Volume_S32_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_S32, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_U16_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_DOUBLE(a0: ShallowConverter_Volume_U16_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_U16_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_FLOAT(a0: ShallowConverter_Volume_U16_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_U16_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_HSV(a0: ShallowConverter_Volume_U16_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_U16_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_RGB(a0: ShallowConverter_Volume_U16_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_U16_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_RGBA(a0: ShallowConverter_Volume_U16_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_U16_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_S16(a0: ShallowConverter_Volume_U16_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_U16_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_S32(a0: ShallowConverter_Volume_U16_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_U16_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_U16(a0: ShallowConverter_Volume_U16_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_U16_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_U32(a0: ShallowConverter_Volume_U16_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_U16_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U16_Volume_U8(a0: ShallowConverter_Volume_U16_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_U16, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_U32_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_DOUBLE(a0: ShallowConverter_Volume_U32_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_U32_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_FLOAT(a0: ShallowConverter_Volume_U32_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_U32_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_HSV(a0: ShallowConverter_Volume_U32_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_U32_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_RGB(a0: ShallowConverter_Volume_U32_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_U32_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_RGBA(a0: ShallowConverter_Volume_U32_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_U32_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_S16(a0: ShallowConverter_Volume_U32_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_U32_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_S32(a0: ShallowConverter_Volume_U32_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_U32_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_U16(a0: ShallowConverter_Volume_U32_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_U32_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_U32(a0: ShallowConverter_Volume_U32_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_U32_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U32_Volume_U8(a0: ShallowConverter_Volume_U32_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_U32, a1: Volume_U8)
class soma.aims.ShallowConverter_Volume_U8_Volume_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_DOUBLE(a0: ShallowConverter_Volume_U8_Volume_DOUBLE)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_DOUBLE)
class soma.aims.ShallowConverter_Volume_U8_Volume_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_FLOAT(a0: ShallowConverter_Volume_U8_Volume_FLOAT)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_FLOAT)
class soma.aims.ShallowConverter_Volume_U8_Volume_HSV(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_HSV(a0: ShallowConverter_Volume_U8_Volume_HSV)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_HSV)
class soma.aims.ShallowConverter_Volume_U8_Volume_RGB(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_RGB(a0: ShallowConverter_Volume_U8_Volume_RGB)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_RGB)
class soma.aims.ShallowConverter_Volume_U8_Volume_RGBA(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_RGBA(a0: ShallowConverter_Volume_U8_Volume_RGBA)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_RGBA)
class soma.aims.ShallowConverter_Volume_U8_Volume_S16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_S16(a0: ShallowConverter_Volume_U8_Volume_S16)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_S16)
class soma.aims.ShallowConverter_Volume_U8_Volume_S32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_S32(a0: ShallowConverter_Volume_U8_Volume_S32)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_S32)
class soma.aims.ShallowConverter_Volume_U8_Volume_U16(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_U16(a0: ShallowConverter_Volume_U8_Volume_U16)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_U16)
class soma.aims.ShallowConverter_Volume_U8_Volume_U32(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_U32(a0: ShallowConverter_Volume_U8_Volume_U32)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_U32)
class soma.aims.ShallowConverter_Volume_U8_Volume_U8(a0: bool = False)
class soma.aims.ShallowConverter_Volume_U8_Volume_U8(a0: ShallowConverter_Volume_U8_Volume_U8)

Bases: wrapper

convert(self, a0: Volume_U8, a1: Volume_U8)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_DOUBLE(a0: ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_DOUBLE)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_DOUBLE)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_FLOAT(a0: ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_FLOAT)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_FLOAT)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_S16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_S16(a0: ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_S16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_S16)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_S32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_S32(a0: ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_S32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_S32)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_U16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_U16(a0: ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_U16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_U16)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_U32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_U32(a0: ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_U32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_U32)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_VOID(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_VOID(a0: ShallowConverter_rc_ptr_Volume_DOUBLE_BucketMap_VOID)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_DOUBLE, a1: BucketMap_VOID)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_DOUBLE(a0: ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_DOUBLE)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_DOUBLE)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_FLOAT(a0: ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_FLOAT)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_FLOAT)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_S16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_S16(a0: ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_S16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_S16)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_S32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_S32(a0: ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_S32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_S32)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_U16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_U16(a0: ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_U16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_U16)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_U32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_U32(a0: ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_U32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_U32)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_VOID(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_VOID(a0: ShallowConverter_rc_ptr_Volume_FLOAT_BucketMap_VOID)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_FLOAT, a1: BucketMap_VOID)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_DOUBLE(a0: ShallowConverter_rc_ptr_Volume_S16_BucketMap_DOUBLE)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_DOUBLE)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_FLOAT(a0: ShallowConverter_rc_ptr_Volume_S16_BucketMap_FLOAT)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_FLOAT)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_S16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_S16(a0: ShallowConverter_rc_ptr_Volume_S16_BucketMap_S16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_S16)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_S32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_S32(a0: ShallowConverter_rc_ptr_Volume_S16_BucketMap_S32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_S32)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_U16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_U16(a0: ShallowConverter_rc_ptr_Volume_S16_BucketMap_U16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_U16)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_U32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_U32(a0: ShallowConverter_rc_ptr_Volume_S16_BucketMap_U32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_U32)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_VOID(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S16_BucketMap_VOID(a0: ShallowConverter_rc_ptr_Volume_S16_BucketMap_VOID)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S16, a1: BucketMap_VOID)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_DOUBLE(a0: ShallowConverter_rc_ptr_Volume_S32_BucketMap_DOUBLE)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_DOUBLE)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_FLOAT(a0: ShallowConverter_rc_ptr_Volume_S32_BucketMap_FLOAT)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_FLOAT)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_S16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_S16(a0: ShallowConverter_rc_ptr_Volume_S32_BucketMap_S16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_S16)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_S32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_S32(a0: ShallowConverter_rc_ptr_Volume_S32_BucketMap_S32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_S32)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_U16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_U16(a0: ShallowConverter_rc_ptr_Volume_S32_BucketMap_U16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_U16)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_U32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_U32(a0: ShallowConverter_rc_ptr_Volume_S32_BucketMap_U32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_U32)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_VOID(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_S32_BucketMap_VOID(a0: ShallowConverter_rc_ptr_Volume_S32_BucketMap_VOID)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_S32, a1: BucketMap_VOID)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_DOUBLE(a0: ShallowConverter_rc_ptr_Volume_U16_BucketMap_DOUBLE)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_DOUBLE)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_FLOAT(a0: ShallowConverter_rc_ptr_Volume_U16_BucketMap_FLOAT)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_FLOAT)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_S16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_S16(a0: ShallowConverter_rc_ptr_Volume_U16_BucketMap_S16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_S16)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_S32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_S32(a0: ShallowConverter_rc_ptr_Volume_U16_BucketMap_S32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_S32)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_U16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_U16(a0: ShallowConverter_rc_ptr_Volume_U16_BucketMap_U16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_U16)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_U32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_U32(a0: ShallowConverter_rc_ptr_Volume_U16_BucketMap_U32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_U32)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_VOID(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U16_BucketMap_VOID(a0: ShallowConverter_rc_ptr_Volume_U16_BucketMap_VOID)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U16, a1: BucketMap_VOID)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_DOUBLE(a0: ShallowConverter_rc_ptr_Volume_U32_BucketMap_DOUBLE)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_DOUBLE)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_FLOAT(a0: ShallowConverter_rc_ptr_Volume_U32_BucketMap_FLOAT)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_FLOAT)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_S16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_S16(a0: ShallowConverter_rc_ptr_Volume_U32_BucketMap_S16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_S16)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_S32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_S32(a0: ShallowConverter_rc_ptr_Volume_U32_BucketMap_S32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_S32)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_U16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_U16(a0: ShallowConverter_rc_ptr_Volume_U32_BucketMap_U16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_U16)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_U32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_U32(a0: ShallowConverter_rc_ptr_Volume_U32_BucketMap_U32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_U32)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_VOID(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U32_BucketMap_VOID(a0: ShallowConverter_rc_ptr_Volume_U32_BucketMap_VOID)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U32, a1: BucketMap_VOID)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_DOUBLE(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_DOUBLE(a0: ShallowConverter_rc_ptr_Volume_U8_BucketMap_DOUBLE)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_DOUBLE)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_FLOAT(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_FLOAT(a0: ShallowConverter_rc_ptr_Volume_U8_BucketMap_FLOAT)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_FLOAT)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_S16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_S16(a0: ShallowConverter_rc_ptr_Volume_U8_BucketMap_S16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_S16)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_S32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_S32(a0: ShallowConverter_rc_ptr_Volume_U8_BucketMap_S32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_S32)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_U16(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_U16(a0: ShallowConverter_rc_ptr_Volume_U8_BucketMap_U16)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_U16)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_U32(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_U32(a0: ShallowConverter_rc_ptr_Volume_U8_BucketMap_U32)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_U32)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_VOID(a0: bool = False)
class soma.aims.ShallowConverter_rc_ptr_Volume_U8_BucketMap_VOID(a0: ShallowConverter_rc_ptr_Volume_U8_BucketMap_VOID)

Bases: wrapper

convert(self, a0: rc_ptr_Volume_U8, a1: BucketMap_VOID)
class soma.aims.SimpleBundlesSlicer(numberOfSlice: int)
class soma.aims.SimpleBundlesSlicer(a0: aims.SimpleBundlesSlicer)

Bases: BundlesSlicer

class soma.aims.SparseMatrix(size1: int = 1, size2: int = 1)
class soma.aims.SparseMatrix(other: aims.SparseMatrix)

Bases: RCObject

erase_element(self, i: int, j: int)
fill(self, value: float)
fill(self, offset1: int, offset2: int, size1: int, size2: int, value: float) None
fill(self, offset1: int, offset2: int, other: aims.SparseMatrix, size1: int = 0, size2: int = 0) None
getColumn(self, j: int) vector_DOUBLE
getComposition(self, other: aims.SparseMatrix) aims.SparseMatrix
getComposition(self, other: vector_DOUBLE) vector_DOUBLE
getNonZeroElementCount(self) int
getRow(self, i: int) vector_DOUBLE
getSize1(self) int
getSize2(self) int
getTrace(self) float
getTransposition(self) aims.SparseMatrix
hasElement(self, i: int, j: int) bool
header(self) carto.Object
isSquare(self) bool
read(self, filename: object, openmode: object = 'binar', bswap: bool = False)
reallocate(self, size1: int, size2: int)
setColumn(self, s2: int, column: vector_DOUBLE)
setDiagonal(self, value: float)
setIdentity(self)
setRow(self, s1: int, row: vector_DOUBLE)
setZero(self)
transpose(self)
write(self, filename: object, openmode: object = 'binar', bswap: bool = False)
class soma.aims.SparseOrDenseMatrix(size1: int = 1, size2: int = 1)
class soma.aims.SparseOrDenseMatrix(other: aims.SparseOrDenseMatrix)

Bases: RCObject

asDense(self, copy: bool = False) rc_ptr_Volume_DOUBLE
asSparse(self, copy: bool = False) rc_ptr_SparseMatrix
denseMatrix(self) rc_ptr_Volume_DOUBLE
erase_element(self, i: int, j: int)
freeColumn(self, i: int)
freeRow(self, i: int)
getColumn(self, j: int) vector_DOUBLE
getNonZeroElementCount(self) int
getRow(self, i: int) vector_DOUBLE
getSize(self) vector_S32
getSize1(self) int
getSize2(self) int
hasElement(self, i: int, j: int) bool
header(self) carto.Object
isDense(self) bool
isOptimalShape(self) bool
muteToDense(self)
muteToOptimalShape(self)
muteToSparse(self)
read(self, filename: object)
readAll(self)
readColumn(self, s1: int)
readRow(self, s1: int)
reallocate(self, size1: int, size2: int)
setColumn(self, s2: int, column: vector_DOUBLE)
setHeader(self, ph: carto.Object)
setMatrix(self, matrix: rc_ptr_SparseMatrix)
setMatrix(self, matrix: rc_ptr_Volume_DOUBLE) None
setRow(self, s1: int, row: vector_DOUBLE)
set_element(self, i: int, j: int, x: float)
sparseMatrix(self) rc_ptr_SparseMatrix
subMatrix(self, start: vector_S32, size: vector_S32) aims.SparseOrDenseMatrix | None
subMatrix(self, indices_along_dims: vector_vector_S32) aims.SparseOrDenseMatrix | None
write(self, filename: object, options: carto.Object = carto.none())
class soma.aims.StandardReferentials
class soma.aims.StandardReferentials(a0: aims.StandardReferentials)

Bases: wrapper

acPcReferential() object
acPcReferential() None

identifer (str) for the Taialairach/AIMS space

acPcReferentialID() object
acPcReferentialID() None

identifer (UUID str) for the Talairach/AIMS space

commonScannerBasedReferential() object
commonScannerBasedReferentialID() object
icbm2009cTemplateHeader() carto.Object

hdr = aims.StandardReferentials.icbm2009cTemplateHeader() Return a header with size and characteristics of the ICBM2009c MNI template volume.

isUUID(refName: object) bool
mniTemplateReferential() object
mniTemplateReferential() None

identifer (str) for the MNI/ICBM space

mniTemplateReferentialID() object
mniTemplateReferentialID() None

identifer (UUID str) for the MNI/ICBM space

referentialID(refName: object, commonScannerBased: bool = False, genNewIds: bool = True, commonSuffix: object = '') object

try to identify referential ID from its string name or description.

for instance “Talairach-MNI template-SPM” will be translated to its AIMS uuid, “803552a6-ac4d-491d-99f5-b938392b674b”

If commonScannerBased is true, then “Scanner-based anatomical coordinates” will be translated to the value of commonScannerBasedReferentialID(), so that other ref names of the same kind will match. If commonScannerBased is false, then a scanner-based ref name will be either translated to a new UUID, or returned unchanged or with a suffix, depending on the values of genNewIds (see below) and commonSuffix. If commonSuffix has a value, it will be appended after the name “Scanner-based anatomical coordinates”.

if genNewIds is true, then: if the refName is an unkwnown referential name (and not an UUID), then a new UUID will be generated for it, each time this function is called: so calling it twice with the same name will result in two distinct IDs. if genNewIds is false, and the refName is not recognized, then it will be returned unchanged.

talairachReferential() object
talairachReferential() None

identifer (str) for the Talairach/CIFTI space

talairachToICBM() aims.AffineTransformation3d
talairachToICBM2009cTemplate() aims.AffineTransformation3d

trans = aims.StandardReferentials.talairachToICBM2009cTemplate()

Transformation between the ICBM152 standard space and the ICBM152 template space.

includes shifts and axes inversions.

This is the “most standard” field of view of the template image, the one from the ICBM2009c_nlin_asym template from the MNI. Actually we find various fields of view for the templates. The one we use here is (193, 229, 193). The transform to the “real” ICBM space (0 roughly at AC) is provided in the output transformation header. This space has a fixed transformation with our Aims Talairach, along with the template volume size and voxel size. This space has a fixed transformation with our Aims Talairach.

class soma.aims.StdOutInhibitorFix[source]

Bases: ResetCallback

class soma.aims.SurfaceGenerator

Bases: wrapper

Surface Generator Object. Available Methods are :

  • cube(center_p, radius_f, smoothnormal_b=false)

  • cylinder(p1_p, p2_p, radius1_f, radius2_f, nfacets_i, closed_b, smooth_b=false)

  • cone(arrow_p, base_p, radius_f, nfacets_i, closed_b, smooth_b=false)

  • arrow(arrow_p, base_p, radius_f, arrowradius_f, nfacets_i, arrowlengthfract_f)

  • icosahedron(center_p, radius_f)

  • sphere(center_p, radius_f, nfacets_i)

  • icosphere(center_p, radius_f, nfacets_i)

With arguments suffix _f:float, _i:int, _b:bool, _p: Point3df or 3-tuple

Alternatively, all those may be called with a GenericObject as only parameter.

This doc might not be up-to-date, use the printDescription() method for more info.

arrow(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static arrow( dictionary ) See the description() and printDescription() methods for more information.

arrow(a0: AimsVector_FLOAT_3, a1: AimsVector_FLOAT_3, a2: float, a3: float, a4: int, a5: float) -> Optional[AimsTimeSurface_3_VOID] static arrow( Point3df arrowhead, Point3df base, float headradius, float arrowradius, unsigned nfaces, float arrowlengthfactor )

circle_wireframe(params: carto.GenericObject) AimsTimeSurface_2_VOID | None

circle_wireframe(center: AimsVector_FLOAT_3, radius: float, nseg: int = 20, normal: AimsVector_FLOAT_3 = Point3df(0, 0, 1), startdir: AimsVector_FLOAT_3 = Point3df(1, 0, 0), startangle: float = 0, stopangle: float = M_PI*2) -> Optional[AimsTimeSurface_2_VOID] Circle, or part of circle.

center, radius are classical. nseg is the number of segments in the circle polygon normal is a normal vector to the circle plane. startdir is a vector in the circle plane determining the beginning of angles (circle ray). startangle, stopangle are meant to make parts of circle

cone(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static cone( dictionary ) See the description() and printDescription() methods for more information.

cone(a0: AimsVector_FLOAT_3, a1: AimsVector_FLOAT_3, a2: float, a3: int, a4: bool, a5: bool = False) -> Optional[AimsTimeSurface_3_VOID] static cone( Point3df arrowhead, Point3df base, float radius, unsigned nfaces, bool closed, bool smooth=False )

cube(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static cube( dictionary ) See the description() and printDescription() methods for more information.

cube(a0: AimsVector_FLOAT_3, a1: float, a2: bool = False) -> Optional[AimsTimeSurface_3_VOID] static cube( Point3df center, float radius, bool smoothnormals=False )

cylinder(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static cylinder( dictionary ) See the description() and printDescription() methods for more information.

cylinder(a0: AimsVector_FLOAT_3, a1: AimsVector_FLOAT_3, a2: float, a3: float, a4: int, a5: bool, a6: bool = False, a7: bool = True) -> Optional[AimsTimeSurface_3_VOID] static cylinder( Point3df center1, Point3df center2, float radius1, float radius2, unsigned nfaces, bool closed, bool smooth=False )

description() carto.Object
description_wireframe() carto.Object
ellipse(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static ellipse( dictionary ) See the description() and printDescription() methods for more information.

ellipse(a0: AimsVector_FLOAT_3, radius1: float, radius2: float, a3: int, a4: bool = False) -> Optional[AimsTimeSurface_3_VOID] static ellipse( Point3df center, float radius1, float radius2, unsigned nfaces, bool uniquevertices=False )

generate(a0: carto.Object) AimsTimeSurface_3_VOID | None
generate(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None
generate_wireframe(a0: carto.Object) AimsTimeSurface_2_VOID | None
generate_wireframe(a0: carto.GenericObject) AimsTimeSurface_2_VOID | None
grid(params: carto.GenericObject) AimsTimeSurface_2_VOID | None
grid(dict) None

See the description() and printDescription() methods for more information.

grid(boundingbox_min: AimsVector_FLOAT_3, boundingbox_max: AimsVector_FLOAT_3, grid_sampling: AimsVector_FLOAT_3) -> Optional[AimsTimeSurface_2_VOID] grid(Point3df boundingbox_min, Point3df boundingbox_max, Point3df grid_sampling) Regular, wireframe grid

icosahedron(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static icosahedron( dictionary ) See the description() and printDescription() methods for more information.

icosahedron(a0: AimsVector_FLOAT_3, a1: float) -> Optional[AimsTimeSurface_3_VOID] static icosahedron( Point3df center, float radius )

icosphere(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None
icosphere(dictionary) None

See the description() and printDescription() methods for more information.

icosphere(a0: AimsVector_FLOAT_3, a1: float, a2: int = 320) -> Optional[AimsTimeSurface_3_VOID] icosphere( Point3df center, float radius, unsigned nfaces=320 )

Compared to sphere() which performs meridian / parallels tesselation, icosphere over-segments an icosahedron to get equal, equilateral triangles.

parallelepiped(params: carto.GenericObject) AimsTimeSurface_3_VOID | None

parallelepiped(boundingbox_min: AimsVector_FLOAT_3, boundingbox_max: AimsVector_FLOAT_3, smooth: bool = False) -> Optional[AimsTimeSurface_3_VOID] parallelepiped(boundingbox_min, boundingbox_max, smooth=False)

Parameters:
  • boundingbox_min (Point3df) – “lower bound” corner position

  • boundingbox_min – “upper bound” corner position

  • smooth (bool) – if True, make smooth faces and shared vertices in corners

parallelepiped_wireframe(params: carto.GenericObject) AimsTimeSurface_2_VOID | None

parallelepiped_wireframe(boundingbox_min: AimsVector_FLOAT_3, boundingbox_max: AimsVector_FLOAT_3) -> Optional[AimsTimeSurface_2_VOID] parallelepiped_wireframe( Point3df boundingbox_min, Point3df boundingbox_max )

printDescription()
printDescription_wireframe()
sphere(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static sphere( dictionary ) See the description() and printDescription() methods for more information.

sphere(a0: AimsVector_FLOAT_3, a1: float, a2: int, a3: bool = False) -> Optional[AimsTimeSurface_3_VOID] static sphere( Point3df center, float radius, unsigned nfaces, bool uniquevertices=False )

class soma.aims.SurfaceManip

Bases: wrapper

Surface Manipulation Object. All mehtods are static in this class, it is just a means of grouping functions.

checkMeshIntersect(a0: AimsTimeSurface_3_VOID, a1: AimsTimeSurface_3_VOID) bool
cutMesh(insurf: AimsTimeSurface_3_VOID, plane: AimsVector_FLOAT_4, cut: AimsTimeSurface_3_VOID, borderline: AimsTimeSurface_2_VOID)
cutMesh(in_mesh, plane, cut_mesh, border_line) None

Cut a mesh by a plane and that’s all.

Parameters:
  • in_mesh (AimsSurfaceTriangle) – Triangular mesh to be cut.

  • plane (Point4df) – cut plane equation (4 coefs)

  • cut_mesh (AimsSurfaceTriangle) – output cut mesh (the part satisfying the plane equation). Polygons crossing the plane will be cut into smaller ones.

  • border_line (AimsTimeSurface_2_VOID) – output cut section polygon

Return type:

None

invertSurfacePolygons(surface: AimsTimeSurface_3_VOID)
invertSurfacePolygons(mesh) None

Invert polygons order (flips 2 vertex indices in each triangle) to flip its interior / exterior notions (used by OpenGL rendering). The input mesh is modified in-place.

joinTexturedMesh(mesh: AimsTimeSurface_3_VOID, texture: TimeTexture_FLOAT) rc_ptr_AimsTimeSurface_3_FLOAT

joinTexturedMesh(mesh: AimsTimeSurface_2_VOID, texture: TimeTexture_POINT2DF) -> rc_ptr_AimsTimeSurface_2_POINT2DF

joinTexturedMesh(mesh: AimsTimeSurface_2_VOID, texture: TimeTexture_FLOAT) -> rc_ptr_AimsTimeSurface_2_FLOAT

joinTexturedMesh(mesh: AimsTimeSurface_3_VOID, texture: TimeTexture_POINT2DF) -> rc_ptr_AimsTimeSurface_3_POINT2DF Join a mesh and a texture into a textured mesh

lineDirections(a0: AimsTimeSurface_2_VOID) vector_POINT3DF | None
lineDirections(segments_mesh) None

calculate directions of a line mesh, for each vertex

Parameters:

segments_mesh (AimsTimeSurface_2_VOID)

Returns:

directions

Return type:

vector_POINT3DF

meshArea(surf: AimsTimeSurface_3_VOID) float

Surface area of a triangular mesh, in mm^2

meshArea(surf: AimsTimeSurface_3_VOID, tex: TimeTexture_S16) -> object Surface areas of regions of a triangular mesh, in mm^2. Regions are given as a texture.

meshArea(surf: AimsTimeSurface_3_VOID, tex: Texture_S16) -> object

meshDensity(mesh: AimsTimeSurface_3_VOID, asDistance: bool = False) TimeTexture_FLOAT | None
meshDensity(mesh, as_distance=False) None

Calculate a mesh density: inverse of the average edges distance.

Parameters:
  • mesh (AimsSurfaceTriangle)

  • as_distance (bool (optional)) – if True, the average distance is not inverted, thus the output is an average distance map.

Returns:

density_texture

Return type:

TimeTexture_FLOAT

meshEdgeLengthRatioTexture(nummesh: AimsTimeSurface_3_VOID, denommesh: AimsTimeSurface_3_VOID) TimeTexture_FLOAT | None
meshEdgeLengthRatioTexture(numerator_mesh, denominator_mesh) None

Calculate an edge length ratio in edges of two meshes with the same topology. The max length ratios of edges is kept for each vertex.

Parameters:
  • numerator_mesh (AimsSurfaceTriangle)

  • denominator_mesh (AimsSurfaceTriangle)

Returns:

ratio_texture

Return type:

TimeTexture_FLOAT

meshExtract(mesh: AimsTimeSurface_3_VOID, tex: TimeTexture_S16, value: int)
meshExtract(mesh, texture, label_value) None

Extracts a sub-mesh defined by a texture label value.

Returns:

  • sub_mesh (AimsTimeSurface_3_VOID) – extracted sub-mesh

  • vertices (vector_ULONG) – indices of extracted vertices

meshMerge(a0: AimsTimeSurface_2_VOID, a1: AimsTimeSurface_2_VOID)

meshMerge(a0: AimsTimeSurface_3_VOID, a1: AimsTimeSurface_3_VOID)

meshMerge(a0: AimsTimeSurface_4_VOID, a1: AimsTimeSurface_4_VOID) meshMerge(input_output_mesh, input_mesh)

Concatenates the second mesh to the first one. The first argument will be modified.

Parameters:
Return type:

None

meshPlanarPolygon(a0: AimsVector_FLOAT_4, a1: AimsTimeSurface_2_VOID) AimsTimeSurface_3_VOID | None
meshPlanarPolygon(plane, polygon) None

Tesselate a planar polygon to fill it by a triangular mesh

Parameters:
  • plane (Point4df) – plane equation

  • polygon (AimsTimeSurface_2_VOID) – planar polygon to tesselate. Typically, the output of cutMesh()

Returns:

planar_mesh – the mesh filling the polygon

Return type:

AimsSurfaceTriangle

meshTextureBoundary(mesh: AimsTimeSurface_3_VOID, tex: TimeTexture_S16, region: int) AimsTimeSurface_2_VOID | None
meshTextureBoundary(mesh, label_texture, region_value) None

Extracts the boundary of region of value <region_value> of the input texture, on the mesh.

If region_value is negative, take boundaries of all regions. The input texture is a label texture.

Parameters:
Returns:

  • boundary (AimsTimeSurface_2_VOID) – output segments mesh (filar mesh) for the boundary

  • meshTextureBoundary(mesh (AimsTimeSurface_3_VOID, tex: TimeTexture_S32, region: int) -> Optional[AimsTimeSurface_2_VOID])

  • meshTextureBoundary(mesh (AimsTimeSurface_3_VOID, tex: TimeTexture_FLOAT, region: float) -> Optional[AimsTimeSurface_2_VOID])

meshTransform(a0: AimsTimeSurface_3_VOID, a1: aims.AffineTransformation3d)
meshTransform(mesh, transformation) None

Apply linear coordinates transformation to a mesh. The input mesh will be modified in-place.

Parameters:
Returns:

  • None

  • meshTransform(a0 (AimsTimeSurface_2_VOID, a1: aims.AffineTransformation3d))

meshVolume(surf: AimsTimeSurface_3_VOID) float
meshVolume(mesh) None

Volume inside a triangular mesh, in mm^3. The mesh must enclode a closed volume, with no holes, otherwise the volume processing will “leak” and will be wrong.

nearestPointToMesh(pos: AimsVector_FLOAT_3, mesh: AimsTimeSurface_3_VOID, nneighbours: int = 1)
rasterizeMesh(mesh: AimsTimeSurface_3_VOID, volume: rc_ptr_Volume_S16, value: int = 2)
rasterizeMesh(mesh, volume, value=2) None

Rasterize polygons into a volume.

Parameters:
  • mesh (AimsTimeSurface_*)

  • volume (Volume_S16) – Volume to write mesh imprint to

  • value (int) – label value used to write the mesh imprint in the volume

rasterizeMeshWireframe(mesh: AimsTimeSurface_2_VOID, volume: rc_ptr_Volume_S16, value: int = 1)
rasterizeMeshWireframe(mesh, volume, value=1) None

Rasterize polygons edges into a volume.

Parameters:
  • mesh (AimsTimeSurface_*)

  • volume (Volume_S16) – Volume to write mesh imprint to

  • value (int) – label value used to write the mesh imprint in the volume

  • rasterizeMeshWireframe(mesh (AimsTimeSurface_4_VOID, volume: rc_ptr_Volume_S16, value: int = 1))

  • rasterizeMeshWireframe(mesh

refineMeshTri4(mesh: AimsTimeSurface_3_VOID, selectedPolygons: vector_U32 = vector_U32()) AimsTimeSurface_3_VOID | None
refineMeshTri4(mesh, selected_polygons=None) None

Refine a mesh by subdivising every triangle into 4 smaller ones.

Parameters:
  • mesh (AimsSurfaceTriangle) – mesh to be refined

  • selected_polygons (vector_U32) – optional list of polygons indices to be selectively refined. Others will not be changed, unless they are at the border of a refined one, in which case they have to be split in some way.

Returns:

refined_mesh – refined mesh

Return type:

AimsSurfaceTriangle

sortPolygonsAlongDirection(mesh: AimsTimeSurface_2_VOID, timestep: int, direction: AimsVector_FLOAT_3)
sortPolygonsAlongDirection(mesh, timestep, direction) None

Sort polygons along a given direction. Polygons centers will be used for sorting. Only one timestep is performed (to be fast).

Parameters:
  • mesh (AimstimeSurface_*) – The mesh will be modified.

  • timestep (int)

  • direction (Point3df)

  • sortPolygonsAlongDirection(mesh (AimsTimeSurface_4_VOID, timestep: int, direction: AimsVector_FLOAT_3))

  • sortPolygonsAlongDirection(mesh

  • timestep

  • direction)

  • direction. (Sort polygons along a given)

  • fast). (Polygons centers will be used for sorting. Only one timestep is performed (to be)

  • mesh – The mesh will be modified.

  • timestep

  • direction

  • sortPolygonsAlongDirection(mesh

  • sortPolygonsAlongDirection(mesh

  • timestep

  • direction)

  • direction.

  • fast).

  • mesh – The mesh will be modified.

  • timestep

  • direction

splitTexturedMesh(texmesh: AimsTimeSurface_2_FLOAT) Any

Split a textured mesh into a mesh and a texture

splitTexturedMesh(texmesh: AimsTimeSurface_2_POINT2DF) -> Any

splitTexturedMesh(texmesh: AimsTimeSurface_3_FLOAT) -> Any

splitTexturedMesh(texmesh: AimsTimeSurface_3_POINT2DF) -> Any

surfaceNeighbours(surf: AimsTimeSurface_3_VOID) vector_set_U32
soma.aims.Texture(*args, **kwargs)[source]

Create an instance of Aims low-level texture (Texture_<type>) from a type parameter, which may be specified as the dtype keyword argument, or as one of the arguments if one is identitied as a type.

The default type is ‘FLOAT’.

Type definitions should match those accepted by typeCode().

Texture may also use a numpy array, or another Textrue_* as unique argument.

class soma.aims.Texture_DOUBLE
class soma.aims.Texture_DOUBLE(a0: int)
class soma.aims.Texture_DOUBLE(a0: Any)
class soma.aims.Texture_DOUBLE(a0: Texture_DOUBLE)

Bases: wrapper

append(self, a0: float)
array_struct(self) Any
arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
data(self) vector_DOUBLE
erase(self)
item(self, a0: int) float
list(self) List
nItem(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
push_back(self, a0: float)
push_back(self, a0: int, a1: float) None
reserve(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: float) None
size(self) int
class soma.aims.Texture_FLOAT
class soma.aims.Texture_FLOAT(a0: int)
class soma.aims.Texture_FLOAT(a0: Any)
class soma.aims.Texture_FLOAT(a0: Texture_FLOAT)

Bases: wrapper

append(self, a0: float)
array_struct(self) Any
arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
data(self) vector_FLOAT
erase(self)
item(self, a0: int) float
list(self) List
nItem(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
push_back(self, a0: float)
push_back(self, a0: int, a1: float) None
reserve(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: float) None
size(self) int
class soma.aims.Texture_POINT2DF
class soma.aims.Texture_POINT2DF(a0: int)
class soma.aims.Texture_POINT2DF(a0: Any)
class soma.aims.Texture_POINT2DF(a0: Texture_POINT2DF)

Bases: wrapper

append(self, a0: AimsVector_FLOAT_2)
array_struct(self) Any
arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
data(self) vector_POINT2DF
erase(self)
item(self, a0: int) AimsVector_FLOAT_2
list(self) List
nItem(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
push_back(self, a0: AimsVector_FLOAT_2)
push_back(self, a0: int, a1: AimsVector_FLOAT_2) None
reserve(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: AimsVector_FLOAT_2) None
size(self) int
class soma.aims.Texture_S16
class soma.aims.Texture_S16(a0: int)
class soma.aims.Texture_S16(a0: Any)
class soma.aims.Texture_S16(a0: Texture_S16)

Bases: wrapper

append(self, a0: int)
array_struct(self) Any
arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
data(self) vector_S16
erase(self)
item(self, a0: int) int
list(self) List
nItem(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
push_back(self, a0: int)
push_back(self, a0: int, a1: int) None
reserve(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
class soma.aims.Texture_S32
class soma.aims.Texture_S32(a0: int)
class soma.aims.Texture_S32(a0: Any)
class soma.aims.Texture_S32(a0: Texture_S32)

Bases: wrapper

append(self, a0: int)
array_struct(self) Any
arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
data(self) vector_S32
erase(self)
item(self, a0: int) int
list(self) List
nItem(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
push_back(self, a0: int)
push_back(self, a0: int, a1: int) None
reserve(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
class soma.aims.Texture_U16
class soma.aims.Texture_U16(a0: int)
class soma.aims.Texture_U16(a0: Any)
class soma.aims.Texture_U16(a0: Texture_U16)

Bases: wrapper

append(self, a0: int)
array_struct(self) Any
arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
data(self) vector_U16
erase(self)
item(self, a0: int) int
list(self) List
nItem(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
push_back(self, a0: int)
push_back(self, a0: int, a1: int) None
reserve(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
class soma.aims.Texture_U32
class soma.aims.Texture_U32(a0: int)
class soma.aims.Texture_U32(a0: Any)
class soma.aims.Texture_U32(a0: Texture_U32)

Bases: wrapper

append(self, a0: int)
array_struct(self) Any
arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
data(self) vector_U32
erase(self)
item(self, a0: int) int
list(self) List
nItem(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
push_back(self, a0: int)
push_back(self, a0: int, a1: int) None
reserve(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
class soma.aims.Texture_U8
class soma.aims.Texture_U8(a0: int)
class soma.aims.Texture_U8(a0: Any)
class soma.aims.Texture_U8(a0: Texture_U8)

Bases: wrapper

append(self, a0: int)
array_struct(self) Any
arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
data(self) vector_U8
erase(self)
item(self, a0: int) int
list(self) List
nItem(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
push_back(self, a0: int)
push_back(self, a0: int, a1: int) None
reserve(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
soma.aims.TimeSurface(*args, **kwargs)[source]

same as AimsTimeSurface(dim, dtype)

soma.aims.TimeTexture(*args, **kwargs)[source]

Create an instance of Aims texture (TimeTexture_<type>) from a type parameter, which may be specified as the dtype keyword argument, or as one of the arguments if one is identitied as a type.

The default type is ‘FLOAT’.

Type definitions should match those accepted by typeCode(). TimeTexture may also use a numpy array, or another TimeTexture_* or Textrue_* as unique argument.

Building from a numpy arrays uses the 1st dimension as vertex, the 2nd as time (if any).

class soma.aims.TimeTexture_DOUBLE
class soma.aims.TimeTexture_DOUBLE(a0: int, a1: int)
class soma.aims.TimeTexture_DOUBLE(a0: TimeTexture_DOUBLE)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_TimeTexture_DOUBLE
has_key(self, a0: int) bool
header(self) carto.GenericObject
items()
iteritems()
keys(self) List
nItem(self) int
push_back(self, a0: float)
reserve(self, a0: int)
size(self) int
class soma.aims.TimeTexture_FLOAT
class soma.aims.TimeTexture_FLOAT(a0: int, a1: int)
class soma.aims.TimeTexture_FLOAT(a0: TimeTexture_FLOAT)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_TimeTexture_FLOAT
has_key(self, a0: int) bool
header(self) carto.GenericObject
items()
iteritems()
keys(self) List
nItem(self) int
push_back(self, a0: float)
reserve(self, a0: int)
size(self) int
class soma.aims.TimeTexture_POINT2DF
class soma.aims.TimeTexture_POINT2DF(a0: int, a1: int)
class soma.aims.TimeTexture_POINT2DF(a0: TimeTexture_POINT2DF)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_TimeTexture_POINT2DF
has_key(self, a0: int) bool
header(self) carto.GenericObject
items()
iteritems()
keys(self) List
nItem(self) int
push_back(self, a0: AimsVector_FLOAT_2)
reserve(self, a0: int)
size(self) int
class soma.aims.TimeTexture_S16
class soma.aims.TimeTexture_S16(a0: int, a1: int)
class soma.aims.TimeTexture_S16(a0: TimeTexture_S16)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_TimeTexture_S16
has_key(self, a0: int) bool
header(self) carto.GenericObject
items()
iteritems()
keys(self) List
nItem(self) int
push_back(self, a0: int)
reserve(self, a0: int)
size(self) int
class soma.aims.TimeTexture_S32
class soma.aims.TimeTexture_S32(a0: int, a1: int)
class soma.aims.TimeTexture_S32(a0: TimeTexture_S32)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_TimeTexture_S32
has_key(self, a0: int) bool
header(self) carto.GenericObject
items()
iteritems()
keys(self) List
nItem(self) int
push_back(self, a0: int)
reserve(self, a0: int)
size(self) int
class soma.aims.TimeTexture_U16
class soma.aims.TimeTexture_U16(a0: int, a1: int)
class soma.aims.TimeTexture_U16(a0: TimeTexture_U16)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_TimeTexture_U16
has_key(self, a0: int) bool
header(self) carto.GenericObject
items()
iteritems()
keys(self) List
nItem(self) int
push_back(self, a0: int)
reserve(self, a0: int)
size(self) int
class soma.aims.TimeTexture_U32
class soma.aims.TimeTexture_U32(a0: int, a1: int)
class soma.aims.TimeTexture_U32(a0: TimeTexture_U32)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_TimeTexture_U32
has_key(self, a0: int) bool
header(self) carto.GenericObject
items()
iteritems()
keys(self) List
nItem(self) int
push_back(self, a0: int)
reserve(self, a0: int)
size(self) int
class soma.aims.TimeTexture_U8
class soma.aims.TimeTexture_U8(a0: int, a1: int)
class soma.aims.TimeTexture_U8(a0: TimeTexture_U8)

Bases: RCObject

erase(self)
fromObject(a0: carto.GenericObject) rc_ptr_TimeTexture_U8
has_key(self, a0: int) bool
header(self) carto.GenericObject
items()
iteritems()
keys(self) List
nItem(self) int
push_back(self, a0: int)
reserve(self, a0: int)
size(self) int
class soma.aims.Transformation(*args)

Bases: RCObject

Base class for spatial transformations.

getInverse(self) rc_ptr_Transformation
header()
inverse()
invertible(self) bool
isDirect(self) bool
isIdentity(self) bool

Test if the transformation can safely be omitted

This method must only return true if the transformation behaves exactly like an identity transformation (notably, the transform methods will always return the input coordinates unchanged).

NOTE: Implementors of derived classes may choose to always return false if a test would be difficult to implement or expensive to run.

setHeader(self, ph: carto.Object)
transform(self, pos: vector_S32) vector_S32
transform(self, pos: vector_FLOAT) vector_FLOAT
transform(self, pos: vector_DOUBLE) vector_DOUBLE
transformVector(self, pos: vector_S32) vector_S32
transformVector(self, pos: vector_FLOAT) vector_FLOAT
transformVector(self, pos: vector_DOUBLE) vector_DOUBLE
vadd(v1: vector_S32, v2: vector_S32) vector_S32

vadd(v1: vector_FLOAT, v2: vector_FLOAT) -> vector_FLOAT

vadd(v1: vector_DOUBLE, v2: vector_DOUBLE) -> vector_DOUBLE vector arithmetics, as convenience static functions

vadd(v1: vector_S32, v2: int) -> vector_S32

vadd(v1: vector_FLOAT, v2: float) -> vector_FLOAT

vadd(v1: vector_DOUBLE, v2: float) -> vector_DOUBLE vector arithmetics, as convenience static functions

vadd(v1: int, v2: vector_S32) -> vector_S32

vadd(v1: float, v2: vector_FLOAT) -> vector_FLOAT

vadd(v1: float, v2: vector_DOUBLE) -> vector_DOUBLE vector arithmetics, as convenience static functions

vsub(v1: vector_S32, v2: vector_S32) vector_S32

vsub(v1: vector_FLOAT, v2: vector_FLOAT) -> vector_FLOAT

vsub(v1: vector_DOUBLE, v2: vector_DOUBLE) -> vector_DOUBLE vector arithmetics, as convenience static functions

vsub(v1: vector_S32, v2: int) -> vector_S32

vsub(v1: vector_FLOAT, v2: float) -> vector_FLOAT

vsub(v1: vector_DOUBLE, v2: float) -> vector_DOUBLE vector arithmetics, as convenience static functions

vsub(v1: int, v2: vector_S32) -> vector_S32

vsub(v1: float, v2: vector_FLOAT) -> vector_FLOAT

vsub(v1: float, v2: vector_DOUBLE) -> vector_DOUBLE vector arithmetics, as convenience static functions

class soma.aims.Transformation3d(*args)

Bases: Transformation

Base class for spatial transformations in 3D.

fromObject(a0: carto.GenericObject) rc_ptr_Transformation3d
toObject(self) carto.Object
transform(self, p: AimsVector_S16_3) AimsVector_S16_3
transform(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transform(self, pos: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transform(self, pos: vector_S32) vector_S32
transform(self, pos: vector_FLOAT) vector_FLOAT
transform(self, pos: vector_DOUBLE) vector_DOUBLE
transform(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformPoints(self, a0: Any) Any
transformVector(self, pos: vector_S32) vector_S32
transformVector(self, pos: vector_FLOAT) vector_FLOAT
transformVector(self, pos: vector_DOUBLE) vector_DOUBLE
class soma.aims.TransformationChain3d(*args)

Bases: Transformation3d

Container for a composition of multiple transformations.

This container holds a list of transformations, and acts as the composition of all transformations. Transformations are composed from the front to the back of the list:

chain = TransformationChain3d()
chain.push_back(t1)
chain.push_back(t2)
# chain->transform(p) == t2.transform(t1.transform(p))

warning: Do not modify the transformations once you have passed them to push_back() or push_front(): it is unspecified if the changes will be noticed by TransformationChain3d (a reference to the same object may be kept internally, or a copy could be made). This behaviour will allow optimizations to be implemented (e.g. composing adjacent affine transformations by multiplying their matrices).

getInverse(self) rc_ptr_Transformation
invertible(self) bool
isDirect(self) bool
isIdentity(self) bool
pop_back(self)
pop_back() None

Remove the last transformation from the list

pop_front(self)
pop_front() None

Remove the first transformation from the list

push_back(self, transformation: rc_ptr_Transformation3d)
push_back(transformation) None

Add a transformation to the back of the list (applied last)

push_front(self, transformation: rc_ptr_Transformation3d)
push_front(transformation) None

Add a transformation to the front of the list (applied first)

simplify(self, allow_ffd: bool = False) rc_ptr_Transformation3d

Compute a simpler transformation that is equivalent to the chain.

The transformation chain is simplified by applying the following rules, so that it should provide equivalent results to the original chain, up to numerical precision:

  • The simplification is applied recursively to any sub-chain.

  • Transformations of the simplified sub-chains are inserted at the top level (i.e. the simplified chain is flat, it contains no sub-chains).

  • Consecutive affine transformations are composed using matrix multiplication.

  • Identity transforms (i.e. transforms for which Transformation::isIdentity() returns true) are removed from the list.

  • If the simplified chain consists of only one transformation, no chain is returned, the contained transformation is returned directly. However, the transformation is not necessarily the same instance that was inserted in the chain (it will be a copy if it is an AffineTransformation3d).

  • If the simplified chain is empty, an empty chain is returned.

No deep copy is made, so the result can contain pointers to the same transformations as the original chain.

If the parameter allow_ffd is set to True, and if the chain contains at least a FFD deformation field, then the whole chain is reduced to a single FFD field, with the resolution of the first one found in the chain.

size(self) int
transformDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
class soma.aims.TransformationGraph3d(*args, **kwargs)

Bases: Graph

Manage transformations (affine and non-linear) transformations graph.

It maintains a graph of directed transformations (vertices are referentials, edges are 3D transformations).

It can be populated from a dictionary (Object) which can be read from a JSON or YAML file, and performs lazy-loading: transformations are actually loaded when they are used, more precisely in getTransformation() and when building a chain of composed transformations.

The graph is oriented, and does not manage inverse transforms. We could thing this could be done automatically for affine or other inversible transformations, but the lazy loading feature does not allow to know if a not yet loaded transform will be inversible or not. So this has to be done manually for now.

The graph populates with composed transforms when they are used: indirect paths from a referential to another are generated when needed, and stored in the graph as “deduced” transforms. Later access will thus use this cache instead of reccomputing it. A drawback, thus, is that the graph has to be used “statically”: any modification in the graph structure, or in any of its transformations, should invalidate a number of deduced, cached ones, which we do not handle for now (it’s a quite difficult problem to manage it efficiently). To date the only solution is to completely clear the cached transforms (clearCache()) after any modification.

The TransformationGraph3d structure is a Graph, and its elements are Vertex or Edge objects. To manipulate transformations, the API generally allows to use identifiers (generally UUIDs) for elements, and the Transformation objects are accessed through the “transformation” property of edges, or using the transformation() convenience method:

ref1 = tgraph.referentialById(“23df7ce8-e405-bc31-3863-d543e3cc89e5”) trans_edge = tgraph.getTransformation(

“23df7ce8-e405-bc31-3863-d543e3cc89e5”, “52929a27-6838-1d08-d6fc-7905ed9413a0”)

if trans_edge:

trans = tgraph.transformation(trans_edge)

see also: https://hbp-spatial-backend.apps.hbp.eu/swagger-ui#/api_v1/get_v1_transform_point

allocatorContext(self) carto.AllocatorContext

Allocator context used in transformations reading operations.

asDict(self, affine_only: bool = False, allow_read: bool = False, embed_affines: bool = False, rel_to_path: object = '') carto.Object

convert to a dict-like structure compatible with loadTransformationsGraph()

Parameters:
  • affine_only (bool) – if true, inclue only affine transformations

  • allow_read (bool) – if true, and if affine_only or embed_affines is also true, all affine transformations will be read in order to determine which are affine. Otherwise only those already loaded in memory (via the lazy reading mechanism) will be known to be affine. This parameter has no effect on non-affine transformations.

  • embed_affines (bool) – if true, affine transformations are not recorded as a file name (.trm format), but as an embedded 4x4 matrix.

  • rel_to_path (str) – if not empty, filenames will be relative to this base directory (normally where the graph will be stored)

clearCache(self, chain_only: bool = False)
clearCache(chain_only=False) None

remove deduced transformations (built from composition).

If chain_only is true, then inverses of direct transforms are not removed.

getTransformChain(self, src_ref: Vertex | None, dst_ref: Vertex | None) rc_ptr_Transformation3d

Get a transformation chain between two vertices.

You normally don’t need to call this method directly, il is called through getTransformation( src_ref, dst_ref, true ). This method however does not modify the transformations graph and does not register the combined transformation. It will, however, load lazy-loading transformations.

getTransformChain(self, src_ref: object, dst_ref: object) -> rc_ptr_Transformation3d

getTransformation(self, src_ref: object, dst_ref: object) Edge | None

edge = tgraph.getTransformation(src_ref, dst_ref, allow_compose=False)

Get the transformation between source_ref and dst_ref. If it is not a registered transformation, return None. src_ref annd dst_ref may be string IDs or Vertex objects.

If allow_compose is True and the transformation is not found, then a transformations chain path is looked for. If a matching one is found, it is then registered in the graph to allow fast access later. The drawback of this register operation is that it cannot react to changes in the transformation chain (if a new transformation is added and could make a shorter path, it will not be taken into account).

getTransformation(self, src_ref: Optional[Vertex], dst_ref: Optional[Vertex]) -> Optional[Edge]

getTransformation(self, src_ref: object, dst_ref: object, allow_compose: bool) -> Optional[Edge]

getTransformation(self, src_ref: Optional[Vertex], dst_ref: Optional[Vertex], allow_compose: bool) -> Optional[Edge]

getTransformation_raw(self, src_ref: Vertex | None, dst_ref: Vertex | None) Edge | None
getTransformation_raw(src_ref, dst_ref) None

same as getTransformation(), but do not perform lazy loading

getTransformation_raw(self, src_ref: object, dst_ref: object) -> Optional[Edge]

loadAffineTransformations(self)

Load all affine transformations.

loadTransformationsGraph(self, desc: carto.Object, dirname: object)

Load a full transformations graph from a dict-like object.

The description dict may typically be read from a .json or a .yaml file.

The description is organized as a 2-level dictionary:

{
    source_ref_id: {
        dest_ref_id1: transformation_filename1,
        dest_ref_id2: transformation_filename2,
    },
    ...
}

A referential ID is a string which may represent an UUID, or a name.

A transformatioon filename may be an affine (.trm) or non-linear (.ima) transformation file, or an empty string to represent an identity transformation.

The transformation files are found relatively to the directory given as the dirname parameter.

Alternatively to file names, an affine transformation may be given directly as its 4x4 matrix, written as a line vector (all 16 coefficients in a vecotr, describing the matrix horizontally). Ex:

{
    source_ref_id: {
        dest_ref_id1: [1, 0, 0, 0,
                       0, 1, 0, 0,
                       0, 0, 1, 0,
                       0, 0, 0, 1],
    },
    ...
}
mergeReferentials(self, uuid: object, existing_id: object)

Merge two existing referentials into a single one (the second).

The first UUID will be kept as an alias in the second.

referentialByCode(self, id: object, header: carto.Object, refs: vector_STRING) Vertex | None

Same as referentialById(id), but with the help of an object header, can look for additional codes:

  • “AIMS”: the internal AIMS referential of the object

  • “first”: first referential in the transformations destinations in the given header

  • “last”: last referential in the header

  • a numpber or lexical number as string to designate the referential in referenced transformations destinations in the object header - “auto”: last referential in header, if one is present, or fallback to the internal AIMS referential of the object otherwise.

  • “aligned”, or “NIFTI_XFORM_ALIGNED_ANAT”, or “Coordinates aligned to another file or to anatomical truth”, to designate a transformation (NIFTI-like) going to another object space as described this way

  • “NIFTI_XFORM_TEMPLATE_OTHER” to designate a different template as described in the object header (NIFTI-like)

  • “disk”: the “disk space” orientation: voxels in the order they are stored on disk. Some software are working in this referential. Note that this referential is only available in the graph if the object header has been included using updateFromObjectHeader() with the parameter includeDiskSpace set to True.

  • other codes may be supported later, like “qform”, “sform”, “ITK”, “ANTS”, but are not implemented yet.

The object header should have been included in the transformations graph using updateFromObjectHeader() before calling this method.

The object header is still needed here because looking for the specified transformations are linked tot the order the specific header and the order they are given in it.

The additional parameter, refs, should be the list returned by updateFromObjectHeader(). It is the list of destinaton referentials in the object header, but with possibly different codes or IDs because the original header may use ambiguous, non-specific identifiers.

If not found for a known reason, the function will throw a runtime_error exception with a message. Otherwise 0 might be returned.

referentialById(self, id: object) Vertex | None

Get the vertex (referential) with given ID.

The id may be a referential ID or name, or a code identifying a particular referential, like:

  • “mni”, or “mni152”, or “NIFTI_XFORM_MNI_152” or “Talairach-MNI template-SPM” (StandardReferentials.mniTemplateReferential()), to designate the ICBM152 standard referential

  • “acpc”, or “talairach”, or “NIFTI_XFORM_TALAIRACH”, or “Talairach-AC/PC-Anatomist” (StandardReferentials.acPcReferential()), to designate AIMS Talairach referential

registerInverseTransformations(self, loadAffines: bool = False)
registerInverseTransformations(loadAffines=False) None

register inverse transformations when they can be obtained.

This can be done only for loaded transformations. So the lazy loading feature will prevent for it to work on not already loaded transformations, since we cannot know if they are invertible before they are loaded.

For this reason, the loadAffines parameter allows to load affine transforms and register their inverses.

registerReferentialAlias(self, uuid: object, existing_id: object)

registers a different referential, additional UUID for an existing referential.

If the new UUID corresponds to an existing referential also, both are merged into the same vertex.

registerTransformation(self, src_ref: object, dst_ref: object, trans: rc_ptr_Transformation3d, deduced: bool = False) Edge | None

Add (or register) the given transformation in the transformations graph.

transform may be a filename, or a Transformation instance. a Transformation is supposed to be a non-linear FFD (Free Form Deformation), not a linear transformation. If transform is a string, it may be: - an empty string will be an identity transformation - a .trm file will be an affine transformation, and will be passed to

the builtin Anatomist system

  • another file (.ima) will be a FFD transformation file and will be registered as its filename. Loading will happen only when the transformation is used, in get_transformation().

registerTransformation(self, src_ref: Optional[Vertex], dst_ref: Optional[Vertex], trans: rc_ptr_Transformation3d, deduced: bool = False) -> Optional[Edge]

registerTransformation(self, src_ref: object, dst_ref: object, filename: object) -> Optional[Edge]

registerTransformation(self, src_ref: Optional[Vertex], dst_ref: Optional[Vertex], filename: object) -> Optional[Edge]

setAllocatorContext(self, alloc: carto.AllocatorContext)

Set the allocator context used in all transformations reading operations.

The allocator context may be used to push the use of memory mapping, for isntance.

transformation(edge: Edge | None) rc_ptr_Transformation3d

Get the Transformation3d object inside an edge. The returned reference counting pointer may contain a null pointer.

transformation(self, id: object) -> rc_ptr_Transformation3d Get the Transformation3d object for the given UUID. The returned reference counting pointer may contain a null pointer.

transformationById(self, id: object) Edge | None

Get the edge (transformation) with given ID

updateFromObjectHeader(self, header: carto.Object, includeDiskSpace: bool = False) vector_STRING

Insert all transformations / referentials found in an object header.

Returns the translated referentials names in the order they are in the object header, beginning with the object referential itself. For instance for a header with the properties:

{
  "referential": "A",
  "referentials": ["B", "Talairach-MNI template-SPM",
                    "Scanner-based anatomical coordinates"],
  "transformations": [...]  // list of 3 transformations
}

it will return:

["A", "B", "803552a6-ac4d-491d-99f5-b938392b674b",
  "Scanner-based anatomical coordinates_A"]

If the header does not contain a “referential” property, then a new UUID will be generated for it.

If the optional parameter includeDiskSpace is set to true, then transformations to disk orientation (in mm) will also be included.

updateIds(self)

Update the internal UUIDs cache. Needs to be done after changes in elements UUIDs or insertion / deletions

class soma.aims.Tree(a0: bool = True, a1: object = '')
class soma.aims.Tree(a0: Tree)

Bases: AttributedObject

children(self) Tuple
childrenSize(self) int
clone(self) carto.Object
currentValue(self) carto.Object
getScalar(self) float
getString(self) object
has_key(self, a0: object) bool
insert(self, child: Tree | None, index: int = -1)
intKey(self) int
isArray(self) bool
isDictionary(self) bool
isDictionaryIterator(self) bool
isDynArray(self) bool
isIterable(self) bool
isIterator(self) bool
isNone(self) bool
isScalar(self) bool
isString(self) bool
isValid(self) bool
key(self) object
objectIterator(self) carto.Object
remove(self, index: int)
remove(self, node: Tree | None) None
size(self) int
type(self) object
class soma.aims.TreeReader(a0: object, a1: carto.PSyntaxSet)

Bases: wrapper

name(self) object
read(self) Tree | None
class soma.aims.Vertex(*args, **kwargs)

Bases: GraphObject

edges(self) Tuple
edgesSize(self) int
neighbours(self) Tuple
randomNeighbour(self) Vertex | None
soma.aims.Volume(*args, **kwargs)[source]

Create an instance of Aims Volume (Volume_<type>) from a type parameter, which may be specified as the dtype keyword argument, or as one of the arguments if one is identitied as a type. The default type is ‘FLOAT’. Type definitions should match those accepted by typeCode(). Volume may also use a numpy array, or another Volume as unique argument.

Note that Volume( Volume_* ) actually performs a copy of the data, whereas Volume( rc_ptr_Volume_* ) share the input data.

soma.aims.VolumeView(volume, position, size)[source]

Create a view in an existing volume. The returned volume is of the same type and shares data with its “parent”.

class soma.aims.Volume_BOOL(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) bool
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> bool at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> bool at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: bool)
fill(value) None

Fill Volume_BOOL using the given value.

fillBorder(self, value: bool)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_BOOL
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) bool
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) bool
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_BOOL

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: bool, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: bool, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) bool
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_CDOUBLE(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) object
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> object at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> object at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: object)
fill(value) None

Fill Volume_CDOUBLE using the given value.

fillBorder(self, value: object)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_CDOUBLE
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) object
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) object
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_CDOUBLE

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: object, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: object, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) object
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_CFLOAT(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) object
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> object at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> object at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: object)
fill(value) None

Fill Volume_CFLOAT using the given value.

fillBorder(self, value: object)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_CFLOAT
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) object
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) object
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_CFLOAT

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: object, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: object, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) object
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_DOUBLE(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) float
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> float at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> float at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: float)
fill(value) None

Fill Volume_DOUBLE using the given value.

fillBorder(self, value: float)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_DOUBLE
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) float
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) float
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_DOUBLE

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: float, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: float, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) float
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_FLOAT(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) float
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> float at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> float at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: float)
fill(value) None

Fill Volume_FLOAT using the given value.

fillBorder(self, value: float)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_FLOAT
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) float
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) float
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_FLOAT

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: float, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: float, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) float
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_HSV(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) AimsHSV
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> AimsHSV at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> AimsHSV at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: AimsHSV)
fill(value) None

Fill Volume_HSV using the given value.

fillBorder(self, value: AimsHSV)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_HSV
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) AimsHSV
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) AimsHSV
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_HSV

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: AimsHSV, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: AimsHSV, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) AimsHSV
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_POINT3DF(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) AimsVector_FLOAT_3
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> AimsVector_FLOAT_3 at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> AimsVector_FLOAT_3 at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: AimsVector_FLOAT_3)
fill(value) None

Fill Volume_POINT3DF using the given value.

fillBorder(self, value: AimsVector_FLOAT_3)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_POINT3DF
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) AimsVector_FLOAT_3
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) AimsVector_FLOAT_3
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_POINT3DF

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: AimsVector_FLOAT_3, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: AimsVector_FLOAT_3, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) AimsVector_FLOAT_3
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_RGB(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) AimsRGB
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> AimsRGB at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> AimsRGB at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: AimsRGB)
fill(value) None

Fill Volume_RGB using the given value.

fillBorder(self, value: AimsRGB)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_RGB
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) AimsRGB
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) AimsRGB
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_RGB

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: AimsRGB, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: AimsRGB, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) AimsRGB
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_RGBA(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) AimsRGBA
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> AimsRGBA at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> AimsRGBA at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: AimsRGBA)
fill(value) None

Fill Volume_RGBA using the given value.

fillBorder(self, value: AimsRGBA)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_RGBA
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) AimsRGBA
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) AimsRGBA
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_RGBA

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: AimsRGBA, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: AimsRGBA, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) AimsRGBA
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_S16(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> int at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> int at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: int)
fill(value) None

Fill Volume_S16 using the given value.

fillBorder(self, value: int)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_S16
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) int
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_S16

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: int, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: int, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_S32(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> int at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> int at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: int)
fill(value) None

Fill Volume_S32 using the given value.

fillBorder(self, value: int)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_S32
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) int
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_S32

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: int, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: int, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_U16(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> int at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> int at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: int)
fill(value) None

Fill Volume_U16 using the given value.

fillBorder(self, value: int)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_U16
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) int
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_U16

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: int, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: int, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_U32(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> int at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> int at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: int)
fill(value) None

Fill Volume_U32 using the given value.

fillBorder(self, value: int)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_U32
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) int
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_U32

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: int, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: int, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Volume_U8(*args)

Bases: RCObject

Generalities

The various Volume_<type> classes are bindings to the C++ template classes carto::Volume. It represents a 4D volume (1D to 4D, actually) storing a specific type of data: for instance S16 is signed 16 bit short ints, FLOAT is 32 bit floats, etc.

Volumes are read and written using the Reader and Writer classes, which are in turn used by the simple read() and write() functions.

A volume of a given type can be built either using its specialized class constructor, or the general Volume() function which can take a voxel type in its arguments: the following are equivalent:

>>> v = aims.Volume_S16(100, 100, 10)
>>> v = aims.Volume('S16', 100, 100, 10)
>>> v = aims.Volume(100, 100, 10, dtype='S16')
>>> v = aims.Volume([100, 100, 10], dtype='S16')
>>> import numpy
>>> v = aims.Volume(numpy.int16, 100, 100, 10)

Numpy arrays and volumes

A volume is an array of voxels, which can be accessed via the at() method. For standard numeric types, it is also possible to get the voxels array as a numpy array, using the __array__() method, or more conveniently, numpy.asarray(volume) or numpy.array(volume, copy=False). In aims >= 5.0.2, a more concise shortcut is also available: volume.np (this is available on all types providing numpy bindings actually).

The array returned is a reference to the actual data block, so any modification to its contents also affects the Volume contents, so it is generally an easy way of manipulating volume voxels because all the power of the numpy module can be used on Volumes. The obsoloete arraydata() method used to return a numpy array just like it is in memory, that is a 4D (or more) array generally indexed by [t][z][y][x] (but it depands how it has been built), which is generally not what you like and is not consistent with AIMS indexing. Contrarily, using volume.np sets strides in the returned numpy array, so that indexing is in the “normal” order [x][y][z][t], while still sharing the same memory block. The Volume object now also wraps the numpy accessors to the volume object itself, so that volume[x, y, z, t] is the same as nupmy.asarray(volume)[x, y, z, t].

new in PyAims 4.7

Since PyAims 4.7 the numpy arrays bindings have notably improved, and are now able to bind arrays to voxels types which are not scalar numeric types. Volumes of RGB, RGBA, HSV, or Point3df now have numpy bindings. The bound object have generally a “numpy struct” binding, that is not the usual C++/python object binding, but instead a structure managed by numpy which also supports indexing. For most objects we are using, they also have an array stucture (a RGB is an array with 3 int8 items), and are bound under a sturcture with a unique field, named “v” (for “vector”):

>>> v = aims.Volume('RGB', 100, 100, 10)
>>> v[0, 0, 0, 0]
([0, 0, 0],)

Such an array may be indexed by the field name, which returns another array with scalar values and additional dimensions:

>>> v['v'].dtype
dtype('uint8')
>>> v['v'].shape
(100, 100, 10, 1, 3)

Both arrays share their memory with the aims volume.

Header

Volumes also store a header which can contain various information (including sizes and voxel sizes). The header is a dictionary-like generic object (Object) which can be accessed by the header() method. This header object also has a read-write access with some restrictions inherent to the Object mechanism. It will be saved with the volume contents when the volume is saved on disk.

Volumes support a number of arithmetic operators like +, - etc. when the operands types and sizes match: for instance:

>>> # V1 and V2 are two volumes
>>> V3 = V1 + V2  # adds two volumes
>>> V2 -= V1
>>> V3 = V1 + 3   # adds 3 to aceh voxel
>>> V3 = V1 * V2  # itemwise multiplication

Some type conversions can be performed on volumes, for istance to convert a Volume_S16 to a Volume_FLOAT. The simplest, to convert to another data type, is to use the astype() method.

To convert a volume into diffent structure types, such as Buckets, use the converter classes Converter_<type1>_<type2> and ShallowConverter_<type1>_<type2> with <type1> and <type2> being volume or other object types: for instance Converter_Volume_S16_Volume_FLOAT. The converter can also be called using type arguments:

>>> vol1 = aims.AimsData('S16', 100, 100, 10)
>>> c = aims.Converter(intype=vol1, outtype='BucketMap_VOID')
>>> vol2 = c(vol1)

Volume from a numpy array

It is also possible to build a Volume from a numpy array:

>>> v = aims.Volume(numpy.zeros((100, 100, 10)))

Note that passing a 1D numpy array of ints will build a volume mapping the array contents, whereas passing a python list or tuple of ints will interpret the list as a shape for the volume:

>>> v = aims.Volume(numpy.array([100, 100, 10]).astype('int32'))
>>> print(v.getSize())
[ 3, 1, 1, 1 ]
>>> print(v.np)
[100 100  10]
>>> v = aims.Volume([100, 100, 10])
>>> print(v.getSize())
[ 100, 100, 10, 1 ]

Array ordering:

In pyaims <= 5.0.x the Volume classes were only working with the X axis (the first) being contiguous, and, for numpy, should be interpreted as “Fortran-contiguous”. So to convert a numpy array into a Volume and keep the same axes ordering, you had to convert it to Fortran order first:

>>> v = aims.Volume(numpy.zeros((2, 3, 4, dtype='int32')))
# v.getSize() used to return [4, 3, 2, 1]
>>> v = aims.Volume(np.asfortranarray(numpy.zeros((2, 3, 4), dtype='int32')))
>>> print(v.getSize())
[2, 3, 4, 1]

In pyaims 5.1 this limitation is gone, you can omit the fortran order conversion. Strides are taken into account in the C++ volume. But you have to be careful with such volumes as many C++ programs assume internally that the X axis is contiguous in memory, which is not true in this situation. These programs and functions may not work, crash, or produce incorrect results when used with non-contiguous X axis volumes.

class Position4Di

Bases: wrapper

4 ints for position or size, used for Volume views.

all(self) bool
allocateBorders(self, bsx: int, bsy: int = -1, bsz: int = -1)

reallocate the volume with given borders, keep (copy) the contents.

allocateBorders(self, border: vector_S32) reallocate the volume with given borders, keep (copy) the contents. only 1 value is mandatory.

allocatorContext(self) carto.AllocatorContext
any(self) bool
arraydata(self) Any

arraydata() returns a numpy array to the internal memory block, with “inverted” shape and strides.

WARNING: this is an obsolete method, which behaviour has changed. Most of the time you need numpy.asarray(volume), or more simply: volume.np, which actually provides an array with the same indices ordering. Here it is a transposed one.

Given the internal ordering of Aims Volumes, the resulting numpy array is indexed as [t][z][y][x]. This order corresponds to the numpy “fortran” order: order='F' If you need the inverse, more natural, [x][y][z][t] ordering, use the following:

>>> volarray = volume.np

or:

>>> volarray = numpy.array(volume, copy=False)

or:

>>> volarray = numpy.asarray(volume)

Using arraydata(), as the indices are reversed, if you do something like:

vol2 = aims.Volume(vol.arraydata())

You will build a transposed volume.

astype(dtype, copy=False)

Easy conversion method for volumes. Works in a similar was as numpy arrays astype() methods, except that the “copy” parameter defaults to False.

Parameters:
  • dtype (string or type object) – may be a volume or voxel type, specified either as a type oject (int, aims.Volume_S32, numpy.int16), or as a string (“S16”…).

  • copy (bool) – if False, a ShallowConverter will be used: if dtype matches the current volume type, a shared reference to self will be returned. Otherwise a new copy will be returned.

Return type:

A volume of the converted type

at(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
at(posx, posy=0, posz=0, post=0) None

Returns the volume value for the selected voxel.

at(self, a0: int, a1: int, a2: int, a3: int, a4: int, a5: int = 0, a6: int = 0, a7: int = 0) -> int at(posx1, posx2, posx3, posx4, posx5, posx6=0, posx7=0, posx8=0)

Returns the volume value for the selected voxel.

at(self, a0: vector_S32) -> int at(vector_int)

Returns the volume value for the selected voxel.

checkResize(self)
copyHeaderFrom(self, other: carto.PropertySet, stopOnError: bool = True)
copyHeaderFrom(self, other: carto.Object, stopOnError: bool = True) None
fill(self, value: bytes)
fill(value) None

Fill Volume_U8 using the given value.

fill(self, a0: int)

fillBorder(self, value: bytes)
fillBorder(value) None

Fill the surrounding of the volume view in the reference volume (if any) using the given value.

flipToOrientation(self, orient: object)

flipToOrientation(self, orient: object, force_memory_layout: object) volume.flipToOrientation(orient, force_memory_layout=””)

Flip the volume to a given orientation

The volume voxels will be reordered to match the given orientation.

If force_memory_layout is not given, then only the strides will be changed, and the data block will remain preserverd.

Orientation is given as a 3 char string: “LPI” (the default orientation in AIMS), “RAS”, and combinations of these 6 letters. See https://brainvisa.info/aimsdata/user_doc/coordinates_systems.html and http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm.

If force_memory_layout is used, on the contrary, the voxels data block will be reallocated and flipped to match the given orientation. It is also given as a 3 char string, thus it may specify a different memory layout from the one used for indices.

fromObject(a0: carto.GenericObject) rc_ptr_Volume_U8
getBorders(self) vector_S32
getSize(self) vector_S32

Number of voxels in each dimension (list of 4 ints)

getSizeT(self) int
getSizeX(self) int
getSizeY(self) int
getSizeZ(self) int
getStrides(self) vector_S64
getVoxelSize(self) vector_FLOAT

Voxel sizes in mm (list of 4 floats)

header(self) Any

The header contains all meta-data.

max(self) int
memoryLayoutOrientation(self) vector_S32

determine the memory layout orientation from strides and current indices orientation.

Use volume.referential().orientationStr(volume.memoryLayoutOrientation()) to get a more readable string description.

min(self) int
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
posInRefVolume(self) vector_S32

If the volume is a view into another (larger) one, this returns the position in “parent” one.

refVolume(self) rc_ptr_Volume_U8

If the volume is a view into another (larger) one, this returns the “parent” one.

referential(self) carto.Referential
reorientedHeader(self, orient: object) carto.Object
setPosInRefVolume(self, pos: vector_S32)

Set position in parent volume

setValue(self, a0: bytes, a1: int, a2: int = 0, a3: int = 0, a4: int = 0)
setValue(value, x, y=0, z=0, t=0) None

Set the voxel value at the given position.

setValue(self, a0: bytes, a1: vector_S32) setValue(value, [x1, x2, x3, x4, x5, x6…])

Set the voxel value at the given position.

setValue(self, a0: int, a1: int, a2: int = 0, a3: int = 0, a4: int = 0) Set a voxel value at given position

setValue(self, a0: int, a1: vector_S32) Set a voxel value at given position

setVoxelSize(self, a0: vector_FLOAT)
setVoxelSize(vs_list) None
setVoxelSize(vx, vy=1., vz=1., vt=1.) None

Set voxel sizes in mm (list of at least 4 floats)

setVoxelSize(self, vx: float, vy: float = 1, vz: float = 1, vt: float = 1)

property shape
storageLayoutOrientation(self) vector_S32

determine the storage (disk) layout orientation.

The storage orientation is optionnally stored int the header “storage_to_memory” matrix. If not, the storage orientation is undefined.

Use volume.referential().orientationStr(volume.storageLayoutOrientation()) to get a more readable string description.

value(self, a0: int, a1: int = 0, a2: int = 0, a3: int = 0) int
value(posx, posy=0, posz=0, post=0) None

value is an alias to at(): returns the volume value for the selected voxel.

class soma.aims.Writer[source]

Bases: object

write(obj, filename, format=None, options={})[source]

Writes the object <obj> in a file named <filename>, whatever the type of <obj>, as format <format>. All objects types and formats supported by the Aims IO system can be used. <obj> may be a reference-counter to an object type supported by the IO system. Additional specific options may be passed to the underlying IO system in an optional <options> dictionary.

writtenObjectDataType()[source]

Data content type (voxel or texture type…) written (available after writing)

writtenObjectFullType()[source]

Data full type written (available after writing)

writtenObjectType()[source]

Data object type (Volume, Mesh…) written (available after writing)

class soma.aims.aims

Bases: simplewrapper

class AffineTransformation3d
class AffineTransformation3d(a0: aims.AffineTransformation3d)
class AffineTransformation3d(a0: aims.Quaternion)
class AffineTransformation3d(a0: carto.Object)
class AffineTransformation3d(a0: vector_FLOAT)

Bases: AffineTransformation3dBase

affine()
isDirect(self) bool
isIdentity(self) bool
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
rotation(self) rc_ptr_Volume_FLOAT
rotationaroundx(a0: float) rc_ptr_Volume_FLOAT
rotationaroundy(a0: float) rc_ptr_Volume_FLOAT
rotationaroundz(a0: float) rc_ptr_Volume_FLOAT
scale(self, a0: AimsVector_FLOAT_3, a1: AimsVector_FLOAT_3)
setRotationAffine(self, a0: float, a1: float, a2: float, a3: AimsVector_FLOAT_3 = Point3df(0, 0, 0))
setToIdentity(self)
setTranslation(self, a0: AimsVector_FLOAT_3)
transformDouble(self, a0: float, a1: float, a2: float) AimsVector_DOUBLE_3
transformNormalDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformNormalFloat(self, x: float, y: float, z: float) AimsVector_FLOAT_3
transformNormalPoint3dd(self, dir: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformNormalPoint3df(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transformVectorDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformVectorFloat(self, x: float, y: float, z: float) AimsVector_FLOAT_3
transformVectorPoint3dd(self, vec: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformVectorPoint3df(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
translation(self) AimsVector_FLOAT_3
translationTransform(tx: float, ty: float, tz: float) aims.AffineTransformation3d
translationTransform(t: AimsVector_FLOAT_3) aims.AffineTransformation3d
translationTransform(t: vector_FLOAT) aims.AffineTransformation3d
class AimsApplication(a0: List, a1: object)
class AimsApplication(a0: aims.AimsApplication)

Bases: wrapper

initialize(self)
verbose(self) int
AimsConnectedComponent(data: rc_ptr_Volume_S16, connectivity: aims.Connectivity.Type, valids: object, backgrnd: int = 0, bin: bool = True, minSize: int = 0, numMax: int = 0, verbose: bool = True)
void AimsConnectedComponent(data, connectivity, valids, backgrnd=0,

bin=True, minSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • valids (dict short: size_t)

  • backgrnd (short)

  • bin (bool (optional))

  • minSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_S16, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (short)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: BucketMap_S16, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction, Bucket version. The function modifies the input data, and does not return a new one.

Parameters:
  • data (BucketMap_S16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (short)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxsize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_U16, connectivity: aims.Connectivity.Type, valids: object, backgrnd: int = 0, bin: bool = True, minSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, valids, backgrnd=0,

bin=True, minSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • valids (dict unsigned short: size_t)

  • backgrnd (unsigned short)

  • bin (bool (optional))

  • minSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_U16, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (unsigned short)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: BucketMap_U16, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction, Bucket version. The function modifies the input data, and does not return a new one.

Parameters:
  • data (BucketMap_U16 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (unsigned short)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxsize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_S32, connectivity: aims.Connectivity.Type, valids: object, backgrnd: int = 0, bin: bool = True, minSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, valids, backgrnd=0,

bin=True, minSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • valids (dict int: size_t)

  • backgrnd (int)

  • bin (bool (optional))

  • minSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_S32, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_S32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (int)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: BucketMap_S32, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction, Bucket version. The function modifies the input data, and does not return a new one.

Parameters:
  • data (BucketMap_S32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (int)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxsize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_U32, connectivity: aims.Connectivity.Type, valids: object, backgrnd: int = 0, bin: bool = True, minSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, valids, backgrnd=0,

bin=True, minSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • valids (dict unsigned: size_t)

  • backgrnd (unsigned)

  • bin (bool (optional))

  • minSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: rc_ptr_Volume_U32, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction. The function modifies the input data, and does not return a new one.

Parameters:
  • data (Volume_U32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (unsigned)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxSize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

AimsConnectedComponent(data: BucketMap_U32, connectivity: aims.Connectivity.Type, backgrnd: int = 0, bin: bool = True, minSize: int = 0, maxSize: int = 0, numMax: int = 0, verbose: bool = True) void AimsConnectedComponent(data, connectivity, backgrnd=0, bin=True,

minSize=0, maxSize=0, numMax=0, verbose=True)

Connected components extraction, Bucket version. The function modifies the input data, and does not return a new one.

Parameters:
  • data (BucketMap_U32 instance) – data will be modified during the process.

  • connectivity (Connectivity.Type enum code)

  • backgrnd (unsigned)

  • bin (bool (optional))

  • minsize (size_t (optional))

  • maxsize (size_t (optional))

  • numMax (size_t (optional))

  • verbose (bool (optional))

class AimsGraphReader(filename: object)
class AimsGraphReader(a0: aims.AimsGraphReader)

Bases: wrapper

readElements(self, g: Graph, mask: int = 1)
setExcludeFilter(self, toexclude: set_STRING)
setReadFilter(self, toread: set_STRING)
class AimsGraphWriter(filename: object)
class AimsGraphWriter(a0: aims.AimsGraphWriter)

Bases: wrapper

Global = 1
Keep = 0
Local = 2
class SavingMode

Bases: int

writeElements(self, g: Graph, newmode: aims.AimsGraphWriter.SavingMode = aims.AimsGraphWriter.Keep, oldmode: aims.AimsGraphWriter.SavingMode = aims.AimsGraphWriter.Keep, saveOnlyModified: bool = False)
class BarycenterCurvature(mesh: AimsTimeSurface_3_VOID)
class BarycenterCurvature(mesh: rc_ptr_AimsTimeSurface_3_VOID)

Bases: Curvature

doIt(self) Texture_FLOAT
class BoixCurvature(mesh: AimsTimeSurface_3_VOID)
class BoixCurvature(mesh: rc_ptr_AimsTimeSurface_3_VOID)

Bases: Curvature

doIt(self) Texture_FLOAT
class BoixGaussianCurvature(mesh: AimsTimeSurface_3_VOID)
class BoixGaussianCurvature(mesh: rc_ptr_AimsTimeSurface_3_VOID)

Bases: Curvature

doIt(self) Texture_FLOAT
class BucketUtil

Bases: wrapper

Utility class related to buckets

volumeFromBucket(bucket: BucketMap_VOID, borderwidth: int = 0, enable_shift: bool = True)
volume, offser = BucketUtil.volumeFromBucket(bucket, borderwidth=0,

enable_shift=True)

Bucket to volume conversion. Compared to Converter_BucketMap_Volume, this function has options to handle min bounding box, and allows to have borders.

If enable_shift is False, the volume will start at coordinates (0, 0, 0), without an offset (thus the volume may be much lager than needed, or may not contain the whole bucket if it has negative coordinates). In such case, pos is not used (thus passing 0 is OK).

volumeFromBucket(bucket: BucketMap_VOID, bbmin: AimsVector_S16_3, bbmax: AimsVector_S16_3, borderwidth: int = 0) -> rc_ptr_Volume_S16 volume = BucketUtil.volumeFromBucket(bucket, bbmin, bmax, borderwidth=0)

Bucket to volume conversion. Compared to Converter_BucketMap_Volume, this function has options to handle bounding box, and allows to have borders.

class BundleInfo
class BundleInfo(name: object)
class BundleInfo(id: int)
class BundleInfo(id: int, name: object)
class BundleInfo(a0: aims.BundleInfo)

Bases: wrapper

id(self) int
name(self) object
class BundleListener

Bases: wrapper

Serial processing of bundles.

BundleListener listens events from a BundleProducer object, typically emitted when a new bundle starts or ends, a fiber starts or ends etc.

To use it, BundleListener has to be subclassed and some of the following methods overloaded: * bundleStarted * bundleTerminated * fiberStarted * fiberTerminated * newFiberPoint * noMoreBundle

To connect the listener to a producer, use BundleProducer::addBundleListener().

Inherited classes may inherit both BundleListener and BundleProducer, if they are part of a processing chain.

bundleStarted(self, a0: aims.BundleProducer, a1: aims.BundleInfo)
bundleStarted(producer, bundle_info) None
bundleTerminated(self, a0: aims.BundleProducer, a1: aims.BundleInfo)
bundleTerminated(producer, bundle_info) None
fiberStarted(self, a0: aims.BundleProducer, a1: aims.BundleInfo, a2: aims.FiberInfo)
fiberStarted(producer, bundle_info, fiber_info) None
fiberTerminated(self, a0: aims.BundleProducer, a1: aims.BundleInfo, a2: aims.FiberInfo)
fiberTerminated(producer, bundle_info, fiber_info) None
newFiberPoint(self, a0: aims.BundleProducer, a1: aims.BundleInfo, a2: aims.FiberInfo, a3: AimsVector_FLOAT_3)
newFiberPoint(producer, bundle_info, fiber_info, point) None
noMoreBundle(self, a0: aims.BundleProducer)
noMoreBundle(producer) None
class BundleMotion(a0: object)
class BundleMotion(a0: aims.AffineTransformation3d)
class BundleMotion(a0: aims.BundleMotion)

Bases: BundleProducer, BundleListener

class BundleProducer

Bases: wrapper

Serial processing of bundles.

BundleProducer emits events to a BundleListener object while walking through a bundles set structure (or a bundles file), typically when a new bundle starts or ends, a fiber starts or ends etc.

To connect the listener to a producer, use BundleProducer::addBundleListener().

Inherited classes may inherit both BundleListener and BundleProducer, if they are part of a processing chain.

addBundleListener(self, a0: aims.BundleListener)
addBundleListener(listener) None

Connects a BundleProducer to a BunsdleListener.

addFiberPoint(self, a0: aims.BundleInfo, a1: aims.FiberInfo, a2: AimsVector_FLOAT_3)
noMoreBundle(self)
startBundle(self, a0: aims.BundleInfo)
startFiber(self, a0: aims.BundleInfo, a1: aims.FiberInfo)
terminateBundle(self, a0: aims.BundleInfo)
terminateFiber(self, a0: aims.BundleInfo, a1: aims.FiberInfo)
class BundleROISelect(roiIterator: carto.rc_ptr_RoiIterator, a1: object, defaultROIMinimumOverlap: float = 0)
class BundleROISelect(a0: aims.BundleROISelect)

Bases: BundleProducer, BundleListener

class BundleROISplit(roiIterator: carto.rc_ptr_RoiIterator, keepOriginalBundle: bool = False)
class BundleROISplit(a0: aims.BundleROISplit)

Bases: BundleProducer, BundleListener

class BundleReader

Bases: BundleProducer

Reads a bundles file, and emits events while walking through its data.

BundleReader is a BundleProducer, so can be listened by any BundleListener. It may read several bundles/fibers formats, using a lower-level BundleProducer dedicated to a specific format.

Currently .bundles (AIMS/Connectomist) and .trk (Trackvis) formats are supported.

formatExtensions(format: object = 'ALL') set_STRING
formatExtensions(format='ALL') None

return a set of file extensions associated with the given format. If the format is “ALL” (default) then all extensions of all supported formats are returned. If the format does not exist, an empty set is returned, and no error is issued.

read(self)
read() None

read() is the entry point to fibers processing, and triggers the producer machinery.

supportedFormats() set_STRING
supportedFormats() None

return a set of fiber tracts formats names supported by the BundlesReader.

class BundleSampler(percent: float, bundle_name: object, sampled_bundle_name: object, mode: int)
class BundleSampler(percent: float, bundle_name: object, sampled_bundle_name: object, mode: int, discarded: bool)
class BundleSampler(a0: aims.BundleSampler)

Bases: BundleProducer, BundleListener

class BundleToGraph

Bases: BundleListener, PropertySet

Bundles structure building as a Graph

The Graph structure is used to represent bundles and fibers when we need to keep their complete structure in memory. This structure is especially used for 3D rendering in Anatomist.

BundleToGraph is a BundleListener, thus has to be connected to a BundleProducer to work (typically, a BundleReader).

Note that the BundleProducer / BundleListener system work as processing chains, and allows to keep only a small set of data in memory at one time. The Graph structure, on the contrary, keeps all information in memory, so may need a large amount of memory.

class BundleToGraphWriter
class BundleToGraphWriter(a0: aims.BundleToGraphWriter)

Bases: BundleToGraph

setFileString(self, a0: object)
class BundleTransformer(direct_transformation)

Bases: BundleListener, BundleProducer

Apply a spatial transformation to fiber bundles.

Each point along the bundles is transformed according to the supplied transformation.

This is a BundleListener / BundleProducer stream processing class which applies vector field deformation to bundle data. It can be typically connected to a BundleReader and a BundleWriter.

class BundleWriter

Bases: BundleListener, PropertySet

Writes bundles information to a bundles file.

BundleWriter is a BundleListener, thus must be connected to a BundleProducer, and is fed by it.

It will write the .bundles format.

setFileString(self, a0: object)
setFileString(filename) None

Set the output file name.

class BundlesSlicer
class BundlesSlicer(a0: aims.BundlesSlicer)

Bases: BundleListener

addBundlesSlicerListener(self, a0: aims.BundlesSlicerListener)
class BundlesSlicerListener
class BundlesSlicerListener(a0: aims.BundlesSlicerListener)

Bases: wrapper

newBundleSlice(self, slicer: aims.BundlesSlicer, bundle: aims.BundleInfo, time: float, points: vector_POINT3DF)
noMoreBundleSlice(self, slicer: aims.BundlesSlicer)
startBundleSlicing(self, slicer: aims.BundlesSlicer, bundle: aims.BundleInfo)
terminateBundleSlicing(self, slicer: aims.BundlesSlicer, bundle: aims.BundleInfo)
class CiftiTools(matrix: rc_ptr_SparseOrDenseMatrix, smap: object = aims.CiftiTools.BrainStuctureToMeshMap())
class CiftiTools(matrix, smap={})

Bases: wrapper

Parameters:
  • mat (rc_ptr_SparseOrDenseMatrix) – matrix with CIFTI header (typically, read from CIFTI format via aims.read())

  • smap (map_STRING_S32) – brain structure name to mesh number map: defaults to the result of defaultBrainStructureToMeshMap()

  • aims.CiftiTools(a0 (aims.CiftiTools))

  • tools. (CIFTI-2 shaped matrices manipulation)

  • with (This class eases manipulation of matrices (SparseOrDenseMatrix))

  • nature (CIFTI information in their header. CIFTI information specify the)

  • matrix (of data contained in the)

  • parcellations (and can bring ROIs or)

  • information.

  • meshes. (Mainly one can obtain textures to map matrix information onto)

  • textures (Textures may be ROI information (label)

  • TimeTexture_S32)

:param : :param or matrix values textures: :param possibly expanded onto brain regions: :param (TimeTexture_FLOAT in this case).:

brainStructureMap(self) object
buildDimensionObjectFromLabelsTexture(self, dim: int, tex: TimeTexture_FLOAT)
buildDimensionObjectFromLabelsTexture(self, dim: int, tex: TimeTexture_S16) None
buildDimensionObjectFromLabelsTexture(self, dim: int, tex: TimeTexture_S32) None
defaultBrainStructureToMeshMap() object
defaultBrainStructureToMeshMap() None

Define the brain structure to mesh mapping: several meshes may be involved in CIFTI data mapping (typically a left hemisphere mesh and a right

Returns:

mesh_map – mesh identifier to index mapping

Return type:

map_STRING_S32

dimensionType(cifti_info: carto.Object, dim: int) object
dimensionType(self, dim: int) object
expandedValueTextureFromDimension(self, dim: int, other_dim_index_pos: vector_S32) List
expandedValueTextureFromDimension(dim, other_dim_index_pos) None

Get matrix data in textures, possibly expanded to regions if needed.

Parcels data will be expanded to all vertices of each parcel, etc. The resulting textures can be mapped on appropriate brain meshes.

Parameters:
  • dim (int) – dimension in the matrix to get info for

  • other_dim_index_pos (vector_S32) – position in fixed dimensions. Actually all dimensions must be specified (the size of this list must match the number of dimensions) but the specified dimension position will not be used (since all values will be extracted in textures), and possibly another one (scalars, series, labels dimension will be extracted in time steps or several textures).

Returns:

textures – Scalar or time series data will be stored in texture timepoints. Labels data will be stored in separate textures because they provide possibly different colormaps. In this case the returned list will have the size meshes_number * labels_number, and will be stored in this order: [mesh0_label0, mesh1_label0, .. meshN_label0, mesh0_label1, ..

meshN_label1, .. mesh0_label0, .. meshN_labelM]

Return type:

list of TimeTexture_FLOAT

getBrainStructureMeshNumberOfNodes(self, dim: int, struct_name: object) int
getBrainStructures(self, dim: int, keepSurfaces: bool = True, keepVoxels: bool = True) list_STRING
getBrainStructures(dim, keepSurfaces=True, keepVoxels=True) None

Retreive brain structures list in a brain models dimension

Parameters:
  • dim (int) – dimension in Cifti matrix

  • keepSurfaces (bool) – keep or filter out surface models

  • keepVoxels (bool) – keep or filter out voxesl models

Returns:

brain_structures – brain structures names list

Return type:

list of string

getDimensionObject(self, dim: int) carto.Object
getIndicesForBrainStructure(self, dim: int, struct_name: object) vector_S32
getIndicesForBrainStructure(dim, struct_name) None

Get the list of indices corresponding to a given brain structure in the matrix, on a given dimension.

getIndicesForSurfaceIndices(self, dim: int, surface_num: int, roi_indices: vector_S32) vector_S32
getIndicesForSurfaceIndices(dim, surface_num, roi_indices) None

Get the list of matrix indices corresponding to a given region on a mesh, for a given dimension.

Parameters:
  • dim (int) – matrix dimension

  • surface_num (int) – surface number (same as given by brainStructureMap())

  • roi_indices (list or array of int) – indices in the surface mesh of vertices if interest

Returns:

indices – list of indices in the matrix

Return type:

vector_S32

isMatchingSurface(self, dim: int, mesh: AimsTimeSurface_3_VOID, brainmodels: list_STRING, surf_hint: int = 0)
isMatchingSurfaceOrTexture(self, dim: int, nvertices: int, header: carto.Object, brainmodels: list_STRING, surf_hint: int = 0)
isMatchingTexture(self, dim: int, tex: TimeTexture_S16, brainmodels: list_STRING, surf_hint: int = 0)
isMatchingTexture(self, dim: int, tex: TimeTexture_S32, brainmodels: list_STRING, surf_hint: int = 0) None
isMatchingTexture(self, dim: int, tex: TimeTexture_FLOAT, brainmodels: list_STRING, surf_hint: int = 0) None
matrix(self) rc_ptr_SparseOrDenseMatrix
roiTextureFromDimension(self, dim: int) List
roiTextureFromDimension(dim) None

Get ROI information for a given matrix dimension.

If the matrix dimension defines ROIs (parcels, brain regions), textures defining these regions are built.

If the matrix dimension defines labels, an empty texture will be created, with appropriate colormap information

If the matrix dimensions defines scalars or series, this function will probably not be useful.

Parameters:

dim (int) – dimension in the matrix to get info for

Returns:

textures – textures of regions, possibly with colormaps in headers, for regions, parcels etc. One texture per mesh. For scalars or series, the list will be empty since no particular ROI description is contained in the header for this dimension.

Return type:

list of TimeTexture_S32

setBrainStructureMap(self, smap: object)
setMatrix(self, matrix: rc_ptr_SparseOrDenseMatrix)
valuesDimNum(self) int
valuesDimNum(cifti_info: carto.Object) int
valuesDimSize(mat: aims.SparseOrDenseMatrix, value_dim: int) int
class ConeSamplable(arrow: AimsVector_FLOAT_3, base: AimsVector_FLOAT_3, radius: float)
class ConeSamplable(a0: aims.ConeSamplable)

Bases: Samplable_FLOAT_3

contains(self, vector: AimsVector_FLOAT_3) bool
class Connectivity(oline: int, oslice: int, type: aims.Connectivity.Type)
class Connectivity(a0: aims.Connectivity)

Bases: wrapper

CONNECTIVITY_18_XYZ = 7
CONNECTIVITY_26_XYZ = 8
CONNECTIVITY_4_XY = 0
CONNECTIVITY_4_XYdiag = 28
CONNECTIVITY_4_XZ = 1
CONNECTIVITY_4_XZdiag = 29
CONNECTIVITY_4_YZ = 2
CONNECTIVITY_4_YZdiag = 30
CONNECTIVITY_5_XYminus = 17
CONNECTIVITY_5_XYplus = 18
CONNECTIVITY_5_XZminus = 21
CONNECTIVITY_5_XZplus = 22
CONNECTIVITY_5_XminusY = 15
CONNECTIVITY_5_XminusZ = 19
CONNECTIVITY_5_XplusY = 16
CONNECTIVITY_5_XplusZ = 20
CONNECTIVITY_5_YZminus = 25
CONNECTIVITY_5_YZplus = 26
CONNECTIVITY_5_YminusZ = 23
CONNECTIVITY_5_YplusZ = 24
CONNECTIVITY_6_XYZ = 3
CONNECTIVITY_8_XY = 4
CONNECTIVITY_8_XYZ = 27
CONNECTIVITY_8_XZ = 5
CONNECTIVITY_8_YZ = 6
CONNECTIVITY_9_XY_Zminus = 9
CONNECTIVITY_9_XY_Zplus = 10
CONNECTIVITY_9_XZ_Yminus = 11
CONNECTIVITY_9_XZ_Yplus = 12
CONNECTIVITY_9_YZ_Xminus = 13
CONNECTIVITY_9_YZ_Xplus = 14
class Type

Bases: int

dir(self, n: int) AimsVector_FLOAT_3
nbNeighbors(self) int
offset(self, n: int) int
type(self) aims.Connectivity.Type
type_from_string(a0: object) aims.Connectivity.Type
type_string(self) object
type_to_string(a0: aims.Connectivity.Type) object
xyzOffset(self, n: int) AimsVector_S16_3
class CoordinatesFieldMeshInterpoler(source: AimsTimeSurface_3_VOID, dest: AimsTimeSurface_3_VOID, srccoord1: TimeTexture_FLOAT, srccoord2: TimeTexture_FLOAT, dstcoord1: TimeTexture_FLOAT, dstcoord2: TimeTexture_FLOAT)
class CoordinatesFieldMeshInterpoler(a0: aims.CoordinatesFieldMeshInterpoler)

Bases: MeshInterpoler

class Curvature(mesh: AimsTimeSurface_3_VOID)
class Curvature(mesh: rc_ptr_AimsTimeSurface_3_VOID)

Bases: GeometricProperties

doIt(self) Texture_FLOAT
getTextureProperties(tex: Texture_FLOAT)
regularize(tex: Texture_FLOAT, ratio: float)
class CurvatureFactory
class CurvatureFactory(a0: aims.CurvatureFactory)

Bases: wrapper

createCurvature(self, mesh: AimsTimeSurface_3_VOID, method: object) aims.Curvature | None
createCurvature(self, mesh: rc_ptr_AimsTimeSurface_3_VOID, method: object) aims.Curvature | None
class CurveSelection(minimumLength: float)
class CurveSelection(a0: aims.CurveSelection)

Bases: BundleProducer, BundleListener

class CutMesh

Bases: wrapper

Cut meshes by a plane. The output of the operation is one cut mesh per input mesh, and possibly a border polygon mesh, and a plane intersection mesh.

The plane mesh is not always correct, it is now preferred to use GLU’s tesselation algorithm.

To use it:

  • initialize using a constructor and/or set input parameters (see also the CutTexturedMesh subclasses to handle textured meshes)

  • call cut() or cutBorder(), these are the methods actually doing things

  • get outputs using cutMeshes(), borderLine(), planeMesh() and CutTexturedMesh.cutTextures()

borderLine(self) rc_ptr_AimsTimeSurface_2_VOID
cut(self, buildborderline: bool = True, meshplane: bool = False, checkplane: bool = True)
cutBorder(self, timestep: int = 0)
cutMeshes(self) vector_rc_ptr_AimsTimeSurface_3_VOID
planeMesh(self) rc_ptr_AimsTimeSurface_3_VOID
class FastMarching(connectivity: object = '26', mid_interface: bool = False)
class FastMarching(connectivity='26', process_mid_interface=False)

Bases: wrapper

FastMarching(process_mid_interface)

(2nd form: deprecated constructor, with connectivity 26.)

Parameters:
  • connectivity (with specified) – “26”, “18”, “6”. The connectivity type is only used to build the interfaces between the work region and the seeds: the fast marching itself only uses 6-connectivity.

  • process_mid_interface (bool) – If process_mid_interface is false (the default), voronoi boundaries will not be available after propagation.

  • aims.FastMarching(a0 (aims.FastMarching))

  • aims.FastMarching(a0

  • implementation (Fast marching algorithm)

  • images. (for)

  • to (The fast marching is a propagation algorithm which is typically used)

  • the (perform distance maps. It may use a speed map to locally change)

  • Voronoi (propagation speed and distance. It may also be used to perform a)

  • diagam

  • boundaries. (and to get Voronoi regions)

  • way (It is used the following)

  • object (* instantiate a FastMarching)

  • connectivity

  • needed (* if) – or setInvSpeedMap()

  • setSpeedMap() (set the speed map (or inverse speed map) using) – or setInvSpeedMap()

  • distanc (* propagate using one of the doit() methods. It will return the) – map.

  • voronoiVol() (* Voronoi and boundaries can then be retreived using) – midInterface() or midInterfaceVol()

:param : midInterface() or midInterfaceVol()

clearSpeedMap(self)
doit(self, vol: rc_ptr_Volume_S16, worklabel: int, inlabel: int, outlabel: int) rc_ptr_Volume_FLOAT
doit(vol, worklabel, inlabel, outlabel) None

Perform fast marching propagation from a label image “vol”.

This is a simplified interface to the other, more general, doit() method.

Propagation will take place in the region “worklabel”, from seeds “inlabel” and “outlabel”.

Parameters:
  • vol (rc_ptr_Volume_S16) – label volume to build distance map from. Contains seeds, propagation (work) region, and possibly forbidden regions

  • worklabel (int16)

  • inlabel (int16)

  • outlabel (int16)

  • vol – label volume to build distance map from. Contains seeds, propagation (work) region, and possibly forbidden regions

  • worklabels (set_S16) – WARNING: the propagation labels in worklabels should be positive

  • seedlabels (set_S16)

Returns:

  • distance_map (rc_ptr_Volume_FLOAT) – resulting distance map

  • doit(self, vol (rc_ptr_Volume_S16, worklabels: set_S16, seedlabels: set_S16) -> rc_ptr_Volume_FLOAT)

  • doit(vol, worklabels, seedlabels)

  • Perform fast marching propagation from a label image “vol”.

  • Propagation will take place in the regions listed in “worklabels”, from

  • all seeds in the “seedlabels” list.

Returns:

distance_map – resulting distance map

Return type:

rc_ptr_Volume_FLOAT

invSpeedMap(self) rc_ptr_Volume_FLOAT
midInterface(self, label1: int, label2: int) BucketMap_FLOAT
midInterface(label1, label2) None

get the interface between Voronoi regions label1 and label2, as a bucket.

The mid_interface option must have been used when instantiating the FastMarching object, and propagation must have taken place.

midInterfaceLabels(self) Tuple
midInterfaceLabels() None

Voronoi interfaces labels. Given as a vector of pairs of labels

Returns:

labels – in the shape ((label1, label2), (label3, label4), …)

Return type:

tuple of tuples

midInterfaceVol(self, label1: int, label2: int) rc_ptr_Volume_FLOAT
midInterfaceVol(label1, label2) None

get the interface between Voronoi regions label1 and label2, as a volume.

the mid_interface option must have been used when instantiating the FastMarching object, and propagation must have taken place.

setInvSpeedMap(self, invspeed: rc_ptr_Volume_FLOAT)
setInvSpeedMap(invspeed) None

Sets an initialized inverse speed map (overrides any previous speed map).

Once a speed map (or inverse speed map) has been setup manually, it will be used during propagation in doit(), for only one run. The speed map data contents will be modified during the process, and the map will not be reusable for other data (seed voxels will be printed in it). The input inverse speed map object will also be modified since it is a shared reference, the algorithm will directly work in it.

Parameters:

invspeed (rc_ptr_Volume_FLOAT)

setSpeedMap(self, speed: rc_ptr_Volume_FLOAT)
setSpeedMap(speed) None

Sets an initialized speed map. The inverse speed will be deduced from it.

Once a speed map (or inverse speed map) has been setup manually, it will be used during propagation in doit(), for only one run. The speed map data contents will be modified during the process, and the map will not be reusable for other data (seed voxels will be printed in it).

Parameters:

speed (rc_ptr_Volume_FLOAT)

setVerbose(self, x: bool)
verbose(self) bool
voronoiVol(self) rc_ptr_Volume_S16
voronoiVol() None

get the resulting Voronoi regions (after propagation)

class FastMarching_BucketMap_S16(connectivity: object = '26', mid_interface: bool = False)
class FastMarching_BucketMap_S16(connectivity='26', process_mid_interface=False)

Bases: wrapper

FastMarching_BucketMap_S16(process_mid_interface)

(2nd form: deprecated constructor, with connectivity 26.)

Parameters:
  • connectivity (string) – “26”, “18”, “6”. The connectivity type is only used to build the interfaces between the work region and the seeds: the fast marching itself only uses 6-connectivity.

  • process_mid_interface (bool) – If process_mid_interface is false (the default), voronoi boundaries will not be available after propagation.

aims.FastMarching_BucketMap_S16(a0: bool)

aims.FastMarching_BucketMap_S16(a0: aims.FastMarching_BucketMap_S16)

Fast marching algorithm implementation, for buckets.

The fast marching is a propagation algorithm which is typically used to perform distance maps. It may use a speed map to locally change the propagation speed and distance. It may also be used to perform a Voronoi diagam, and to get Voronoi regions boundaries.

It is used the following way:

  • instantiate a FastMarching object, with specified connectivity

  • if needed, set the speed map (or inverse speed map) using setSpeedMap() or setInvSpeedMap()

  • propagate using one of the doit() methods. It will return the distanc map.

  • Voronoi and boundaries can then be retreived using voronoiVol(), midInterface() or midInterfaceVol()

clearSpeedMap(self)
doit(self, vol: rc_ptr_BucketMap_S16, worklabel: int, inlabel: int, outlabel: int) rc_ptr_BucketMap_FLOAT
doit(vol, worklabel, inlabel, outlabel) None

Perform fast marching propagation from a label bucket “vol”.

This is a simplified interface to the other, more general, doit() method.

Propagation will take place in the region “worklabel”, from seeds “inlabel” and “outlabel”.

Parameters:
  • vol (rc_ptr_BucketMap_S16) – label bucket to build distance map from. Contains seeds, propagation (work) region. Propagation outside the bucket will be forbidden.

  • worklabel (int16)

  • inlabel (int16)

  • outlabel (int16)

  • vol – label bucket to build distance map from. Contains seeds, propagation (work) region, and possibly forbidden regions

  • worklabels (set_S16)

  • seedlabels (set_S16)

Returns:

  • distance_map (rc_ptr_Volume_FLOAT) – resulting distance map

  • doit(self, vol (rc_ptr_BucketMap_S16, worklabels: set_S16, seedlabels: set_S16) -> rc_ptr_BucketMap_FLOAT)

  • doit(vol, worklabels, seedlabels)

  • Perform fast marching propagation from a label bucket “vol”.

  • Propagation will take place in the regions listed in “worklabels”, from

  • all seeds in the “seedlabels” list.

Returns:

distance_map – resulting distance map

Return type:

rc_ptr_Volume_FLOAT

midInterface(self, label1: int, label2: int) BucketMap_FLOAT
midInterface(label1, label2) None

get the interface between Voronoi regions label1 and label2, as a bucket.

The mid_interface option must have been used when instantiating the FastMarching object, and propagation must have taken place.

midInterfaceLabels(self) Tuple
midInterfaceLabels() None

Voronoi interfaces labels. Given as a vector of pairs of labels

Returns:

labels – in the shape ((label1, label2), (label3, label4), …)

Return type:

tuple of tuples

midInterfaceVol(self, label1: int, label2: int) rc_ptr_Volume_FLOAT
midInterfaceVol(label1, label2) None

get the interface between Voronoi regions label1 and label2, as a volume.

the mid_interface option must have been used when instantiating the FastMarching object, and propagation must have taken place.

setInvSpeedMap(self, invspeed: rc_ptr_BucketMap_FLOAT)
setInvSpeedMap(invspeed) None

Sets an initialized inverse speed map (overrides any previous speed map).

Parameters:

invspeed (rc_ptr_BucketMap_FLOAT)

setSpeedMap(self, speed: rc_ptr_BucketMap_FLOAT)
setSpeedMap(speed) None

Sets an initialized speed map. The inverse speed will be deduced from it.

Parameters:

speed (rc_ptr_BucketMap_FLOAT)

setVerbose(self, x: bool)
verbose(self) bool
voronoiVol(self) rc_ptr_BucketMap_S16
voronoiVol() None

get the resulting Voronoi regions (after propagation)

class FfdTransformation(*args)

Bases: Transformation3d

FFD vector field deformation transform

Free Form Deformation is the registration technique used to build the vector fields. This class is dedicated to the application of the vector field deformation to transform coordinates.

Vector fields are stored in volumes rc_ptr_Volume_POINT3DF.

buildFromOther(self, other: soma.Transformation3d)
composed(self, other: rc_ptr_Transformation3d) rc_ptr_Transformation3d
ctrlDeformations(self) rc_ptr_Volume_POINT3DF
deformation(self, p_mm: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
dimX(self) int
dimY(self) int
dimZ(self) int
ffdCoord(self, p_mm: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
getCtrlKnot(self, nx: int, ny: int, nz: int) AimsVector_FLOAT_3
increaseResolution(self, addKnots: AimsVector_S16_3)
isDirect(self) bool
isFlat(self, i: int) bool
isIdentity(self) bool
isXFlat(self) bool
isYFlat(self) bool
isZFlat(self) bool
leftComposed(self, other: rc_ptr_Transformation3d) rc_ptr_Transformation3d
printControlPointsGrid(self)
sizeX(self) float
sizeY(self) float
sizeZ(self) float
updateAllCtrlKnot(self, newCtrlKnotGrid: rc_ptr_Volume_POINT3DF)
updateAllCtrlKnotFromDeformation(self, newDeformationGrid: rc_ptr_Volume_POINT3DF)
updateCtrlKnot(self, nx: int, ny: int, nz: int, newCtrlKnot: AimsVector_FLOAT_3)
updateDimensions(self)
write(self, filename: object)
writeDebugCtrlKnots(self, filename: object)
writeDebugDeformations(self, filename: object, dimX: int, dimY: int, dimZ: int, sizeX: float, sizeY: float, sizeZ: float)
class FiberInfo
class FiberInfo(id: int)
class FiberInfo(a0: aims.FiberInfo)

Bases: wrapper

id(self) int
class Finder
class Finder(a0: aims.Finder)

Bases: wrapper

check(self, a0: object) bool
dataType(self) object
extensions(a0: object) List
finderFormat(format: object) aims.FinderFormat | None
format(self) object
header(self) carto.Object
objectType(self) object
possibleDataTypes(self) vector_STRING
registerFormat(fmtid: object, format: aims.FinderFormat | None, extensions: vector_STRING, before: object = '')
setDataType(self, dat: object)
setFormat(self, format: object)
setHeader(self, hdr: carto.Object)
setObjectType(self, obj: object)
setPossibleDataTypes(self, dt: vector_STRING)
unregisterFormat(format: object)
class FinderFormat
class FinderFormat(a0: aims.FinderFormat)

Bases: wrapper

check(self, filename: object, f: aims.Finder) bool
class FiniteElementCurvature(mesh: AimsTimeSurface_3_VOID)
class FiniteElementCurvature(mesh: rc_ptr_AimsTimeSurface_3_VOID)

Bases: Curvature

doIt(self) Texture_FLOAT
class FoldArgOverSegment(g: Graph | None)
class FoldArgOverSegment(a0: aims.FoldArgOverSegment)

Bases: wrapper

dilateBucket(in_: BucketMap_S16) BucketMap_S16 | None
findSplitLine(self, v: Vertex | None, pos: AimsVector_S16_3) rc_ptr_BucketMap_VOID
findSplitLine(self, v: Vertex | None, pos: list_POINT3D) rc_ptr_BucketMap_VOID
findSplitLine(self, v: Vertex | None, pos: list_POINT3DF) rc_ptr_BucketMap_VOID
mergeVertices(self, v1: Vertex | None, v2: Vertex | None)
mergeVertices(v1, v2) None

merge vertices into v1. v2 is removed from the graph.

printSplitInSkeleton(self, skel: rc_ptr_Volume_S16, v1: Vertex | None, v2: Vertex | None)
splitLineOnBucket(bucket: rc_ptr_BucketMap_VOID, pos: list_POINT3D) rc_ptr_BucketMap_VOID
splitSimpleSurface(bucket: rc_ptr_BucketMap_VOID, splitline: rc_ptr_BucketMap_VOID) Tuple
splitVertex(self, v: Vertex | None, splitline: rc_ptr_BucketMap_VOID, minsize: int = 50) Vertex | None
splitVertex(self, v: Vertex | None, pos: AimsVector_S16_3, minsize: int = 50) Vertex | None
splitVertex(self, v: Vertex | None, splitline: list_POINT3D, minsize: int = 50) Vertex | None
splitVertex(self, v: Vertex | None, splitline: list_POINT3DF, minsize: int = 50) Vertex | None
subdivizeGraph(self, piecelength: float = 50, minsize: int = 50, a2: set_VertexPtr | None = None) int
subdivizeVertex(self, v: Vertex | None, piecelength: float = 50, minsize: int = 50, a3: set_VertexPtr | None = None) int
class FoldGraphAttributes(skel: rc_ptr_Volume_S16, graph: Graph, talairachMotion: aims.AffineTransformation3d | None = None, inside: int = 0, outside: int = 11, withmeshes: bool = True, graphversion: vector_S32 = vector_S32())

Bases: wrapper

cleanup(self)
doAll(self)
getBrainDepth(self) rc_ptr_Volume_FLOAT
getBrainDepthGradX(self) rc_ptr_Volume_FLOAT
getBrainDepthGradY(self) rc_ptr_Volume_FLOAT
getBrainDepthGradZ(self) rc_ptr_Volume_FLOAT
getDepth(self) rc_ptr_Volume_S16
getDepthfactor(self) float
getDilatedDepth(self) rc_ptr_Volume_FLOAT
getDilatedDepthGradX(self) rc_ptr_Volume_FLOAT
getDilatedDepthGradY(self) rc_ptr_Volume_FLOAT
getDilatedDepthGradZ(self) rc_ptr_Volume_FLOAT
getNDepth(self) rc_ptr_Volume_S16
greyAndCSFVolumes(self, gw: rc_ptr_Volume_S16, voronoi: rc_ptr_Volume_S16)
makeCorticalRelationAttributes(self)
makeGlobalAttributes(self)
makeJunctionAttributes(self)
makeMeshes(self)
makePliDePassageAttributes(self)
makeSimpleSurfaceAttributes(self)
makeSummaryGlobalAttributes(self)
maxThreads(self) int
mesher(self) Mesher
prepareBrainDepthMap(self)
prepareDepthMap(self)
rebuildCorticalRelations(self) rc_ptr_Volume_S16
setMaxThreads(self, mt: int)

Sets the maxumum number of threads used in multithreaded-enabled parts. 1 means mono-threaded, 0 means une thread per CPU. A negative value means one thread per CPU, but never use more CPUs than the absolute value of the given number.

thickness(self, fm: BucketMap_FLOAT, voronoi: rc_ptr_Volume_S16)
class GaussianCurvature(mesh: AimsTimeSurface_3_VOID)
class GaussianCurvature(mesh: rc_ptr_AimsTimeSurface_3_VOID)

Bases: Curvature

doIt(self) Texture_FLOAT
class GeodesicPath(surface: AimsTimeSurface_3_VOID, method: int, strain: int)

Bases: wrapper

aims.GeodesicPath(surface: AimsTimeSurface_3_VOID, texCurv: TimeTexture_FLOAT, method: int, strain: int) GeodesicPath(surface, texCurv, method, strain) GeodesicPath(surface, method, strain)

Initializes the geodesic path structures for a given mesh geometry, using a constraint map (curvature, typically). Several methods are available.

Parameters:
  • surface (AimsTimeSurface_3_VOID) – mesh to compute geodesic paths or distances on

  • texCurv (TimeTexture_FLOAT) – constraint map texture. If not specified, the curvature will be computed and used as constraint.

  • method (int) –

    0:

    unconstrained,

    1:

    minimize the constraint map, suitable for sulci using the curvature as constraint,

    2:

    maximize constraint map, suitable for gyri using the curvature as constraint,

    3:

    unconstrained

  • strain (int) – weight factor on the constraints map. In practice we use 3 for sulci and gyri.

  • aims.GeodesicPath(a0 (aims.GeodesicPath))

  • maps (It is possible to get distance)

  • algorithm (using the Dijkstra)

  • Ex:: – from soma import aims, aimsalgo mesh = aims.read(‘mesh.gii’) gp = GeodesicPath(mesh, 0, 0) dmap = TimeTexture(‘FLOAT’) // get a distance map from vertex no 12 dmax = gp.distanceMap_1_N_ind(12, dmap[0].data(), 0) aims.write(dmax, ‘distance.gii’)

  • maps

  • points. (or paths between two or more)

distanceMap_1_N_ind(self, source: int, distanceMap: vector_FLOAT, type_distance: int) float | None

Compute a distance map from a given point

Parameters:
  • source (int) – index of the starting point (vertex number)

  • distanceMap (vector_FLOAT) – output distance map, the vector can be empty, it will be filled with as many values as the mesh vertices number.

  • type_distance (int) –

    0:

    weighted distance,

    1:

    euclidean distance

Returns:

length – max distance

Return type:

float

longestPath_1_N_ind(self, source: int, targets: vector_U32, type_distance: int)
longestPath_1_N_ind(source, targets, type_distance) None
Parameters:
Returns:

  • target (unsigned)

  • length (float)

longestPath_N_N_ind(self, points: vector_U32, type_distance: int)
longestPath_N_N_ind(points, type_distance) None
Parameters:
Returns:

  • s (int)

  • d (int)

  • length (float)

shortestPath_1_1_1_ind(self, source: int, middle: int, target: int) vector_U32
shortestPath_1_1_1_ind(source, middle, target) None
Parameters:
  • source (unsigned)

  • middle (unsigned)

  • target (unsigned)

Returns:

path

Return type:

vector_U32

shortestPath_1_1_ind(self, source: int, target: int) vector_U32
shortestPath_1_1_ind(source, target) None
Parameters:
  • source (unsigned)

  • target (unsigned)

  • source

  • target

  • subset (TimeTexture_S16)

Returns:

  • path (vector_U32)

  • shortestPath_1_1_ind(self, source (int, target: int, subset: TimeTexture_S16) -> vector_U32)

  • shortestPath_1_1_ind(source, target, subset)

Returns:

path

Return type:

vector_U32

shortestPath_1_1_ind_xyz(self, source: int, target: int, indice: vector_U32, coord3D: vector_POINT3DF)
shortestPath_1_1_ind_xyz(source, target, indice, coord3D) None
Parameters:
shortestPath_1_1_len(self, source: int, target: int) float
shortestPath_1_1_len(source, target) None
Parameters:
  • source (unsigned)

  • target (unsigned)

Returns:

length

Return type:

float

shortestPath_1_1_tex(self, source: int, target: int, texturevalue: float, tex: TimeTexture_FLOAT)
shortestPath_1_1_tex(source, target, texturevalue, tex) None
Parameters:
shortestPath_1_N_ind(self, source: int, targets: vector_U32)
shortestPath_1_N_ind(source, targets) None
Parameters:
Returns:

  • target (unsigned)

  • length (float)

class GeometricProperties(mesh: AimsTimeSurface_3_VOID)
class GeometricProperties(mesh: rc_ptr_AimsTimeSurface_3_VOID)

Bases: wrapper

buildSortVerticesNeighborhood(self, i: int)
doAlpha(self)
doBeta(self)
doDot(self)
doGraph(self)
doNeighbor(self)
doPhi(self)
doSimpleAlpha(self)
doSurface(self)
doTheta(self)
getAlpha(self) vector_FLOAT
getBeta(self) vector_FLOAT
getMesh(self) AimsTimeSurface_3_VOID
getNeighbor(self) vector_list_U32
getRcMesh(self) rc_ptr_AimsTimeSurface_3_VOID
getSimpleAlpha(self) vector_FLOAT
getTriangleNeighbor(self) vector_list_U32
graphToMesh(self)
sortPolygons(self, npoly: list_U32)
class GradientAdvection
class GradientAdvection(a0: aims.GradientAdvection)

Bases: wrapper

descend_scalar_field(self, seeds: rc_ptr_Volume_S16, field: rc_ptr_Volume_FLOAT) rc_ptr_Volume_S16
doit(self, label_vol: rc_ptr_Volume_S16, gradX: rc_ptr_Volume_FLOAT, gradY: rc_ptr_Volume_FLOAT, gradZ: rc_ptr_Volume_FLOAT, seedlabel: int) rc_ptr_Volume_S16
propagate_all_labels(self, seeds: rc_ptr_Volume_S16, fieldx: rc_ptr_Volume_FLOAT, fieldy: rc_ptr_Volume_FLOAT, fieldz: rc_ptr_Volume_FLOAT) rc_ptr_Volume_S16
setPropagationThreshold(self, a0: float)
setVerbose(self, a0: bool = True)
class GraphManip
class GraphManip(a0: aims.GraphManip)

Bases: wrapper

attributeColor(self, graph: Graph, att: object) vector_S32
buckets2Volume(g: Graph)
completeGraph(a0: Graph)
getICBM2009cTemplateTransform(g: Graph) aims.AffineTransformation3d

transform = aims.GraphManip.getICBM2009cTemplateTransform(graph)

Extract the transformation to the MNI ICBM152 space, shifted to the “most standard” field of view of the template image, the one from the ICBM2009c_nlin_asym template from the MNI. Actually we find various fields of view for the templates. The one we use here is (193, 229, 193). The transform to the “real” ICBM space (0 roughly at AC) is provided in the output transformation header. This space has a fixed transformation with our Aims Talairach, along with the template volume size and voxel size. This space has a fixed transformation with our Aims Talairach. Includes shifts and axes inversions.

getICBMTransform(g: Graph) aims.AffineTransformation3d

transform = aims.GraphManip.getICBMTransform(graph)

Extract the transformation to the MNI ICBM152 space. This space has a fixed transformation with our Aims Talairach.

getPath(from_: Vertex | None, to: Vertex | None) list_EdgePtr
get_element_table(graph: Graph) Any

Get the GraphElementTable as a dict. The dict has the following shape:

{
    syntax_name: {
        id_name: GraphElementCode_object
    }
}

GraphElementCode objects are given as dicts (str, str):

{
    'id': <same_as_key: filename (globals) or attribute for filename (locals)>,
    'attribute': <attribute_name_in_graph_element>,
    'objectType': <type of object>,
    'dataType': <data type of object>,
    'storageType': <'Global', 'Local', or 'GlobalPacked'>,
    'local_file_attribute': <attribute giving the filename for local storage in each graph elememt>,
    'global_index_attribute': <attribute giving the index for global storage in each graph elememt>,
    'global_filename': <filename for global storage>,
    'global_attribute': <attribute>,
    'syntax': <syntax_name>
}
graphFromVolume(vol: rc_ptr_Volume_S16, background: int = 0, trans: object | None = None) Graph | None

graph = graphFromVolume(vol, background=0, trans=None) graphFromVolume(vol, graph, background=0, trans=None,

automaticBackgroundSearch=True)

builds a ROI graph from a volume of labels

graphFromVolume(vol: rc_ptr_Volume_S32, background: int = 0, trans: Optional[object] = None) -> Optional[Graph]

graphFromVolume(vol: rc_ptr_Volume_S16, g: Graph, background: int = 0, trans: Optional[object] = None, automaticBackgroundSearch: bool = True)

graphFromVolume(vol: rc_ptr_Volume_S32, g: Graph, background: int = 0, trans: Optional[object] = None, automaticBackgroundSearch: bool = True)

printGraphElementTable(a0: Graph)
setAttributeColor(graph: Graph, att: object, a2: AimsRGB)
setAttributeColor(graph: Graph, att: object, a2: AimsRGBA) None
setAttributeColor(graph: Graph, att: object, a2: vector_S32) None
storeAims(graph: Graph, vertex: GraphObject | None, attribute: object, obj: rc_ptr_AimsTimeSurface_3_VOID)
storeAims(graph: Graph, vertex: GraphObject | None, attribute: object, obj: rc_ptr_AimsTimeSurface_2_VOID) None
storeAims(graph: Graph, vertex: GraphObject | None, attribute: object, obj: rc_ptr_BucketMap_VOID) None
storeTalairach(g: Graph, m: aims.AffineTransformation3d)
talairach(g: Graph) aims.AffineTransformation3d
volume2Buckets(g: Graph)
class HarmonicCageMeshResampler(a0: rc_ptr_Volume_U32, controls: vector_POINT3DF, background: int = 0, border: int = 1, inside: int = 2)
class HarmonicCageMeshResampler(a0: aims.HarmonicCageMeshResampler)

Bases: wrapper

computeCoordinates(self, threshold: float = 0.0001)
coordinate(self, p: AimsVector_FLOAT_3) AimsVector_FLOAT_3
coordinates(self, a0: AimsTimeSurface_3_VOID) AimsTimeSurface_3_VOID | None
getControl(self, ind: int) AimsVector_FLOAT_3
get_image_coords(self, ind: int) rc_ptr_Volume_FLOAT
moveControl(self, ind: int, p: AimsVector_FLOAT_3)
set_keep_image_coords(self, state: bool)
class Hierarchy
class Hierarchy(a0: aims.Hierarchy)

Bases: Tree

find(name)
find_color(name, default_color=<class 'KeyError'>)
class IOObjectTypesDictionary
class IOObjectTypesDictionary(a0: aims.IOObjectTypesDictionary)

Bases: wrapper

formats(objectType: object, datatype: object) set_STRING
hasType(objtype: object, datatype: object) bool
objectsTypes() Dict
class Interpolator(*args)

Bases: RCObject

isValid(self, a0: float, a1: float, a2: float) bool
isValid(self, a0: AimsVector_FLOAT_3) bool
value(self, a0: float, a1: float, a2: float) float
value(self, a0: AimsVector_FLOAT_3) float
values(self, a0: float, a1: float, a2: float) vector_DOUBLE
values(self, a0: AimsVector_FLOAT_3) vector_DOUBLE
class MaskIterator(*args)

Bases: RCObject

contains(self, a0: AimsVector_S16_3) bool
contains(self, a0: AimsVector_FLOAT_3) bool
isValid(self) bool
next(self)
regionName(self) object
restart(self)
value(self) AimsVector_S16_3
valueMillimeters(self) AimsVector_FLOAT_3
volumeDimension(self) AimsVector_S16_3
voxelSize(self) AimsVector_FLOAT_3
class MeshInterpoler(source: AimsTimeSurface_3_VOID, dest: AimsTimeSurface_3_VOID)
class MeshInterpoler(a0: aims.MeshInterpoler)

Bases: wrapper

class InterpolationType

Bases: int

Linear = 0
NearestNeighbour = 1
project(self)
projectedTriCoord1(self) TimeTexture_FLOAT
projectedTriCoord2(self) TimeTexture_FLOAT
projectedTriCoord3(self) TimeTexture_FLOAT
projectedTriangles(self) TimeTexture_U32
reloadProjectionParams(self, projTriangles: TimeTexture_U32, projTriCoord1: TimeTexture_FLOAT, projTriCoord2: TimeTexture_FLOAT, projTriCoord3: TimeTexture_FLOAT)
resampleMesh(self, sourceshape: AimsTimeSurface_3_VOID) AimsTimeSurface_3_VOID | None
resampleTexture(self, a0: TimeTexture_FLOAT, a1: aims.MeshInterpoler.InterpolationType = aims.MeshInterpoler.Linear) TimeTexture_FLOAT | None
resampleTexture(self, a0: Texture_FLOAT, a1: Texture_FLOAT, a2: int = 0, a3: aims.MeshInterpoler.InterpolationType = aims.MeshInterpoler.Linear) None
resampleTexture(self, a0: TimeTexture_S16, a1: aims.MeshInterpoler.InterpolationType = aims.MeshInterpoler.Linear) TimeTexture_S16 | None
resampleTexture(self, a0: Texture_S16, a1: Texture_S16, a2: int = 0, a3: aims.MeshInterpoler.InterpolationType = aims.MeshInterpoler.Linear) None
resampleTexture(self, a0: TimeTexture_S32, a1: aims.MeshInterpoler.InterpolationType = aims.MeshInterpoler.Linear) TimeTexture_S32 | None
resampleTexture(self, a0: Texture_S32, a1: Texture_S32, a2: int = 0, a3: aims.MeshInterpoler.InterpolationType = aims.MeshInterpoler.Linear) None
resampleTexture(self, a0: TimeTexture_POINT2DF, a1: aims.MeshInterpoler.InterpolationType = aims.MeshInterpoler.Linear) TimeTexture_POINT2DF | None
resampleTexture(self, a0: Texture_POINT2DF, a1: Texture_POINT2DF, a2: int = 0, a3: aims.MeshInterpoler.InterpolationType = aims.MeshInterpoler.Linear) None
setDiscontinuityThresholds(self, xthresh: float, ythresh: float, zthresh: float)
setMeshes(self, source: AimsTimeSurface_3_VOID, dest: AimsTimeSurface_3_VOID)
class PointsDistribution(force: aims.PointsDistribution.ForceFunction | None = None, move_constraint: aims.PointsDistribution.MoveConstraints | None = None)
class PointsDistribution(force=None, move_constaint=None)

Bases: wrapper

Parameters:
  • force (aims.PointsDistribution.ForceFunction instance) – force / energy function between 2 points. Takes 2 points and a bool (has_link), and returns the force vector applied to the 1st point. Defaults to a Coulomb force (r_vec/r^3)

  • move_constraints (aims.PointsDistribution.MoveConstraints instance) – applies force to a point, and add additional constraints. Takes a point, a force vector, and a step (factor to the force), returns the new point position. Default: projects the force to be tangent to a unit sphere, and renormalizes the resulting point position to stock on the sphere.

  • aims.PointsDistribution(a0 (aims.PointsDistribution))

  • for (Points repartition using forces in a given geometry (on a sphere)

  • instance).

  • from (adapted)

  • http (//www.nicoptere.net/AS3/distribution/Distribute.as)

  • forces (Points are moved according to)

  • minimization (using an energy)

  • method.

  • added (A few parameters have been)

  • spheres (to allow fitting)

  • "free" (or)

  • forces. (geometries and)

  • defined (Linked points can be)

  • behaviours. (with different force)

class CoulombAndRestoringForce

Bases: ForceFunction

Utility function for sphere_distribution.

Individual Coulomb force between 2 points, plus a restoring force that avoids points expanding away like the universe

energy(self, p1: AimsVector_FLOAT_3, p2: AimsVector_FLOAT_3, has_link: bool) float
force(self, p1: AimsVector_FLOAT_3, p2: AimsVector_FLOAT_3, has_link: bool) AimsVector_FLOAT_3
class CoulombForce

Bases: ForceFunction

Utility function for sphere_distribution.

Individual Coulomb force between 2 points

energy(self, p1: AimsVector_FLOAT_3, p2: AimsVector_FLOAT_3, has_link: bool) float

Coulomb energy of the force between 2 points (1/r)

force(self, p1: AimsVector_FLOAT_3, p2: AimsVector_FLOAT_3, has_link: bool) AimsVector_FLOAT_3

Coulomb electrostatic force between 2 points (r_vec/r^3)

class ForceFunction

Bases: wrapper

Utility force class for sphere_distribution.

Individual force and energy between 2 points

energy(self, p1: AimsVector_FLOAT_3, p2: AimsVector_FLOAT_3, has_link: bool) float

Energy of the force between 2 points

Energy functions are the integral of corresponding forces - they are used to drive the minimization.

force(self, p1: AimsVector_FLOAT_3, p2: AimsVector_FLOAT_3, has_link: bool) AimsVector_FLOAT_3
force(p1, p2, has_link) None

Force between 2 points

Parameters:
  • p1 (Point3df) – 1st point

  • p2 (Point3df) – 2nd point

  • has_link (bool) – True if points p1 and p2 are linked and should be closer

Returns:

force

Return type:

Point3df

class MoveConstraints

Bases: wrapper

Utility function for sphere_distribution.

Add force f * step to the returned point position pt, and optionally apply some specific position constraints (stick to sphere…)

position(self, pt: AimsVector_FLOAT_3, f: AimsVector_FLOAT_3, step: float) AimsVector_FLOAT_3
position(pt, f, step) None

The default is unconstrained: just move the requested amount

Parameters:
  • pt (Point3df) – point to be moved

  • f (Point3df) – force which applies on the point

  • step (float) – move step factor

Returns:

new_pos – Position after move and application of constraints

Return type:

Point3df

class SphereMove

Bases: MoveConstraints

Move point constrained to a uinit sphere: project the force to be tangent to the sphere, move the point, then stick it onto the sphere.

position(self, pt: AimsVector_FLOAT_3, f: AimsVector_FLOAT_3, step: float) AimsVector_FLOAT_3
distribute(self, pts: vector_POINT3DF, nsteps: int = 100, step: float = 0.01) vector_POINT3DF | None
distribute(pts, nsteps=100, step=0.01) None

get a points distribution on a sphere.

Parameters:
  • points (list of 3D points (Point3df))

  • nsteps (max number of optimization iterations)

  • step (initial move step factor (is adapted during the minimization))

distribute(self, npoints: int, nsteps: int = 100, step: float = 0.01) -> Optional[vector_POINT3DF] distribute(npoints, nsteps=100, step=0.01)

Same as above but point are randomly initialized on a sphere, using the init_points() function

get_coulomb_energy(self, pts: vector_POINT3DF) float
get_forces(self, pts: vector_POINT3DF) vector_POINT3DF | None
init_points(npoints: int) vector_POINT3DF
init_points(npoints) None

Randomly initialize npoints points on a unit sphere

Parameters:

npoints (int) – number of points to initialize

Returns:

points – points 3D positions

Return type:

aims.vector_POINT3DF

setForceFunction(self, force: aims.PointsDistribution.ForceFunction | None)
setForceFunction(force) None

Set the individual force function

Parameters:

force (aims.PointsDistribution.ForceFunction instance)

setMoveConstraints(self, move_constaint: aims.PointsDistribution.MoveConstraints | None)
setMoveConstraints(move_constaint) None

Set the individual move constraints function

Parameters:

move_constaint (aims.PointsDistribution.MoveConstraints instance)

set_links(links) None

Set linked points set

Optional links. Linked points have different forces to make them closer. The links dict maps a point num to a set of linked points: {0: [1, 3], 1: [0, 5], 2: [4], 3: [0]} The map should be symmetrical.

class Quaternion
class Quaternion(q: AimsVector_FLOAT_4)
class Quaternion(q: aims.Quaternion)
class Quaternion(x: float, y: float, z: float, t: float)
class Quaternion(tr: aims.AffineTransformation3d)

Bases: wrapper

angle(self) float
axis(self) AimsVector_FLOAT_3
buildFromMatrix(self, m: vector_FLOAT)
buildFromMatrix(m) None
Parameters:

m (vector_FLOAT) – 4x4 matrix in columns (OpenGL-style). Be careful that it is not the expected order for a numpy array using ravel(), which have to be transposed.

buildFromMotion(self, m: aims.AffineTransformation3d)
buildFromTransformation(self, m: aims.AffineTransformation3d)
compose(value, /)

Return self*value.

fromAxis(self, c: AimsVector_FLOAT_3, phi: float)
inverse(self) aims.Quaternion
norm(self)
normalized(self) aims.Quaternion
setVector(self, vec: AimsVector_FLOAT_4)
transform(self, p: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transform(self, x: float, y: float, z: float) AimsVector_FLOAT_3
transformInverse(self, p: AimsVector_FLOAT_3) AimsVector_FLOAT_3
vector(self) AimsVector_FLOAT_4
class RegularBinnedHistogram_DOUBLE(bins: int = 0)
class RegularBinnedHistogram_DOUBLE(other: aims.RegularBinnedHistogram_DOUBLE)

Bases: Histogram_DOUBLE

bins(self) int
doit(self, thing: rc_ptr_Volume_DOUBLE)
doit(self, thing: rc_ptr_Volume_DOUBLE, mini: float, maxi: float) None
maxDataValue(self) float
minDataValue(self) float
setBins(self, bins: int)
unique(self, thing: rc_ptr_Volume_DOUBLE, abort_max: int = 0) vector_DOUBLE | None
class RegularBinnedHistogram_FLOAT(bins: int = 0)
class RegularBinnedHistogram_FLOAT(other: aims.RegularBinnedHistogram_FLOAT)

Bases: Histogram_FLOAT

bins(self) int
doit(self, thing: rc_ptr_Volume_FLOAT)
doit(self, thing: rc_ptr_Volume_FLOAT, mini: float, maxi: float) None
maxDataValue(self) float
minDataValue(self) float
setBins(self, bins: int)
unique(self, thing: rc_ptr_Volume_FLOAT, abort_max: int = 0) vector_FLOAT | None
class RegularBinnedHistogram_S16(bins: int = 0)
class RegularBinnedHistogram_S16(other: aims.RegularBinnedHistogram_S16)

Bases: Histogram_S16

bins(self) int
doit(self, thing: rc_ptr_Volume_S16)
doit(self, thing: rc_ptr_Volume_S16, mini: int, maxi: int) None
maxDataValue(self) int
minDataValue(self) int
setBins(self, bins: int)
unique(self, thing: rc_ptr_Volume_S16, abort_max: int = 0) vector_S16 | None
class RegularBinnedHistogram_S32(bins: int = 0)
class RegularBinnedHistogram_S32(other: aims.RegularBinnedHistogram_S32)

Bases: Histogram_S32

bins(self) int
doit(self, thing: rc_ptr_Volume_S32)
doit(self, thing: rc_ptr_Volume_S32, mini: int, maxi: int) None
maxDataValue(self) int
minDataValue(self) int
setBins(self, bins: int)
unique(self, thing: rc_ptr_Volume_S32, abort_max: int = 0) vector_S32 | None
class RegularBinnedHistogram_U16(bins: int = 0)
class RegularBinnedHistogram_U16(other: aims.RegularBinnedHistogram_U16)

Bases: Histogram_U16

bins(self) int
doit(self, thing: rc_ptr_Volume_U16)
doit(self, thing: rc_ptr_Volume_U16, mini: int, maxi: int) None
maxDataValue(self) int
minDataValue(self) int
setBins(self, bins: int)
unique(self, thing: rc_ptr_Volume_U16, abort_max: int = 0) vector_U16 | None
class RegularBinnedHistogram_U32(bins: int = 0)
class RegularBinnedHistogram_U32(other: aims.RegularBinnedHistogram_U32)

Bases: Histogram_U32

bins(self) int
doit(self, thing: rc_ptr_Volume_U32)
doit(self, thing: rc_ptr_Volume_U32, mini: int, maxi: int) None
maxDataValue(self) int
minDataValue(self) int
setBins(self, bins: int)
unique(self, thing: rc_ptr_Volume_U32, abort_max: int = 0) vector_U32 | None
class RegularBinnedHistogram_U8(bins: int = 0)
class RegularBinnedHistogram_U8(other: aims.RegularBinnedHistogram_U8)

Bases: Histogram_U8

bins(self) int
doit(self, thing: rc_ptr_Volume_U8)
doit(self, thing: rc_ptr_Volume_U8, mini: bytes, maxi: bytes) None
maxDataValue(self) bytes
minDataValue(self) bytes
setBins(self, bins: int)
unique(self, thing: rc_ptr_Volume_U8, abort_max: int = 0) vector_U8 | None
class ResamplerFactory_DOUBLE

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_DOUBLE | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_DOUBLE

class ResamplerFactory_FLOAT

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_FLOAT | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_FLOAT

class ResamplerFactory_HSV

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_HSV | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_HSV

class ResamplerFactory_POINT3DF

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_POINT3DF | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_POINT3DF

class ResamplerFactory_RGB

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_RGB | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_RGB

class ResamplerFactory_RGBA

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_RGBA | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_RGBA

class ResamplerFactory_S16

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_S16 | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_S16

class ResamplerFactory_S32

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_S32 | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_S32

class ResamplerFactory_U16

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_U16 | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_U16

class ResamplerFactory_U32

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_U32 | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_U32

class ResamplerFactory_U8

Bases: wrapper

ResamplerFactory classes are used to instantiate a Resampler object for the chosen interpolation type. The main method is getResampler().

Cubic = 3
Linear = 1
MajorityLabel = 101
Median = 201
NearestNeighbor = 0
Quadratic = 2
Quartic = 4
Quintic = 5
class ResamplerType

Bases: int

SeventhOrder = 7
SixthOrder = 6
getResampler(order: int) Resampler_U8 | None
getResampler(order) resampler

Instantiate a Resampler of the given order.

Parameters:

order (int) – order of interpolation: 0 is nearest neighbour (no interpolation), 1 is linear, 3 is cubic, etc. up to 7th order.

Returns:

result – a new instance of the selected resampler type

Return type:

Resampler_U8

class RoiDiff
class RoiDiff(a0: aims.RoiDiff)

Bases: wrapper

class DiffStat
class DiffStat(a0: aims.RoiDiff.DiffStat)

Bases: wrapper

dice
g2_bucket
matching_voxels
unmatching_voxels
diff(self, g1: Graph, g2: Graph)
globalStats(self) aims.RoiDiff.DiffStat
graph2LabelVolume(self) rc_ptr_Volume_S16
mismatch_bucket(self) rc_ptr_BucketMap_VOID
roiNames(self) vector_STRING
roiNamesInv(self) object
statsByLabel(self, label: object) aims.RoiDiff.DiffStat | None
writeCSV(self, name: object)
class RoiIterator(*args)

Bases: RCObject

count(self) int
isValid(self) bool
maskIterator(self) carto.rc_ptr_MaskIterator
next(self)
regionName(self) object
restart(self)
setRegionNameAttributes(self, a0: vector_STRING)
setRegionNameAttributes(attributes) None

set region name attribute in graph. Normally “name” or “label”. If several values are provided, attributes are searched in each graph vertex, in that order. If the attributes list is empty, then the graph “label_property” attribute will be used, and if it is not specified there, the default search list (“name”, “label”) will be used.

setRegionNameAttributes(self, a0: object)

class SimpleBundlesSlicer(numberOfSlice: int)
class SimpleBundlesSlicer(a0: aims.SimpleBundlesSlicer)

Bases: BundlesSlicer

class Spam
class Spam(a0: aims.Spam)

Bases: SpamBase

class SpamBase

Bases: wrapper

prodlikelihoods(self, X: Volume_DOUBLE, shift: float) Tuple
set_bb_talairach_offset(self, bb_talairach_offset: AimsVector_DOUBLE_3)
set_bb_talairach_size(self, bb_talairach_size: AimsVector_DOUBLE_3)
set_img_density(self, img_density: Volume_FLOAT | None)
class SpamFromLikelihood
class SpamFromLikelihood(a0: aims.SpamFromLikelihood)

Bases: SpamBase

class SparseMatrix(size1: int = 1, size2: int = 1)
class SparseMatrix(other: aims.SparseMatrix)

Bases: RCObject

erase_element(self, i: int, j: int)
fill(self, value: float)
fill(self, offset1: int, offset2: int, size1: int, size2: int, value: float) None
fill(self, offset1: int, offset2: int, other: aims.SparseMatrix, size1: int = 0, size2: int = 0) None
getColumn(self, j: int) vector_DOUBLE
getComposition(self, other: aims.SparseMatrix) aims.SparseMatrix
getComposition(self, other: vector_DOUBLE) vector_DOUBLE
getNonZeroElementCount(self) int
getRow(self, i: int) vector_DOUBLE
getSize1(self) int
getSize2(self) int
getTrace(self) float
getTransposition(self) aims.SparseMatrix
hasElement(self, i: int, j: int) bool
header(self) carto.Object
isSquare(self) bool
read(self, filename: object, openmode: object = 'binar', bswap: bool = False)
reallocate(self, size1: int, size2: int)
setColumn(self, s2: int, column: vector_DOUBLE)
setDiagonal(self, value: float)
setIdentity(self)
setRow(self, s1: int, row: vector_DOUBLE)
setZero(self)
transpose(self)
write(self, filename: object, openmode: object = 'binar', bswap: bool = False)
class SparseOrDenseMatrix(size1: int = 1, size2: int = 1)
class SparseOrDenseMatrix(other: aims.SparseOrDenseMatrix)

Bases: RCObject

asDense(self, copy: bool = False) rc_ptr_Volume_DOUBLE
asSparse(self, copy: bool = False) rc_ptr_SparseMatrix
denseMatrix(self) rc_ptr_Volume_DOUBLE
erase_element(self, i: int, j: int)
freeColumn(self, i: int)
freeRow(self, i: int)
getColumn(self, j: int) vector_DOUBLE
getNonZeroElementCount(self) int
getRow(self, i: int) vector_DOUBLE
getSize(self) vector_S32
getSize1(self) int
getSize2(self) int
hasElement(self, i: int, j: int) bool
header(self) carto.Object
isDense(self) bool
isOptimalShape(self) bool
muteToDense(self)
muteToOptimalShape(self)
muteToSparse(self)
read(self, filename: object)
readAll(self)
readColumn(self, s1: int)
readRow(self, s1: int)
reallocate(self, size1: int, size2: int)
setColumn(self, s2: int, column: vector_DOUBLE)
setHeader(self, ph: carto.Object)
setMatrix(self, matrix: rc_ptr_SparseMatrix)
setMatrix(self, matrix: rc_ptr_Volume_DOUBLE) None
setRow(self, s1: int, row: vector_DOUBLE)
set_element(self, i: int, j: int, x: float)
sparseMatrix(self) rc_ptr_SparseMatrix
subMatrix(self, start: vector_S32, size: vector_S32) aims.SparseOrDenseMatrix | None
subMatrix(self, indices_along_dims: vector_vector_S32) aims.SparseOrDenseMatrix | None
write(self, filename: object, options: carto.Object = carto.none())
class SphereSamplable(center: AimsVector_FLOAT_3, radius: float)
class SphereSamplable(a0: aims.SphereSamplable)

Bases: Samplable_FLOAT_3

contains(self, vector: AimsVector_FLOAT_3) bool
class SplineFfd(*args)

Bases: FfdTransformation

FFD vector field deformation transform

Free Form Deformation is the registration technique used to build the vector fields. This class is dedicated to the application of the vector field deformation to transform coordinates.

Vector fields are stored in volumes rc_ptr_Volume_POINT3DF.

This Spline FFD uses cubic spline interpolation between displacement vectors to process transformed coordinates. See TrilinearFfd for a variant using trilinear interpolation.

This class is the “base” vector field deformation class, which can perform point-to-point transformation. It is used by various higher-level classes or functions to work on higher-level objects:

To resample full 2D or 3D images, see the Resampler class and its derived classes (see also ResamplerFactory).

As a Transformation3d specialization, the main method of this class is the transform() method, which actually performs 3D coordinates transformation. The other methods can be seen as “internal machinery”.

see transformMesh, transformBucket, transformGraph and BundleTransformer to apply vector field deformations to various types of objects.

composed(self, other: rc_ptr_Transformation3d) rc_ptr_Transformation3d
leftComposed(self, other: rc_ptr_Transformation3d) rc_ptr_Transformation3d
spline3(self, x: float) float
transformDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
class StandardReferentials
class StandardReferentials(a0: aims.StandardReferentials)

Bases: wrapper

acPcReferential() object
acPcReferential() None

identifer (str) for the Taialairach/AIMS space

acPcReferentialID() object
acPcReferentialID() None

identifer (UUID str) for the Talairach/AIMS space

commonScannerBasedReferential() object
commonScannerBasedReferentialID() object
icbm2009cTemplateHeader() carto.Object

hdr = aims.StandardReferentials.icbm2009cTemplateHeader() Return a header with size and characteristics of the ICBM2009c MNI template volume.

isUUID(refName: object) bool
mniTemplateReferential() object
mniTemplateReferential() None

identifer (str) for the MNI/ICBM space

mniTemplateReferentialID() object
mniTemplateReferentialID() None

identifer (UUID str) for the MNI/ICBM space

referentialID(refName: object, commonScannerBased: bool = False, genNewIds: bool = True, commonSuffix: object = '') object

try to identify referential ID from its string name or description.

for instance “Talairach-MNI template-SPM” will be translated to its AIMS uuid, “803552a6-ac4d-491d-99f5-b938392b674b”

If commonScannerBased is true, then “Scanner-based anatomical coordinates” will be translated to the value of commonScannerBasedReferentialID(), so that other ref names of the same kind will match. If commonScannerBased is false, then a scanner-based ref name will be either translated to a new UUID, or returned unchanged or with a suffix, depending on the values of genNewIds (see below) and commonSuffix. If commonSuffix has a value, it will be appended after the name “Scanner-based anatomical coordinates”.

if genNewIds is true, then: if the refName is an unkwnown referential name (and not an UUID), then a new UUID will be generated for it, each time this function is called: so calling it twice with the same name will result in two distinct IDs. if genNewIds is false, and the refName is not recognized, then it will be returned unchanged.

talairachReferential() object
talairachReferential() None

identifer (str) for the Talairach/CIFTI space

talairachToICBM() aims.AffineTransformation3d
talairachToICBM2009cTemplate() aims.AffineTransformation3d

trans = aims.StandardReferentials.talairachToICBM2009cTemplate()

Transformation between the ICBM152 standard space and the ICBM152 template space.

includes shifts and axes inversions.

This is the “most standard” field of view of the template image, the one from the ICBM2009c_nlin_asym template from the MNI. Actually we find various fields of view for the templates. The one we use here is (193, 229, 193). The transform to the “real” ICBM space (0 roughly at AC) is provided in the output transformation header. This space has a fixed transformation with our Aims Talairach, along with the template volume size and voxel size. This space has a fixed transformation with our Aims Talairach.

class SurfaceGenerator

Bases: wrapper

Surface Generator Object. Available Methods are :

  • cube(center_p, radius_f, smoothnormal_b=false)

  • cylinder(p1_p, p2_p, radius1_f, radius2_f, nfacets_i, closed_b, smooth_b=false)

  • cone(arrow_p, base_p, radius_f, nfacets_i, closed_b, smooth_b=false)

  • arrow(arrow_p, base_p, radius_f, arrowradius_f, nfacets_i, arrowlengthfract_f)

  • icosahedron(center_p, radius_f)

  • sphere(center_p, radius_f, nfacets_i)

  • icosphere(center_p, radius_f, nfacets_i)

With arguments suffix _f:float, _i:int, _b:bool, _p: Point3df or 3-tuple

Alternatively, all those may be called with a GenericObject as only parameter.

This doc might not be up-to-date, use the printDescription() method for more info.

arrow(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static arrow( dictionary ) See the description() and printDescription() methods for more information.

arrow(a0: AimsVector_FLOAT_3, a1: AimsVector_FLOAT_3, a2: float, a3: float, a4: int, a5: float) -> Optional[AimsTimeSurface_3_VOID] static arrow( Point3df arrowhead, Point3df base, float headradius, float arrowradius, unsigned nfaces, float arrowlengthfactor )

circle_wireframe(params: carto.GenericObject) AimsTimeSurface_2_VOID | None

circle_wireframe(center: AimsVector_FLOAT_3, radius: float, nseg: int = 20, normal: AimsVector_FLOAT_3 = Point3df(0, 0, 1), startdir: AimsVector_FLOAT_3 = Point3df(1, 0, 0), startangle: float = 0, stopangle: float = M_PI*2) -> Optional[AimsTimeSurface_2_VOID] Circle, or part of circle.

center, radius are classical. nseg is the number of segments in the circle polygon normal is a normal vector to the circle plane. startdir is a vector in the circle plane determining the beginning of angles (circle ray). startangle, stopangle are meant to make parts of circle

cone(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static cone( dictionary ) See the description() and printDescription() methods for more information.

cone(a0: AimsVector_FLOAT_3, a1: AimsVector_FLOAT_3, a2: float, a3: int, a4: bool, a5: bool = False) -> Optional[AimsTimeSurface_3_VOID] static cone( Point3df arrowhead, Point3df base, float radius, unsigned nfaces, bool closed, bool smooth=False )

cube(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static cube( dictionary ) See the description() and printDescription() methods for more information.

cube(a0: AimsVector_FLOAT_3, a1: float, a2: bool = False) -> Optional[AimsTimeSurface_3_VOID] static cube( Point3df center, float radius, bool smoothnormals=False )

cylinder(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static cylinder( dictionary ) See the description() and printDescription() methods for more information.

cylinder(a0: AimsVector_FLOAT_3, a1: AimsVector_FLOAT_3, a2: float, a3: float, a4: int, a5: bool, a6: bool = False, a7: bool = True) -> Optional[AimsTimeSurface_3_VOID] static cylinder( Point3df center1, Point3df center2, float radius1, float radius2, unsigned nfaces, bool closed, bool smooth=False )

description() carto.Object
description_wireframe() carto.Object
ellipse(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static ellipse( dictionary ) See the description() and printDescription() methods for more information.

ellipse(a0: AimsVector_FLOAT_3, radius1: float, radius2: float, a3: int, a4: bool = False) -> Optional[AimsTimeSurface_3_VOID] static ellipse( Point3df center, float radius1, float radius2, unsigned nfaces, bool uniquevertices=False )

generate(a0: carto.Object) AimsTimeSurface_3_VOID | None
generate(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None
generate_wireframe(a0: carto.Object) AimsTimeSurface_2_VOID | None
generate_wireframe(a0: carto.GenericObject) AimsTimeSurface_2_VOID | None
grid(params: carto.GenericObject) AimsTimeSurface_2_VOID | None
grid(dict) None

See the description() and printDescription() methods for more information.

grid(boundingbox_min: AimsVector_FLOAT_3, boundingbox_max: AimsVector_FLOAT_3, grid_sampling: AimsVector_FLOAT_3) -> Optional[AimsTimeSurface_2_VOID] grid(Point3df boundingbox_min, Point3df boundingbox_max, Point3df grid_sampling) Regular, wireframe grid

icosahedron(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static icosahedron( dictionary ) See the description() and printDescription() methods for more information.

icosahedron(a0: AimsVector_FLOAT_3, a1: float) -> Optional[AimsTimeSurface_3_VOID] static icosahedron( Point3df center, float radius )

icosphere(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None
icosphere(dictionary) None

See the description() and printDescription() methods for more information.

icosphere(a0: AimsVector_FLOAT_3, a1: float, a2: int = 320) -> Optional[AimsTimeSurface_3_VOID] icosphere( Point3df center, float radius, unsigned nfaces=320 )

Compared to sphere() which performs meridian / parallels tesselation, icosphere over-segments an icosahedron to get equal, equilateral triangles.

parallelepiped(params: carto.GenericObject) AimsTimeSurface_3_VOID | None

parallelepiped(boundingbox_min: AimsVector_FLOAT_3, boundingbox_max: AimsVector_FLOAT_3, smooth: bool = False) -> Optional[AimsTimeSurface_3_VOID] parallelepiped(boundingbox_min, boundingbox_max, smooth=False)

Parameters:
  • boundingbox_min (Point3df) – “lower bound” corner position

  • boundingbox_min – “upper bound” corner position

  • smooth (bool) – if True, make smooth faces and shared vertices in corners

parallelepiped_wireframe(params: carto.GenericObject) AimsTimeSurface_2_VOID | None

parallelepiped_wireframe(boundingbox_min: AimsVector_FLOAT_3, boundingbox_max: AimsVector_FLOAT_3) -> Optional[AimsTimeSurface_2_VOID] parallelepiped_wireframe( Point3df boundingbox_min, Point3df boundingbox_max )

printDescription()
printDescription_wireframe()
sphere(a0: carto.GenericObject) AimsTimeSurface_3_VOID | None

static sphere( dictionary ) See the description() and printDescription() methods for more information.

sphere(a0: AimsVector_FLOAT_3, a1: float, a2: int, a3: bool = False) -> Optional[AimsTimeSurface_3_VOID] static sphere( Point3df center, float radius, unsigned nfaces, bool uniquevertices=False )

class SurfaceManip

Bases: wrapper

Surface Manipulation Object. All mehtods are static in this class, it is just a means of grouping functions.

checkMeshIntersect(a0: AimsTimeSurface_3_VOID, a1: AimsTimeSurface_3_VOID) bool
cutMesh(insurf: AimsTimeSurface_3_VOID, plane: AimsVector_FLOAT_4, cut: AimsTimeSurface_3_VOID, borderline: AimsTimeSurface_2_VOID)
cutMesh(in_mesh, plane, cut_mesh, border_line) None

Cut a mesh by a plane and that’s all.

Parameters:
  • in_mesh (AimsSurfaceTriangle) – Triangular mesh to be cut.

  • plane (Point4df) – cut plane equation (4 coefs)

  • cut_mesh (AimsSurfaceTriangle) – output cut mesh (the part satisfying the plane equation). Polygons crossing the plane will be cut into smaller ones.

  • border_line (AimsTimeSurface_2_VOID) – output cut section polygon

Return type:

None

invertSurfacePolygons(surface: AimsTimeSurface_3_VOID)
invertSurfacePolygons(mesh) None

Invert polygons order (flips 2 vertex indices in each triangle) to flip its interior / exterior notions (used by OpenGL rendering). The input mesh is modified in-place.

joinTexturedMesh(mesh: AimsTimeSurface_3_VOID, texture: TimeTexture_FLOAT) rc_ptr_AimsTimeSurface_3_FLOAT

joinTexturedMesh(mesh: AimsTimeSurface_2_VOID, texture: TimeTexture_POINT2DF) -> rc_ptr_AimsTimeSurface_2_POINT2DF

joinTexturedMesh(mesh: AimsTimeSurface_2_VOID, texture: TimeTexture_FLOAT) -> rc_ptr_AimsTimeSurface_2_FLOAT

joinTexturedMesh(mesh: AimsTimeSurface_3_VOID, texture: TimeTexture_POINT2DF) -> rc_ptr_AimsTimeSurface_3_POINT2DF Join a mesh and a texture into a textured mesh

lineDirections(a0: AimsTimeSurface_2_VOID) vector_POINT3DF | None
lineDirections(segments_mesh) None

calculate directions of a line mesh, for each vertex

Parameters:

segments_mesh (AimsTimeSurface_2_VOID)

Returns:

directions

Return type:

vector_POINT3DF

meshArea(surf: AimsTimeSurface_3_VOID) float

Surface area of a triangular mesh, in mm^2

meshArea(surf: AimsTimeSurface_3_VOID, tex: TimeTexture_S16) -> object Surface areas of regions of a triangular mesh, in mm^2. Regions are given as a texture.

meshArea(surf: AimsTimeSurface_3_VOID, tex: Texture_S16) -> object

meshDensity(mesh: AimsTimeSurface_3_VOID, asDistance: bool = False) TimeTexture_FLOAT | None
meshDensity(mesh, as_distance=False) None

Calculate a mesh density: inverse of the average edges distance.

Parameters:
  • mesh (AimsSurfaceTriangle)

  • as_distance (bool (optional)) – if True, the average distance is not inverted, thus the output is an average distance map.

Returns:

density_texture

Return type:

TimeTexture_FLOAT

meshEdgeLengthRatioTexture(nummesh: AimsTimeSurface_3_VOID, denommesh: AimsTimeSurface_3_VOID) TimeTexture_FLOAT | None
meshEdgeLengthRatioTexture(numerator_mesh, denominator_mesh) None

Calculate an edge length ratio in edges of two meshes with the same topology. The max length ratios of edges is kept for each vertex.

Parameters:
  • numerator_mesh (AimsSurfaceTriangle)

  • denominator_mesh (AimsSurfaceTriangle)

Returns:

ratio_texture

Return type:

TimeTexture_FLOAT

meshExtract(mesh: AimsTimeSurface_3_VOID, tex: TimeTexture_S16, value: int)
meshExtract(mesh, texture, label_value) None

Extracts a sub-mesh defined by a texture label value.

Returns:

  • sub_mesh (AimsTimeSurface_3_VOID) – extracted sub-mesh

  • vertices (vector_ULONG) – indices of extracted vertices

meshMerge(a0: AimsTimeSurface_2_VOID, a1: AimsTimeSurface_2_VOID)

meshMerge(a0: AimsTimeSurface_3_VOID, a1: AimsTimeSurface_3_VOID)

meshMerge(a0: AimsTimeSurface_4_VOID, a1: AimsTimeSurface_4_VOID) meshMerge(input_output_mesh, input_mesh)

Concatenates the second mesh to the first one. The first argument will be modified.

Parameters:
Return type:

None

meshPlanarPolygon(a0: AimsVector_FLOAT_4, a1: AimsTimeSurface_2_VOID) AimsTimeSurface_3_VOID | None
meshPlanarPolygon(plane, polygon) None

Tesselate a planar polygon to fill it by a triangular mesh

Parameters:
  • plane (Point4df) – plane equation

  • polygon (AimsTimeSurface_2_VOID) – planar polygon to tesselate. Typically, the output of cutMesh()

Returns:

planar_mesh – the mesh filling the polygon

Return type:

AimsSurfaceTriangle

meshTextureBoundary(mesh: AimsTimeSurface_3_VOID, tex: TimeTexture_S16, region: int) AimsTimeSurface_2_VOID | None
meshTextureBoundary(mesh, label_texture, region_value) None

Extracts the boundary of region of value <region_value> of the input texture, on the mesh.

If region_value is negative, take boundaries of all regions. The input texture is a label texture.

Parameters:
Returns:

  • boundary (AimsTimeSurface_2_VOID) – output segments mesh (filar mesh) for the boundary

  • meshTextureBoundary(mesh (AimsTimeSurface_3_VOID, tex: TimeTexture_S32, region: int) -> Optional[AimsTimeSurface_2_VOID])

  • meshTextureBoundary(mesh (AimsTimeSurface_3_VOID, tex: TimeTexture_FLOAT, region: float) -> Optional[AimsTimeSurface_2_VOID])

meshTransform(a0: AimsTimeSurface_3_VOID, a1: aims.AffineTransformation3d)
meshTransform(mesh, transformation) None

Apply linear coordinates transformation to a mesh. The input mesh will be modified in-place.

Parameters:
Returns:

  • None

  • meshTransform(a0 (AimsTimeSurface_2_VOID, a1: aims.AffineTransformation3d))

meshVolume(surf: AimsTimeSurface_3_VOID) float
meshVolume(mesh) None

Volume inside a triangular mesh, in mm^3. The mesh must enclode a closed volume, with no holes, otherwise the volume processing will “leak” and will be wrong.

nearestPointToMesh(pos: AimsVector_FLOAT_3, mesh: AimsTimeSurface_3_VOID, nneighbours: int = 1)
rasterizeMesh(mesh: AimsTimeSurface_3_VOID, volume: rc_ptr_Volume_S16, value: int = 2)
rasterizeMesh(mesh, volume, value=2) None

Rasterize polygons into a volume.

Parameters:
  • mesh (AimsTimeSurface_*)

  • volume (Volume_S16) – Volume to write mesh imprint to

  • value (int) – label value used to write the mesh imprint in the volume

rasterizeMeshWireframe(mesh: AimsTimeSurface_2_VOID, volume: rc_ptr_Volume_S16, value: int = 1)
rasterizeMeshWireframe(mesh, volume, value=1) None

Rasterize polygons edges into a volume.

Parameters:
  • mesh (AimsTimeSurface_*)

  • volume (Volume_S16) – Volume to write mesh imprint to

  • value (int) – label value used to write the mesh imprint in the volume

  • rasterizeMeshWireframe(mesh (AimsTimeSurface_4_VOID, volume: rc_ptr_Volume_S16, value: int = 1))

  • rasterizeMeshWireframe(mesh

refineMeshTri4(mesh: AimsTimeSurface_3_VOID, selectedPolygons: vector_U32 = vector_U32()) AimsTimeSurface_3_VOID | None
refineMeshTri4(mesh, selected_polygons=None) None

Refine a mesh by subdivising every triangle into 4 smaller ones.

Parameters:
  • mesh (AimsSurfaceTriangle) – mesh to be refined

  • selected_polygons (vector_U32) – optional list of polygons indices to be selectively refined. Others will not be changed, unless they are at the border of a refined one, in which case they have to be split in some way.

Returns:

refined_mesh – refined mesh

Return type:

AimsSurfaceTriangle

sortPolygonsAlongDirection(mesh: AimsTimeSurface_2_VOID, timestep: int, direction: AimsVector_FLOAT_3)
sortPolygonsAlongDirection(mesh, timestep, direction) None

Sort polygons along a given direction. Polygons centers will be used for sorting. Only one timestep is performed (to be fast).

Parameters:
  • mesh (AimstimeSurface_*) – The mesh will be modified.

  • timestep (int)

  • direction (Point3df)

  • sortPolygonsAlongDirection(mesh (AimsTimeSurface_4_VOID, timestep: int, direction: AimsVector_FLOAT_3))

  • sortPolygonsAlongDirection(mesh

  • timestep

  • direction)

  • direction. (Sort polygons along a given)

  • fast). (Polygons centers will be used for sorting. Only one timestep is performed (to be)

  • mesh – The mesh will be modified.

  • timestep

  • direction

  • sortPolygonsAlongDirection(mesh

  • sortPolygonsAlongDirection(mesh

  • timestep

  • direction)

  • direction.

  • fast).

  • mesh – The mesh will be modified.

  • timestep

  • direction

splitTexturedMesh(texmesh: AimsTimeSurface_2_FLOAT) Any

Split a textured mesh into a mesh and a texture

splitTexturedMesh(texmesh: AimsTimeSurface_2_POINT2DF) -> Any

splitTexturedMesh(texmesh: AimsTimeSurface_3_FLOAT) -> Any

splitTexturedMesh(texmesh: AimsTimeSurface_3_POINT2DF) -> Any

surfaceNeighbours(surf: AimsTimeSurface_3_VOID) vector_set_U32
class TransformationChain3d(*args)

Bases: Transformation3d

Container for a composition of multiple transformations.

This container holds a list of transformations, and acts as the composition of all transformations. Transformations are composed from the front to the back of the list:

chain = TransformationChain3d()
chain.push_back(t1)
chain.push_back(t2)
# chain->transform(p) == t2.transform(t1.transform(p))

warning: Do not modify the transformations once you have passed them to push_back() or push_front(): it is unspecified if the changes will be noticed by TransformationChain3d (a reference to the same object may be kept internally, or a copy could be made). This behaviour will allow optimizations to be implemented (e.g. composing adjacent affine transformations by multiplying their matrices).

getInverse(self) rc_ptr_Transformation
invertible(self) bool
isDirect(self) bool
isIdentity(self) bool
pop_back(self)
pop_back() None

Remove the last transformation from the list

pop_front(self)
pop_front() None

Remove the first transformation from the list

push_back(self, transformation: rc_ptr_Transformation3d)
push_back(transformation) None

Add a transformation to the back of the list (applied last)

push_front(self, transformation: rc_ptr_Transformation3d)
push_front(transformation) None

Add a transformation to the front of the list (applied first)

simplify(self, allow_ffd: bool = False) rc_ptr_Transformation3d

Compute a simpler transformation that is equivalent to the chain.

The transformation chain is simplified by applying the following rules, so that it should provide equivalent results to the original chain, up to numerical precision:

  • The simplification is applied recursively to any sub-chain.

  • Transformations of the simplified sub-chains are inserted at the top level (i.e. the simplified chain is flat, it contains no sub-chains).

  • Consecutive affine transformations are composed using matrix multiplication.

  • Identity transforms (i.e. transforms for which Transformation::isIdentity() returns true) are removed from the list.

  • If the simplified chain consists of only one transformation, no chain is returned, the contained transformation is returned directly. However, the transformation is not necessarily the same instance that was inserted in the chain (it will be a copy if it is an AffineTransformation3d).

  • If the simplified chain is empty, an empty chain is returned.

No deep copy is made, so the result can contain pointers to the same transformations as the original chain.

If the parameter allow_ffd is set to True, and if the chain contains at least a FFD deformation field, then the whole chain is reduced to a single FFD field, with the resolution of the first one found in the chain.

size(self) int
transformDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
class TransformationGraph3d(*args, **kwargs)

Bases: Graph

Manage transformations (affine and non-linear) transformations graph.

It maintains a graph of directed transformations (vertices are referentials, edges are 3D transformations).

It can be populated from a dictionary (Object) which can be read from a JSON or YAML file, and performs lazy-loading: transformations are actually loaded when they are used, more precisely in getTransformation() and when building a chain of composed transformations.

The graph is oriented, and does not manage inverse transforms. We could thing this could be done automatically for affine or other inversible transformations, but the lazy loading feature does not allow to know if a not yet loaded transform will be inversible or not. So this has to be done manually for now.

The graph populates with composed transforms when they are used: indirect paths from a referential to another are generated when needed, and stored in the graph as “deduced” transforms. Later access will thus use this cache instead of reccomputing it. A drawback, thus, is that the graph has to be used “statically”: any modification in the graph structure, or in any of its transformations, should invalidate a number of deduced, cached ones, which we do not handle for now (it’s a quite difficult problem to manage it efficiently). To date the only solution is to completely clear the cached transforms (clearCache()) after any modification.

The TransformationGraph3d structure is a Graph, and its elements are Vertex or Edge objects. To manipulate transformations, the API generally allows to use identifiers (generally UUIDs) for elements, and the Transformation objects are accessed through the “transformation” property of edges, or using the transformation() convenience method:

ref1 = tgraph.referentialById(“23df7ce8-e405-bc31-3863-d543e3cc89e5”) trans_edge = tgraph.getTransformation(

“23df7ce8-e405-bc31-3863-d543e3cc89e5”, “52929a27-6838-1d08-d6fc-7905ed9413a0”)

if trans_edge:

trans = tgraph.transformation(trans_edge)

see also: https://hbp-spatial-backend.apps.hbp.eu/swagger-ui#/api_v1/get_v1_transform_point

allocatorContext(self) carto.AllocatorContext

Allocator context used in transformations reading operations.

asDict(self, affine_only: bool = False, allow_read: bool = False, embed_affines: bool = False, rel_to_path: object = '') carto.Object

convert to a dict-like structure compatible with loadTransformationsGraph()

Parameters:
  • affine_only (bool) – if true, inclue only affine transformations

  • allow_read (bool) – if true, and if affine_only or embed_affines is also true, all affine transformations will be read in order to determine which are affine. Otherwise only those already loaded in memory (via the lazy reading mechanism) will be known to be affine. This parameter has no effect on non-affine transformations.

  • embed_affines (bool) – if true, affine transformations are not recorded as a file name (.trm format), but as an embedded 4x4 matrix.

  • rel_to_path (str) – if not empty, filenames will be relative to this base directory (normally where the graph will be stored)

clearCache(self, chain_only: bool = False)
clearCache(chain_only=False) None

remove deduced transformations (built from composition).

If chain_only is true, then inverses of direct transforms are not removed.

getTransformChain(self, src_ref: Vertex | None, dst_ref: Vertex | None) rc_ptr_Transformation3d

Get a transformation chain between two vertices.

You normally don’t need to call this method directly, il is called through getTransformation( src_ref, dst_ref, true ). This method however does not modify the transformations graph and does not register the combined transformation. It will, however, load lazy-loading transformations.

getTransformChain(self, src_ref: object, dst_ref: object) -> rc_ptr_Transformation3d

getTransformation(self, src_ref: object, dst_ref: object) Edge | None

edge = tgraph.getTransformation(src_ref, dst_ref, allow_compose=False)

Get the transformation between source_ref and dst_ref. If it is not a registered transformation, return None. src_ref annd dst_ref may be string IDs or Vertex objects.

If allow_compose is True and the transformation is not found, then a transformations chain path is looked for. If a matching one is found, it is then registered in the graph to allow fast access later. The drawback of this register operation is that it cannot react to changes in the transformation chain (if a new transformation is added and could make a shorter path, it will not be taken into account).

getTransformation(self, src_ref: Optional[Vertex], dst_ref: Optional[Vertex]) -> Optional[Edge]

getTransformation(self, src_ref: object, dst_ref: object, allow_compose: bool) -> Optional[Edge]

getTransformation(self, src_ref: Optional[Vertex], dst_ref: Optional[Vertex], allow_compose: bool) -> Optional[Edge]

getTransformation_raw(self, src_ref: Vertex | None, dst_ref: Vertex | None) Edge | None
getTransformation_raw(src_ref, dst_ref) None

same as getTransformation(), but do not perform lazy loading

getTransformation_raw(self, src_ref: object, dst_ref: object) -> Optional[Edge]

loadAffineTransformations(self)

Load all affine transformations.

loadTransformationsGraph(self, desc: carto.Object, dirname: object)

Load a full transformations graph from a dict-like object.

The description dict may typically be read from a .json or a .yaml file.

The description is organized as a 2-level dictionary:

{
    source_ref_id: {
        dest_ref_id1: transformation_filename1,
        dest_ref_id2: transformation_filename2,
    },
    ...
}

A referential ID is a string which may represent an UUID, or a name.

A transformatioon filename may be an affine (.trm) or non-linear (.ima) transformation file, or an empty string to represent an identity transformation.

The transformation files are found relatively to the directory given as the dirname parameter.

Alternatively to file names, an affine transformation may be given directly as its 4x4 matrix, written as a line vector (all 16 coefficients in a vecotr, describing the matrix horizontally). Ex:

{
    source_ref_id: {
        dest_ref_id1: [1, 0, 0, 0,
                       0, 1, 0, 0,
                       0, 0, 1, 0,
                       0, 0, 0, 1],
    },
    ...
}
mergeReferentials(self, uuid: object, existing_id: object)

Merge two existing referentials into a single one (the second).

The first UUID will be kept as an alias in the second.

referentialByCode(self, id: object, header: carto.Object, refs: vector_STRING) Vertex | None

Same as referentialById(id), but with the help of an object header, can look for additional codes:

  • “AIMS”: the internal AIMS referential of the object

  • “first”: first referential in the transformations destinations in the given header

  • “last”: last referential in the header

  • a numpber or lexical number as string to designate the referential in referenced transformations destinations in the object header - “auto”: last referential in header, if one is present, or fallback to the internal AIMS referential of the object otherwise.

  • “aligned”, or “NIFTI_XFORM_ALIGNED_ANAT”, or “Coordinates aligned to another file or to anatomical truth”, to designate a transformation (NIFTI-like) going to another object space as described this way

  • “NIFTI_XFORM_TEMPLATE_OTHER” to designate a different template as described in the object header (NIFTI-like)

  • “disk”: the “disk space” orientation: voxels in the order they are stored on disk. Some software are working in this referential. Note that this referential is only available in the graph if the object header has been included using updateFromObjectHeader() with the parameter includeDiskSpace set to True.

  • other codes may be supported later, like “qform”, “sform”, “ITK”, “ANTS”, but are not implemented yet.

The object header should have been included in the transformations graph using updateFromObjectHeader() before calling this method.

The object header is still needed here because looking for the specified transformations are linked tot the order the specific header and the order they are given in it.

The additional parameter, refs, should be the list returned by updateFromObjectHeader(). It is the list of destinaton referentials in the object header, but with possibly different codes or IDs because the original header may use ambiguous, non-specific identifiers.

If not found for a known reason, the function will throw a runtime_error exception with a message. Otherwise 0 might be returned.

referentialById(self, id: object) Vertex | None

Get the vertex (referential) with given ID.

The id may be a referential ID or name, or a code identifying a particular referential, like:

  • “mni”, or “mni152”, or “NIFTI_XFORM_MNI_152” or “Talairach-MNI template-SPM” (StandardReferentials.mniTemplateReferential()), to designate the ICBM152 standard referential

  • “acpc”, or “talairach”, or “NIFTI_XFORM_TALAIRACH”, or “Talairach-AC/PC-Anatomist” (StandardReferentials.acPcReferential()), to designate AIMS Talairach referential

registerInverseTransformations(self, loadAffines: bool = False)
registerInverseTransformations(loadAffines=False) None

register inverse transformations when they can be obtained.

This can be done only for loaded transformations. So the lazy loading feature will prevent for it to work on not already loaded transformations, since we cannot know if they are invertible before they are loaded.

For this reason, the loadAffines parameter allows to load affine transforms and register their inverses.

registerReferentialAlias(self, uuid: object, existing_id: object)

registers a different referential, additional UUID for an existing referential.

If the new UUID corresponds to an existing referential also, both are merged into the same vertex.

registerTransformation(self, src_ref: object, dst_ref: object, trans: rc_ptr_Transformation3d, deduced: bool = False) Edge | None

Add (or register) the given transformation in the transformations graph.

transform may be a filename, or a Transformation instance. a Transformation is supposed to be a non-linear FFD (Free Form Deformation), not a linear transformation. If transform is a string, it may be: - an empty string will be an identity transformation - a .trm file will be an affine transformation, and will be passed to

the builtin Anatomist system

  • another file (.ima) will be a FFD transformation file and will be registered as its filename. Loading will happen only when the transformation is used, in get_transformation().

registerTransformation(self, src_ref: Optional[Vertex], dst_ref: Optional[Vertex], trans: rc_ptr_Transformation3d, deduced: bool = False) -> Optional[Edge]

registerTransformation(self, src_ref: object, dst_ref: object, filename: object) -> Optional[Edge]

registerTransformation(self, src_ref: Optional[Vertex], dst_ref: Optional[Vertex], filename: object) -> Optional[Edge]

setAllocatorContext(self, alloc: carto.AllocatorContext)

Set the allocator context used in all transformations reading operations.

The allocator context may be used to push the use of memory mapping, for isntance.

transformation(edge: Edge | None) rc_ptr_Transformation3d

Get the Transformation3d object inside an edge. The returned reference counting pointer may contain a null pointer.

transformation(self, id: object) -> rc_ptr_Transformation3d Get the Transformation3d object for the given UUID. The returned reference counting pointer may contain a null pointer.

transformationById(self, id: object) Edge | None

Get the edge (transformation) with given ID

updateFromObjectHeader(self, header: carto.Object, includeDiskSpace: bool = False) vector_STRING

Insert all transformations / referentials found in an object header.

Returns the translated referentials names in the order they are in the object header, beginning with the object referential itself. For instance for a header with the properties:

{
  "referential": "A",
  "referentials": ["B", "Talairach-MNI template-SPM",
                    "Scanner-based anatomical coordinates"],
  "transformations": [...]  // list of 3 transformations
}

it will return:

["A", "B", "803552a6-ac4d-491d-99f5-b938392b674b",
  "Scanner-based anatomical coordinates_A"]

If the header does not contain a “referential” property, then a new UUID will be generated for it.

If the optional parameter includeDiskSpace is set to true, then transformations to disk orientation (in mm) will also be included.

updateIds(self)

Update the internal UUIDs cache. Needs to be done after changes in elements UUIDs or insertion / deletions

class TrilinearFfd(*args)

Bases: FfdTransformation

FFD vector field deformation transform

Free Form Deformation is the registration technique used to build the vector fields. This class is dedicated to the application of the vector field deformation to transform coordinates.

This is a variant of SplineFfd which is performing trilinear interpolation between displacement vectors. See SplineFfd for details.

composed(self, other: rc_ptr_Transformation3d) rc_ptr_Transformation3d
leftComposed(self, other: rc_ptr_Transformation3d) rc_ptr_Transformation3d
transformDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
class VertexRemover

Bases: wrapper

A class to remove a vertex from a mesh, and remeshing the hole.

NB: remeshing is not always possible, therefore removing a given point in a mesh is not always possible. Therefore, it may be important to check the return value of operator() to check if the point has actually been removed.

cleanMesh(mesh: AimsTimeSurface_3_VOID, maxCurv: float = 0.5, verbose: bool = False)

clean a whole mesh

geometricProperties(self) aims.GeometricProperties
setVerbose(self, v: bool)
verbose(self) bool
floodFill(vol: Volume_S16, pos: AimsVector_S16_3, value: int, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: int = 0, verbose: bool = False)
floodFill(vol: Volume_U16, pos: AimsVector_S16_3, value: int, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: int = 0, verbose: bool = False) None
floodFill(vol: Volume_S32, pos: AimsVector_S16_3, value: int, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: int = 0, verbose: bool = False) None
floodFill(vol: Volume_U32, pos: AimsVector_S16_3, value: int, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: int = 0, verbose: bool = False) None
floodFill(vol: Volume_FLOAT, pos: AimsVector_S16_3, value: float, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: float = 0, verbose: bool = False) None
floodFill(vol: Volume_DOUBLE, pos: AimsVector_S16_3, value: float, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: float = 0, verbose: bool = False) None
getLinearInterpolator(a0: object) rc_ptr_Interpolator
getLinearInterpolator(a0: rc_ptr_Volume_U8) rc_ptr_Interpolator
getLinearInterpolator(a0: rc_ptr_Volume_U16) rc_ptr_Interpolator
getLinearInterpolator(a0: rc_ptr_Volume_S16) rc_ptr_Interpolator
getLinearInterpolator(a0: rc_ptr_Volume_U32) rc_ptr_Interpolator
getLinearInterpolator(a0: rc_ptr_Volume_S32) rc_ptr_Interpolator
getLinearInterpolator(a0: rc_ptr_Volume_FLOAT) rc_ptr_Interpolator
getLinearInterpolator(a0: rc_ptr_Volume_DOUBLE) rc_ptr_Interpolator
getMaskIterator(a0: object) carto.rc_ptr_MaskIterator
getRoiIterator(a0: object) carto.rc_ptr_RoiIterator
getRoiIterator(data: Graph) carto.rc_ptr_RoiIterator
getRoiIterator(data: rc_ptr_Volume_S16) carto.rc_ptr_RoiIterator
giftiColormap(texture: TimeTexture_S16) rc_ptr_Volume_RGBA
giftiColormap(texture: TimeTexture_FLOAT) rc_ptr_Volume_RGBA
giftiColormap(texture: TimeTexture_DOUBLE) rc_ptr_Volume_RGBA
giftiColormap(texture: TimeTexture_S32) rc_ptr_Volume_RGBA
giftiColormap(texture: TimeTexture_U32) rc_ptr_Volume_RGBA
giftiColormap(header: carto.Object) rc_ptr_Volume_RGBA
class knn

Bases: simplewrapper

class Database
class Database(a0: aims.knn.Database)

Bases: wrapper

init(self, a0: Any)
class Knn

Bases: wrapper

find(self, v: vector_DOUBLE) Tuple
class KnnBruteForce(db: aims.knn.Database, k: int)
class KnnBruteForce(a0: aims.knn.KnnBruteForce)

Bases: Knn

class KnnFriedman

Bases: Knn

precompute(self)
class KnnGlobalFriedman(db: aims.knn.Database, k: int)
class KnnGlobalFriedman(a0: aims.knn.KnnGlobalFriedman)

Bases: Knn

precompute(self)
mask(src: BucketMap_VOID, m: BucketMap_VOID, a2: bool = True) BucketMap_VOID | None
maskWithVolume(src: BucketMap_VOID, m: rc_ptr_Volume_S16, a2: int = 0, insideval: bool = False) BucketMap_VOID | None
class meshdistance

Bases: simplewrapper

MeshDilation(mesh: AimsTimeSurface_3_VOID, inittex: TimeTexture_FLOAT, Back: float, For: float, dist: float, connexity: bool) TimeTexture_FLOAT
MeshDilation(mesh: AimsTimeSurface_3_VOID, inittex: TimeTexture_S16, Back: int, For: int, dist: float, connexity: bool) TimeTexture_S16
MeshDistance(mesh: AimsTimeSurface_3_VOID, inittex: TimeTexture_S16, allowUnreached: bool) TimeTexture_FLOAT

dist_tex = MeshDistance(mesh, inittex, allowUnreached)

inittex values have the following meaning:

0: propagation domain n>0: seed (distance 0) -1: forbidden

MeshErosion(mesh: AimsTimeSurface_3_VOID, inittex: TimeTexture_FLOAT, Back: float, For: float, dist: float, connexity: bool) TimeTexture_FLOAT
MeshErosion(mesh: AimsTimeSurface_3_VOID, inittex: TimeTexture_S16, Back: int, For: int, dist: float, connexity: bool) TimeTexture_S16
MeshVoronoi(mesh: AimsTimeSurface_3_VOID, inittex: TimeTexture_S16, dist: float, connexity: bool, object: bool) TimeTexture_S16

MeshVoronoi(mesh: AimsTimeSurface_3_VOID, inittex: TimeTexture_S16, background: int, forbidden: int, dist: float, connexity: bool, object: bool) -> TimeTexture_S16 MeshVoronoi( mesh, inittex, background, forbidden, dist, connexity, object) MeshVoronoi( mesh, inittex, dist, connexity, object )

Compute a geodesic voronoi diagram (dist = MAX_FLOAT,object=true ) of objects defined in inittex. The background has the label Back and the objects have a positive label. The distance can be euclidean geodesic (connexity=false) or just the connexity of the triangulation(connexity=true) This function can as well be used for dilation(object=true) / erosion(object=false) using the parameter dist as the size of the structuring element.

Parameters:
Returns:

voronoi_texture

Return type:

TimeTexture_S16

MeshVoronoiStepbyStep(mesh: AimsTimeSurface_3_VOID, inittex: TimeTexture_S16, dist: float, connexity: bool, object: bool) TimeTexture_S16
textureMax(intex: TimeTexture_S16) int
transformBoundingBox(motion: aims.AffineTransformation3d, pmin1: AimsVector_FLOAT_3, pmax1: AimsVector_FLOAT_3, pmin2: AimsVector_FLOAT_3, pmax2: AimsVector_FLOAT_3)
class soma.aims.carto

Bases: simplewrapper

class AllocatorContext

Bases: wrapper

Allocation context specifications. This object is used when memory must be allocated for large objects (volumes, arrays…), especially for data which will be read from disk. It allows to specify how the memory will be used (read-only, read-write, how much…) to allow to decide whether any memory mapping techniques should be used or not.

accessMode(self) carto.AllocatorStrategy.DataAccess
allocatorType(self) carto.AllocatorStrategy.MappingMode
allowsMemoryMapping(self) bool
dataSource(self) rc_ptr_DataSource
dataSourceInfo(self) rc_ptr_DataSourceInfo
isAllocated(self) bool
setAccessMode(self, mode: carto.AllocatorStrategy.DataAccess)
setAllowsMemoryMapping(self, x: bool)
setDataSource(self, datasource: rc_ptr_DataSource)
setDataSourceInfo(self, dsi: rc_ptr_DataSourceInfo)
setUseFactor(self, x: float)
useFactor(self) float
class AllocatorStrategy

Bases: wrapper

Memory management strategy helper. Contains mainly constants and a memory query function.

CopyMap = 2
class DataAccess

Bases: int

Data access mode

InternalModif:

random access in memory, disk data (memmapped) should not be overwritten.

ReadOnly:

read only in memory. Accessing data in write mode may cause a crash.

ReadWrite:

read/write both in memory and on disk, if memmapped.

NotOwner:

data is unallocated, or its ownership belongs to a proxy object.

InternalModif = 0
MAP = 1
MAP_COPY = 2
MAP_RO = 3
MAP_RW = 4
MEM = 0
class MappingMode

Bases: int

Memory mapping modes

Memory, (MEM):

in-memory allocation

CopyMap, (MAP, MAP_COPY):

data is copied into a memmaped file (accessed read/write)

ReadOnlyMap, (MAP_RO):

read-only memory mapping

ReadWriteMap, (MAP_RW):

read/write memory mapping: modifying the memory also modifies the file on disk.

Unallocated:

not allocated.

Memory = 0
NotOwner = 3
ReadOnly = 1
ReadOnlyMap = 3
ReadWrite = 2
ReadWriteMap = 4
Unallocated = 5
allocator(a0: carto.AllocatorStrategy.MappingMode) carto.AllocatorContext

Create an AllocatorContext object with the required mapping mode

memSizes()

Check the current system memory and return the amount of RAM, free RAM, and swap.

class AttributedObject(s: object = '')
class AttributedObject(x: carto.AttributedObject)

Bases: GenericObject

clearProperties(self)
clone(self) carto.Object
currentValue(self) carto.Object
getArrayItem(self, index: int) carto.Object
getProperty(self, a0: object, a1: carto.Object) bool
getScalar(self) float
getString(self) object
hasItem(self, index: int) bool
hasProperty(self, a0: object) bool
insertArrayItem(self, a0: int, a1: carto.Object)
intKey(self) int
isArray(self) bool
isContiguous(self) bool
isDictionary(self) bool
isDictionaryIterator(self) bool
isDynArray(self) bool
isIntKeyIterator(self) bool
isIterable(self) bool
isIterator(self) bool
isKeyIterator(self) bool
isNone(self) bool
isScalar(self) bool
isString(self) bool
isValid(self) bool
key(self) object
keyObject(self) carto.Object
next(self)
objectIterator(self) carto.Object
removeArrayItem(self, a0: int)
removeProperty(self, a0: object) bool
reserveArray(self, a0: int)
resizeArray(self, a0: int)
setArrayItem(self, a0: int, a1: carto.Object)
setProperty(self, a0: object, a1: carto.Object)
setScalar(self, a0: float)
setString(self, a0: object)
setValue(self, val: carto.Object)
size(self) int
type(self) object
class ContinuousRoi(*args)

Bases: Roi

contains(self, a0: carto.Site) bool
class DiscreteRoi(*args)

Bases: Roi

count(self) int
getSiteIterator(self) rc_ptr_SiteIterator
holds(self, a0: carto.Site) bool
class FormatDictionary_AffineTransformation3d
class FormatDictionary_AffineTransformation3d(a0: carto.FormatDictionary_AffineTransformation3d)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_2_FLOAT
class FormatDictionary_AimsTimeSurface_2_FLOAT(a0: carto.FormatDictionary_AimsTimeSurface_2_FLOAT)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_2_POINT2DF
class FormatDictionary_AimsTimeSurface_2_POINT2DF(a0: carto.FormatDictionary_AimsTimeSurface_2_POINT2DF)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_2_VOID
class FormatDictionary_AimsTimeSurface_2_VOID(a0: carto.FormatDictionary_AimsTimeSurface_2_VOID)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_3_FLOAT
class FormatDictionary_AimsTimeSurface_3_FLOAT(a0: carto.FormatDictionary_AimsTimeSurface_3_FLOAT)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_3_POINT2DF
class FormatDictionary_AimsTimeSurface_3_POINT2DF(a0: carto.FormatDictionary_AimsTimeSurface_3_POINT2DF)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_3_VOID
class FormatDictionary_AimsTimeSurface_3_VOID(a0: carto.FormatDictionary_AimsTimeSurface_3_VOID)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_4_FLOAT
class FormatDictionary_AimsTimeSurface_4_FLOAT(a0: carto.FormatDictionary_AimsTimeSurface_4_FLOAT)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_4_POINT2DF
class FormatDictionary_AimsTimeSurface_4_POINT2DF(a0: carto.FormatDictionary_AimsTimeSurface_4_POINT2DF)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_AimsTimeSurface_4_VOID
class FormatDictionary_AimsTimeSurface_4_VOID(a0: carto.FormatDictionary_AimsTimeSurface_4_VOID)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_BucketMap_DOUBLE
class FormatDictionary_BucketMap_DOUBLE(a0: carto.FormatDictionary_BucketMap_DOUBLE)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_BucketMap_FLOAT
class FormatDictionary_BucketMap_FLOAT(a0: carto.FormatDictionary_BucketMap_FLOAT)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_BucketMap_S16
class FormatDictionary_BucketMap_S16(a0: carto.FormatDictionary_BucketMap_S16)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_BucketMap_S32
class FormatDictionary_BucketMap_S32(a0: carto.FormatDictionary_BucketMap_S32)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_BucketMap_U16
class FormatDictionary_BucketMap_U16(a0: carto.FormatDictionary_BucketMap_U16)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_BucketMap_U32
class FormatDictionary_BucketMap_U32(a0: carto.FormatDictionary_BucketMap_U32)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_BucketMap_VOID
class FormatDictionary_BucketMap_VOID(a0: carto.FormatDictionary_BucketMap_VOID)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Graph
class FormatDictionary_Graph(a0: carto.FormatDictionary_Graph)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Hierarchy
class FormatDictionary_Hierarchy(a0: carto.FormatDictionary_Hierarchy)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Object
class FormatDictionary_Object(a0: carto.FormatDictionary_Object)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_SparseMatrix
class FormatDictionary_SparseMatrix(a0: carto.FormatDictionary_SparseMatrix)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_SparseOrDenseMatrix
class FormatDictionary_SparseOrDenseMatrix(a0: carto.FormatDictionary_SparseOrDenseMatrix)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TimeTexture_DOUBLE
class FormatDictionary_TimeTexture_DOUBLE(a0: carto.FormatDictionary_TimeTexture_DOUBLE)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TimeTexture_FLOAT
class FormatDictionary_TimeTexture_FLOAT(a0: carto.FormatDictionary_TimeTexture_FLOAT)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TimeTexture_POINT2DF
class FormatDictionary_TimeTexture_POINT2DF(a0: carto.FormatDictionary_TimeTexture_POINT2DF)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TimeTexture_S16
class FormatDictionary_TimeTexture_S16(a0: carto.FormatDictionary_TimeTexture_S16)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TimeTexture_S32
class FormatDictionary_TimeTexture_S32(a0: carto.FormatDictionary_TimeTexture_S32)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TimeTexture_U16
class FormatDictionary_TimeTexture_U16(a0: carto.FormatDictionary_TimeTexture_U16)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TimeTexture_U32
class FormatDictionary_TimeTexture_U32(a0: carto.FormatDictionary_TimeTexture_U32)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TimeTexture_U8
class FormatDictionary_TimeTexture_U8(a0: carto.FormatDictionary_TimeTexture_U8)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Transformation3d
class FormatDictionary_Transformation3d(a0: carto.FormatDictionary_Transformation3d)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_TransformationGraph3d
class FormatDictionary_TransformationGraph3d(a0: carto.FormatDictionary_TransformationGraph3d)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_CDOUBLE
class FormatDictionary_Volume_CDOUBLE(a0: carto.FormatDictionary_Volume_CDOUBLE)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_CFLOAT
class FormatDictionary_Volume_CFLOAT(a0: carto.FormatDictionary_Volume_CFLOAT)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_DOUBLE
class FormatDictionary_Volume_DOUBLE(a0: carto.FormatDictionary_Volume_DOUBLE)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_FLOAT
class FormatDictionary_Volume_FLOAT(a0: carto.FormatDictionary_Volume_FLOAT)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_HSV
class FormatDictionary_Volume_HSV(a0: carto.FormatDictionary_Volume_HSV)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_POINT3DF
class FormatDictionary_Volume_POINT3DF(a0: carto.FormatDictionary_Volume_POINT3DF)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_RGB
class FormatDictionary_Volume_RGB(a0: carto.FormatDictionary_Volume_RGB)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_RGBA
class FormatDictionary_Volume_RGBA(a0: carto.FormatDictionary_Volume_RGBA)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_S16
class FormatDictionary_Volume_S16(a0: carto.FormatDictionary_Volume_S16)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_S32
class FormatDictionary_Volume_S32(a0: carto.FormatDictionary_Volume_S32)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_U16
class FormatDictionary_Volume_U16(a0: carto.FormatDictionary_Volume_U16)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_U32
class FormatDictionary_Volume_U32(a0: carto.FormatDictionary_Volume_U32)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class FormatDictionary_Volume_U8
class FormatDictionary_Volume_U8(a0: carto.FormatDictionary_Volume_U8)

Bases: wrapper

readExtensions() Dict
readFormats() set_STRING
writeExtensions() Dict
writeFormats() set_STRING
class GenericObject(*args, **kwargs)

Bases: RCObject

Generic dynamic polymorphic object.

GenericObject should not be used directly, but rather through the soma.aims.Object proxy.

See soma.aims.Object for a complete documentation.

append(self, a0: carto.Object)
clone(self) carto.Object
currentValue(self) carto.Object
get(self, a0: object, a1: Any = Py_None) Any
get(self, a0: int, a1: Any = Py_None) Any
getScalar(self) float
getString(self) object
getSyntax(self) object
hasSyntax(self) bool
has_key(self, a0: object) bool
index(self, a0: carto.Object) int
intKey(self) int
isArray(self) bool
isDictionary(self) bool
isDictionaryIterator(self) bool
isDynArray(self) bool
isIntKeyIterator(self) bool
isIterable(self) bool
isIterator(self) bool
isKeyIterator(self) bool
isNone(self) bool
isScalar(self) bool
isString(self) bool
isValid(self) bool
items()
key(self) object
keyObject(self) carto.Object
keys(self) Tuple
objectIterator(self) carto.Object
setSyntax(self, a0: object)
size(self) int
type(self) object
update(x)
values(self) Tuple
class Headered
class Headered(a0: carto.Headered)

Bases: RCObject

header(self) carto.Object | None
class IOObjectTypesDictionary
class IOObjectTypesDictionary(a0: carto.IOObjectTypesDictionary)

Bases: wrapper

hasReadType(datatype: object) bool
hasWriteType(datatype: object) bool
readTypes() Dict
writeTypes() Dict
class Info

Bases: wrapper

Information class, which provides information about the AIMS / Cartobase libraries, such as libraries versions, plugins, data paths, etc.

May be used in 2 ways: * use static methods: Info.printVersions(), Info.printInfos() to directly output info on the standard output * get a list of Info objects using Info.infos() then use the specific methods on the Info objects. There may be several Info objects since higher-level libraries and applications may add their own ones.

infos() Tuple

Static method. Get a list of Info objects, each library may provide one (or several).

printBuiltins(self)

Print on the standard output buitin optional features, selected when the library has been built.

printInfos()

Static method. Print all information on the standard output.

printOtherInfo(self)

Print on the standard output additional information (such as IO properties, settings options, etc).

printPaths(self)

Print on the standard output configured data paths.

printVersion(self)

Print on the standard output the library version.

printVersions()

Static method. Print versions of libraries

class Mutex(a0: int)
class Mutex(a0: carto.Mutex)

Bases: wrapper

lock(self)
unlock(self)
class MutexedObject
class MutexedObject(a0: carto.MutexedObject)

Bases: RCObject

mutex(self) carto.Mutex | None
class NumericGenericObjectConverter
class NumericGenericObjectConverter(a0: carto.NumericGenericObjectConverter)

Bases: wrapper

asBool(x: carto.GenericObject) bool
asInt(x: carto.GenericObject) int
asLong(x: carto.GenericObject) int
class Object

Bases: rc_ptr_GenericObject

Generic dynamic polymorphic object proxy.

Object is a proxy and a reference counter to a GenericObject. In most cases, Object and GenericObject are interchangeable and play the same role, there are two objects for technical reasons in the C++ layer, but in Python it whould make no difference.

The C++ generic object is an implementation of a mutable dynamic container which can hold any type of concrete data, with a generic access API which abstracts the concrete type of the object stored within it.

According to the underlying object type, Object can behave like a number, a string, or a container: sequence or dictionary. The python bindings can therefore support the sequence protocol, or the dictionary protocol, like a ‘real’ python object.

The only part which makes it visibly different from a python object is the conversions with stored objects, which are generally C++ objects (but can also be any python objects). Transparent conversions are done when possible.

We will take an example to show how to use it: a volume header. Suppose the files volume.img/volume.hdr[/volume.img.minf] represent a 3D volume (a MRI volume, typically, here in Analyze/SPM or Nifti format). We will read it using aims, and access its header data, which comes as a generic object.

>>> from __future__ import print_function # work using python 2 or 3
>>> from soma import aims
>>> vol = aims.read('volume.img')
>>> hdr = vol.header()

Now vol is the volume, and hdr its header, of type Object.

>>> type(hdr)
<class 'soma.aims.Object'>
>>> print(hdr)
{ 'voxel_size' : [ 1.875, 1.875, 4, 1 ], 'file_type' : 'SPM',
'byte_swapping' : 0, 'volume_dimension' : [ 128, 128, 16, 1 ],
'vox_units' : 'mm  ', 'cal_units' : '', 'data_type' : 'S16',
'disk_data_type' : 'S16', 'bits_allocated' : 2, 'tr' : 1,
'minimum' : 0, 'maximum' : 13645, 'scale_factor' : 1,
'scale_factor_applied' : 0, 'db_name' : '',
'aux_file' : '', 'orient' : 3, 'generated' : '', 'scannum' : '',
'patient_id' : '', 'exp_date' : '', 'exp_time' : '', 'views' : 0,
'start_field' : 32768, 'field_skip' : 8192, 'omax' : 0,
'omin' : 0, 'smax' : 32, 'smin' : 0, 'SPM_data_type' : '',
'possible_data_types' : [ 'S16' ], 'spm_radio_convention' : 1,
'spm_origin' : [ 65, 65, 9 ], 'origin' : [ 64, 63, 7 ] }

hdr prints like a dictionary, but is not really a python dictionary object. However it behaves like a dictionary:

>>> print(hdr['voxel_size'])
[ 1.875, 1.875, 4, 1 ]
>>> print(hdr['data_type'])
S16
>>> print(hdr['voxel_size'][0])
1.875
>>> for x in hdr:
>>>     print(x)
>>>
voxel_size
file_type
byte_swapping
volume_dimension
vox_units
cal_units
data_type
disk_data_type
bits_allocated
tr
minimum
maximum
scale_factor
scale_factor_applied
db_name
aux_file
orient
generated
scannum
patient_id
exp_date
exp_time
views
start_field
field_skip
omax
omin
smax
smin
SPM_data_type
possible_data_types
spm_radio_convention
spm_origin
origin
>>> for x,y in hdr.items():
>>>     print(x, ':', y)
>>>
voxel_size : [ 1.875, 1.875, 4, 1 ]
file_type : 'SPM'
byte_swapping : 0
volume_dimension : [ 128, 128, 16, 1 ]
vox_units : 'mm  '
cal_units : ''
data_type : 'S16'
disk_data_type : 'S16'
bits_allocated : 2
tr : 1
minimum : 0
maximum : 13645
scale_factor : 1
scale_factor_applied : 0
db_name : ''
aux_file : ''
orient : 3
generated : ''
scannum : ''
patient_id : ''
exp_date : ''
exp_time : ''
views : 0
start_field : 32768
field_skip : 8192
omax : 0
omin : 0
smax : 32
smin : 0
SPM_data_type : ''
possible_data_types : [ 'S16' ]
spm_radio_convention : 1
spm_origin : [ 65, 65, 9 ]
origin : [ 64, 63, 7 ]

Elements returned by the dictionary queries can have various types, althrough they are all stored internally in a C++ structure through soma.aims.Object wrappers. But when the underlying type of the element is known and can be retreived as a python object (either a standard python type or a python binding of a C++ class), it is done automatically. Such conversion is not possible when the underlying object has no python binding and is a pure C++ object, or when there is no conversion function. In this case, an Object is returned and contains the selected data.

Conversions are done using conversion methods that you generally do not need to call by hand: getScalar(), getString(), or the more general conversion method soma.aims.Object.getPython(). Elements types that cannot be converted to python concrete types are retreived in their Object container.

The generic conversion function in Object: getPython, is a static method and can be extended.

Elements in Object containers can generally be read and written:

>>> hdr['data_type'] = 'FLOAT'
>>> hdr['data_type']
'FLOAT'

This generally suits your needs. But in a few cases there will be a problem in internal types handling in the C++ layer.

Here, the underlying C++ generic object which did hold a C++ string (std::string) 'S16' is now replaced by another generic object built from the python string 'FLOAT', and which now wraps an element of type PyObject (or PyString). It just behaves the same way, so this operation is perfectly valid, but if C++ programs expect it to be a C++ std::string, they may fail.

Moreover, when writing back to existing concrete objects, some additional conversions may take place: for instance hdr['voxel_size'] is a C++ object of type std::vector<float>, so writing to hdr['voxel_size'][0] needs to enure we are actually writing a float, and if not, convert to it if possible.

You can query a type identifier for a generic object via the type() method:

>>> hdr.type()
'PropertySet'

Objects that can be converted from C++ generic objects to python are not necessarily known in advance. A conversion table is kept in the global variable soma.aims.convertersObjectToPython (in the aims module) and can be extended. Therefore other python modules using aims (such as sigraph) can extend this conversion table.

Details and tricks

There are some limitations and “unexpected behaviours” caused by the underlying C++ implementation of generic objects, and general behaviour differences between Python and C++. The following is expert-level details, so read it only if you have problems or you are a C++ expert with good knowledge of the cartobase C++ library…

Generic object - specialized object conversions

Putting a specific object in a generic Object makes a copy of it the first time it is done, because C++ generic objects contain the specialized elements. Once this has been done once, generic objects are shared and not copied anymore, which is consistent with the normal python behaviour. The non-pythonic thing is the first insertion in a generic object:

>>> a = aims.vector_FLOAT([12.6, -5.7])
>>> print(a)
[ 12.6, -5.7 ]
>>> hdr['foo'] = a # here a is copied into hdr['foo']
>>> a.append( 6.8 ) # a is changed but not hdr
>>> print(a)
[ 12.6, -5.7, 6.8 ]
>>> print(hdr['foo'])
[ 12.6, -5.7 ]
>>> hdr['dummy'] = hdr['foo']
>>> hdr['foo'].append(4.2)
>>> print(hdr['dummy']) # this time hdr['dummy'] is changed
[ 12.6, -5.7, 4.2 ]

To overcome the first copy problem, you may have to reassign the initial variable to the copy instance:

>>> a = aims.vector_FLOAT([1.2, 2.3, 3.4])
>>> hdr['foo'] = a
>>> a = hdr['foo']
>>> print(hdr['foo'])
[ 1.2, 2.3, 3.4 ]
>>> a[1] = 12.8
>>> print(a)
[ 1.2, 12.8, 3.4 ]
>>> print(hdr['foo'])
[ 1.2, 12.8, 3.4 ]

There are exceptions to this behaviour:

  • pure python objects, like lists or dictionaries are never copied since it is only a pointer to them (the C PyObject * pointer) which is stored.

  • small builtin types: numbers and strings are always copied since they are always converted and copied, not wrapped, when passed from python to C++ and vice versa.

The get() method

On Object the get method is ambiguous and has 2 meanings:

  • get() without arguments is a wrapping to the C++ rc_ptr::get() which returns the underlying wrapped object (here, a GenericObject)

  • get(key, default=None) is the dict-like method that is available on GenericObject since aims 4.6.1.

Depending on the arguments the Object method will redirect to the right one, thus:

myobject.get()            # gets the GenericObject
myobject.get('key')       # gets the dict item under keyt 'key'
myobject.get().get('key') # does both, but this is what the previous line
                          # already does, so the result is the same

To avoid this ambiguity, Object.get() and rc_ptr.get() have been renamed _get() years ago (in aims 4.0 I think) but get() is still present for compatibility. This use (without argument) is obsolete and may be removed in the future.

getPython()

Conversion to python types: extracts what is in the Object (when possible). The global dictionary soma.aims.convertersObjectToPython stores converters

isNone(self) bool
static ptrToObject(x)
static rcToObject(x)
static toObject(x)
class PSyntaxSet
class PSyntaxSet(a0: carto.PSyntaxSet)

Bases: wrapper

keys(self) vector_STRING | None
semantic(self, a0: object, a1: object) carto.Semantic
syntaxKeys(self, a0: object) vector_STRING | None
class Paths

Bases: simplewrapper

findResourceFile(filename: object, project: object = '', version: object = '') object
findResourceFiles(filename: object, project: object = '', version: object = '') list_STRING
globalShared() object
home() object
installRoot() object
memmap() object
resourceSearchPath() list_STRING
shfjShared() object
tempDir() object
class PluginLoader
class PluginLoader(a0: carto.PluginLoader)

Bases: wrapper

class PluginFile(file: object, ver: object = '')
class PluginFile(a0: carto.PluginLoader.PluginFile)

Bases: wrapper

filename
loaded
version
load(verboseLevel: int = -1, forcereload: bool = False)
loadPluginFile(file: object, version: object = '', verboseLevel: int = 0)
pluginFiles() list_PluginFile
class PropertySet
class PropertySet(a0: carto.PropertySet)

Bases: wrapper

clearProperties(self)
copyBuiltinProperties(self, a0: carto.PropertySet)
getProperty(self, a0: object) carto.Object
getProperty(self, a0: carto.Object) carto.Object
hasProperty(self, a0: object) bool
objectIterator(self) carto.Object
removeProperty(self, a0: object) bool
setProperty(self, a0: object, a1: carto.Object)
size(self) int
PyObjectfromObject(a0: carto.GenericObject) Any
class RCObject(a0: carto.RCObject)

Bases: wrapper

class Referential(ndim: int = 3)

Bases: wrapper

ref = Referential(ndim=3)

Build a referential with the given number of dimensions

carto.Referential(ref: carto.Referential)

carto.Referential(ref: carto.Object)

Referential holds information about coordinates system and axes.

It also provides utility methods to transform to other coordinates orientations.

Orientation describes the coordinates system axes, what they represent and in which direction they go.

The orientation description is either a vector of constants (Orientaton enum), or a string containing one letter per axis. Each letter or Orientation enum value describes the axis and its direction. It is based on the Left/Right, Anterior/Posterior, Superior/Inferior convention, see:

http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm

For brain images, axes orientations are described relatively to the head: AP (anterior to posterior) or PA, LR (left to right) or RL, SI (superior to inferior) or IS. To summarize the 3 axes we sometimes use the 3 initials of the directions axes are pointing to: RAS (X: to Right, Y: to Anterior, Z: to Superior), LAS, LPI, etc.

This convention used in the neuroimaging community is valid for 3D images. Here we extend it to up to 10 dimensions, using letters T to Z, with uppercase for increasing order, and lowercase for decreasing order. Thus, T can hopefully correspond to “time”. But be careful that letters X, Y, Z here do not correspond to the common “1st, 2nd and 3rd axes”: here it is the meaning of axes.

Orientation strings may be given as “incomplete” strings, and will in most cases be extended to the actual number of dimensions, using default axes to complement. Thus, for a 5D referential, “LPI” is the same sas “LPITU”.

A = 3
I = 6
L = 1
class Orientation

Bases: int

P = 4
R = 2
S = 5
Undefined = 0
axesOrientation(self) vector_S32

orientation of the referential, as a vector of constants. Each number corresponds to an Orientation enum value, but cast to int

ensureOrder(self, ndim: int)

update the order, keeping existing orientation information

exportedHeader(self) carto.Object

export a ready-to-save version of the header, where, especially, the axes_orientation property is an orientation string

fromHeader(header: carto.Object, except_if_undefined: bool = False) carto.Referential

referential = Referential.fromHeader(header)

Build a Referential object from a header dict. This is basically the same as the constructor Referential( Object ) except that if except_if_undefined is set, and if the header does not specify an orientation, then an exception is thrown.

header(self) carto.Object
is3DOriented(self) bool
  • res = referential.is3DOriented()

tells if the orientation is comatible with a 3D transformation (all axes after the 3th are the default ones)

  • res = referential.is3DOriented(orient)

tells if the given orientation is 3D compatible. orient may be a string or a vector of constants. (in the latter case the method is static)

is3DOriented(self, orient: object) -> bool

is3DOriented(orient: vector_S32) -> bool

isDirect(self) bool
isLpiOriented(self) bool

tells if the orientation is the default LPI one.

lpiReferentialUuid(self) object

LPI oriented referential

AIMS volumes are initially in LPI orientation. If flipped, the referential will change to a diferent one. The LPI referential is the original one before any flip is applied.

order(self) int

number of axes (or space dimensions)

orientationCode(orient: object) carto.Referential.Orientation

orientation constant for a single orientation axis character

orientationFromTransform(self, tr: soma.AffineTransformationBase) vector_S32

target orientation for a given transform matrix.

The matrix should be a flip matrix, not any affine transform.

orientationStr(self) object
  • orient = referential.orientationStr()

orientation of the referential, as a string of one letter per axis

  • orient = referential.orientationStr(‘LPI’)

extended orientation information according to the needed number of axes

  • orient = Referential.orientationStr(Referential.L)

orientation string for a single axis orientation (1 char)

  • orient = Referential.orientationStr([1, 3, 6])

build the orientation string from a vector of constants

orientationStr(self, orient: object) -> object

orientationStr(orient: carto.Referential.Orientation) -> object

orientationStr(orient: vector_S32) -> object

orientationVector(orient: object, ndim: int = 0) vector_S32

orient = Referential.orientationVector(orient, dim)

build an orientation vector from a string.

If dim is given, the vector will be extended to this number of dimensions.

setAxisTransform(tr: soma.AffineTransformationBase, src_axis: int, dst_axis: int, inv_mult: int, tsl: vector_FLOAT = vector_FLOAT())

Build one line of transformation matrix

This rather internal function is used to build a transformation matrix. This function builds one line to get from a source axis to a destination one.

setHeader(self, header: carto.Object)
setLpiReferential(self, lpi_uuid: object)

set the LPI original referential UUID

setOrientation(self, orient: object, allow_resize: bool = False)

set a new orientation for the referential.

if allow_resize is false, the given orientation will decide the new axes number. If true, it will be updated to keep the older number of dimensions.

No other information will be changed.

  • referential.setOrientation(orient_str, allow_resize=False)

  • referential.setOrientation(orient_vec)

Parameters:
  • orient_str (str) – orientation string. May be extended to the actual number of dimensions if allow_resize is given.

  • orient_vec (list of int) – orientations as a vector of constants

  • allow_resize (bool (optional)) – if True, dimensions will be extended to the actual number of dimensions. Otherwise the given orientation will completely override.

  • setOrientation(self (vector_S32))

  • orient (vector_S32))

setUuid(self, uuid: object)

force a new UUID

toOrientation(self, orient: object, transl: vector_FLOAT = vector_FLOAT(), allow_resize: bool = False) rc_ptr_Transformation

Build a transformation matrix to go from this referential to a given orientation.

Parameters:
  • orient (vector_S32, transl: vector_FLOAT = vector_FLOAT()) -> rc_ptr_Transformation) – destination orientation, given as a string or a vector of constants.

  • allow_resize (bool) – If allow_resize is False, the matrix will have exactly the order of the given orientation. If it it True, it will be extended to the order of the referential.

  • transl (list of float (optional)) – The translation vector is used to build the last column of the transformation matrix: it is the origin shift needed when an axis is reversed. Typically it is the volume dimension (in mm, or the dimension -1 in voxels)

  • toOrientation(self (vector_S32, transl: vector_FLOAT = vector_FLOAT()) -> rc_ptr_Transformation)

  • orient

uuid(self) object

a referential has an unique identifier

class Roi(*args)

Bases: Headered

class Semantic
class Semantic(a0: object, a1: bool = False, a2: bool = False)
class Semantic(a0: carto.Semantic)

Bases: wrapper

internal
needed
type
class SharedObject
class SharedObject(x: carto.SharedObject)

Bases: RCObject

class Site

Bases: wrapper

at(self, a0: int) float
set(self, a0: int, a1: float)
size(self) int
class SiteIterator

Bases: wrapper

getSite(self) rc_ptr_Site
isValid(self) bool
next(self)
restart(self)
writeSite(self)
class SyntaxReader(a0: object)

Bases: wrapper

read(self) carto.PSyntaxSet | None
debugMessageLevel() int
class fdinhibitor(fd: int, permanent: bool = False)
class fdinhibitor(fd, permanent=False)

Bases: wrapper

fd: file descriptor to inhibit, permanent: if false, don’t reopen the stream when deleting the fdinhibitor

usage: from soma import aims fdi = aims.carto.fdinhibitor(sys.stderr.fileno()) fdi.close() # call a function which prints something on stderr which we don’t want to # appear fdi.open() sys.stderr.write(‘after reopenn’) # works again

carto.fdinhibitor(a0: carto.fdinhibitor)

Temporarily closes a file descriptor (typically, stdout/stderr). Currently, this low-level implementation doesn’t work with all C++ streams: on some systems C++ streams stay in a bad state afterwards and are silent forever. Standard IO streams (cin, cout, cerr) are checked and protected against this problem.

class ResetCallback
class ResetCallback(a0: carto.fdinhibitor.ResetCallback)

Bases: wrapper

close(self)
hasResetCallback(name: object) bool
notify(self, fd: int)
open(self)
registerResetCallback(name: object, cbk: carto.fdinhibitor.ResetCallback | None)
unregisterResetCallback(name: object)
none() carto.Object

Returns a null aims.Object

class rc_ptr_MaskIterator
class rc_ptr_MaskIterator(a0: aims.MaskIterator | None)
class rc_ptr_MaskIterator(a0: carto.rc_ptr_MaskIterator)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: aims.MaskIterator | None)
class rc_ptr_RoiIterator
class rc_ptr_RoiIterator(a0: aims.RoiIterator | None)
class rc_ptr_RoiIterator(a0: carto.rc_ptr_RoiIterator)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: aims.RoiIterator | None)
setDebugMessageLevel(v: int)
setOrientationInformation(hdr: carto.Object, orient: object)
setOrientationInformation(header, orient) None

force or alter a specific voxels orientation on disk (if the output format supports it), by changing the internal “storage_to_memory” matrix, in a more or less convenient way, with different syntaxes:

  • “flipx yflip”: flips orientations of x and y axes.

-“neuro”, “neurological” or “left-to-right”: force neuro orientation. - “radio”, “radiological” or “right-to-left”: force radio orientation. - “-1 1 -1”: set a flip matrix flipping x and z axes (set the diagonal). - “-1 0 0 0 1 0 0 0 -1”: same by specifying the full rotation matrix. - “-1 0 0 255 0 1 0 0 0 0 -1 123 0 0 0 1”: same by specifying

the full 4x4 matrix.

By default, all orientation matrices are applied relatively to the current voxels orientation. To set absolute matrices (from the AIMS conventional orientation), specify “abs:” before the matrix. Ex:

  • “abs: -1 1 -1”

  • “abs: -1 0 0 255 0 1 0 0 0 0 -1 123 0 0 0 1”

setVerbose(v: int)
verbose() int
soma.aims.check(filename)[source]
check that <filename> can be read using aims::

IOError is raised when <filename> can not be read using aims:

Parameters
----------
filename: str

Returns
----------
dict containing header information

aims.check(‘file.nii’)

soma.aims.convertersObjectToPython = {'POINT2DF': <built-in function fromObject>, 'POINT3DF': <built-in function fromObject>, 'POINT3DI': <built-in function fromObject>, 'POINT3DL': <built-in function fromObject>, 'POINT4DF': <built-in function fromObject>, 'PyObject': <built-in function PyObjectfromObject>, 'S16': <built-in function asInt>, 'S32': <built-in function asInt>, 'U16': <built-in function asInt>, 'U32': <built-in function asInt>, 'boolean': <built-in function asBool>, 'rc_ptr of Mesh of FLOAT': <built-in function fromObject>, 'rc_ptr of Mesh of POINT2DF': <built-in function fromObject>, 'rc_ptr of Mesh of VOID': <built-in function fromObject>, 'rc_ptr of Mesh4 of FLOAT': <built-in function fromObject>, 'rc_ptr of Mesh4 of POINT2DF': <built-in function fromObject>, 'rc_ptr of Mesh4 of VOID': <built-in function fromObject>, 'rc_ptr of Segments of FLOAT': <built-in function fromObject>, 'rc_ptr of Segments of POINT2DF': <built-in function fromObject>, 'rc_ptr of Segments of VOID': <built-in function fromObject>, 'rc_ptr of Transformation3d': <built-in function fromObject>, 'rc_ptr of bucket of DOUBLE': <built-in function fromObject>, 'rc_ptr of bucket of FLOAT': <built-in function fromObject>, 'rc_ptr of bucket of S16': <built-in function fromObject>, 'rc_ptr of bucket of S32': <built-in function fromObject>, 'rc_ptr of bucket of U16': <built-in function fromObject>, 'rc_ptr of bucket of U32': <built-in function fromObject>, 'rc_ptr of bucket of VOID': <built-in function fromObject>, 'rc_ptr of mesh of VOID': <built-in function fromObject>, 'rc_ptr of texture of FLOAT': <built-in function fromObject>, 'rc_ptr of texture of POINT2DF': <built-in function fromObject>, 'rc_ptr of texture of S16': <built-in function fromObject>, 'rc_ptr of texture of S32': <built-in function fromObject>, 'rc_ptr of texture of U32': <built-in function fromObject>, 'string': <function <lambda>>}

Conversion function map. These converters are used to convert between a C++ object inside a generic object to their Python equivalent. They are typically used when accessing a sub-object:

>>> from soma import aims
>>> v = aims.Object(aims.vector_STRING())
>>> v.append('toto')
>>> v.append('bubu')
>>> type(v)
soma.aims.Object
>>> v.type()
'vector of string'
>>> v[0]
'toto'
>>> type(v[0])
str

In this example, v contains a C++ object of type std::vector<std::string>. Its elements are accessed via a wrapping which is using a C++ generic object (carto::Object). But in python we obtain a str (pyton string): the string has been taken out of the generic object using this conversion map (and then converted automatically to str by the SIP tool).

soma.aims.floodFill(vol: Volume_S16, pos: AimsVector_S16_3, value: int, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: int = 0, verbose: bool = False)
soma.aims.floodFill(vol: Volume_U16, pos: AimsVector_S16_3, value: int, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: int = 0, verbose: bool = False) None
soma.aims.floodFill(vol: Volume_S32, pos: AimsVector_S16_3, value: int, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: int = 0, verbose: bool = False) None
soma.aims.floodFill(vol: Volume_U32, pos: AimsVector_S16_3, value: int, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: int = 0, verbose: bool = False) None
soma.aims.floodFill(vol: Volume_FLOAT, pos: AimsVector_S16_3, value: float, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: float = 0, verbose: bool = False) None
soma.aims.floodFill(vol: Volume_DOUBLE, pos: AimsVector_S16_3, value: float, connectivity: aims.Connectivity.Type = aims.Connectivity.CONNECTIVITY_18_XYZ, tolerence: float = 0, verbose: bool = False) None
soma.aims.getLinearInterpolator(a0: object) rc_ptr_Interpolator
soma.aims.getLinearInterpolator(a0: rc_ptr_Volume_U8) rc_ptr_Interpolator
soma.aims.getLinearInterpolator(a0: rc_ptr_Volume_U16) rc_ptr_Interpolator
soma.aims.getLinearInterpolator(a0: rc_ptr_Volume_S16) rc_ptr_Interpolator
soma.aims.getLinearInterpolator(a0: rc_ptr_Volume_U32) rc_ptr_Interpolator
soma.aims.getLinearInterpolator(a0: rc_ptr_Volume_S32) rc_ptr_Interpolator
soma.aims.getLinearInterpolator(a0: rc_ptr_Volume_FLOAT) rc_ptr_Interpolator
soma.aims.getLinearInterpolator(a0: rc_ptr_Volume_DOUBLE) rc_ptr_Interpolator
soma.aims.getMaskIterator(a0: object) carto.rc_ptr_MaskIterator
soma.aims.getRoiIterator(a0: object) carto.rc_ptr_RoiIterator
soma.aims.getRoiIterator(data: Graph) carto.rc_ptr_RoiIterator
soma.aims.getRoiIterator(data: rc_ptr_Volume_S16) carto.rc_ptr_RoiIterator
soma.aims.get_transform_to(aims_obj, ref)[source]

Get a transformation object in an AIMS object header to the given referential identifier. Objects need to have a header() method following the aims conventions (referentials and transformations elements beingn lists).

Parameters:
  • aims_obj (Aims object with a header) – object we want to get the transformation from

  • ref (str) – target refetential identifier. May be an UUID string, or a known identifier such as “Talairach-MNI template-SPM” (see aims.StandardReferentials attributes)

Returns:

transform – the transformation object, or None if no matching one is found

Return type:

aims.AffineTransformation3d

soma.aims.giftiColormap(texture: TimeTexture_S16) rc_ptr_Volume_RGBA
soma.aims.giftiColormap(texture: TimeTexture_FLOAT) rc_ptr_Volume_RGBA
soma.aims.giftiColormap(texture: TimeTexture_DOUBLE) rc_ptr_Volume_RGBA
soma.aims.giftiColormap(texture: TimeTexture_S32) rc_ptr_Volume_RGBA
soma.aims.giftiColormap(texture: TimeTexture_U32) rc_ptr_Volume_RGBA
soma.aims.giftiColormap(header: carto.Object) rc_ptr_Volume_RGBA
class soma.aims.list_AimsTimeSurface_3_VOID
class soma.aims.list_AimsTimeSurface_3_VOID(a0: Any)
class soma.aims.list_AimsTimeSurface_3_VOID(a0: list_AimsTimeSurface_3_VOID)

Bases: wrapper

append(self, a0: AimsTimeSurface_3_VOID | None)
assign(self, a0: list_AimsTimeSurface_3_VOID)
index(self, a0: AimsTimeSurface_3_VOID | None) int
list(self) List
remove(self, a0: AimsTimeSurface_3_VOID | None)
size(self) int
class soma.aims.list_AimsTimeSurface_3_VOID_iterator(a0: list_AimsTimeSurface_3_VOID | None)
class soma.aims.list_AimsTimeSurface_3_VOID_iterator(a0: list_AimsTimeSurface_3_VOID_iterator)

Bases: wrapper

class soma.aims.list_DOUBLE
class soma.aims.list_DOUBLE(a0: Any)
class soma.aims.list_DOUBLE(a0: list_DOUBLE)

Bases: wrapper

append(self, a0: float)
assign(self, a0: list_DOUBLE)
index(self, a0: float) int
list(self) List
remove(self, a0: float)
size(self) int
class soma.aims.list_DOUBLE_iterator(a0: list_DOUBLE | None)
class soma.aims.list_DOUBLE_iterator(a0: list_DOUBLE_iterator)

Bases: wrapper

class soma.aims.list_EdgePtr
class soma.aims.list_EdgePtr(a0: Any)
class soma.aims.list_EdgePtr(a0: list_EdgePtr)

Bases: wrapper

append(self, a0: Edge | None)
assign(self, a0: list_EdgePtr)
index(self, a0: Edge | None) int
list(self) List
remove(self, a0: Edge | None)
size(self) int
class soma.aims.list_EdgePtr_iterator(a0: list_EdgePtr | None)
class soma.aims.list_EdgePtr_iterator(a0: list_EdgePtr_iterator)

Bases: wrapper

class soma.aims.list_FLOAT
class soma.aims.list_FLOAT(a0: Any)
class soma.aims.list_FLOAT(a0: list_FLOAT)

Bases: wrapper

append(self, a0: float)
assign(self, a0: list_FLOAT)
index(self, a0: float) int
list(self) List
remove(self, a0: float)
size(self) int
class soma.aims.list_FLOAT_iterator(a0: list_FLOAT | None)
class soma.aims.list_FLOAT_iterator(a0: list_FLOAT_iterator)

Bases: wrapper

class soma.aims.list_GraphPtr
class soma.aims.list_GraphPtr(a0: Any)
class soma.aims.list_GraphPtr(a0: list_GraphPtr)

Bases: wrapper

append(self, a0: Graph | None)
assign(self, a0: list_GraphPtr)
index(self, a0: Graph | None) int
list(self) List
remove(self, a0: Graph | None)
size(self) int
class soma.aims.list_GraphPtr_iterator(a0: list_GraphPtr | None)
class soma.aims.list_GraphPtr_iterator(a0: list_GraphPtr_iterator)

Bases: wrapper

class soma.aims.list_POINT3D
class soma.aims.list_POINT3D(a0: Any)
class soma.aims.list_POINT3D(a0: list_POINT3D)

Bases: wrapper

append(self, a0: AimsVector_S16_3 | None)
assign(self, a0: list_POINT3D)
index(self, a0: AimsVector_S16_3 | None) int
list(self) List
remove(self, a0: AimsVector_S16_3 | None)
size(self) int
class soma.aims.list_POINT3DF
class soma.aims.list_POINT3DF(a0: Any)
class soma.aims.list_POINT3DF(a0: list_POINT3DF)

Bases: wrapper

append(self, a0: AimsVector_FLOAT_3 | None)
assign(self, a0: list_POINT3DF)
index(self, a0: AimsVector_FLOAT_3 | None) int
list(self) List
remove(self, a0: AimsVector_FLOAT_3 | None)
size(self) int
class soma.aims.list_POINT3DF_iterator(a0: list_POINT3DF | None)
class soma.aims.list_POINT3DF_iterator(a0: list_POINT3DF_iterator)

Bases: wrapper

class soma.aims.list_POINT3D_iterator(a0: list_POINT3D | None)
class soma.aims.list_POINT3D_iterator(a0: list_POINT3D_iterator)

Bases: wrapper

class soma.aims.list_PluginFile
class soma.aims.list_PluginFile(a0: Any)
class soma.aims.list_PluginFile(a0: list_PluginFile)

Bases: wrapper

append(self, a0: carto.PluginLoader.PluginFile | None)
assign(self, a0: list_PluginFile)
index(self, a0: carto.PluginLoader.PluginFile | None) int
list(self) List
remove(self, a0: carto.PluginLoader.PluginFile | None)
size(self) int
class soma.aims.list_PluginFile_iterator(a0: list_PluginFile | None)
class soma.aims.list_PluginFile_iterator(a0: list_PluginFile_iterator)

Bases: wrapper

class soma.aims.list_S32
class soma.aims.list_S32(a0: Any)
class soma.aims.list_S32(a0: list_S32)

Bases: wrapper

append(self, a0: int)
assign(self, a0: list_S32)
index(self, a0: int) int
list(self) List
remove(self, a0: int)
size(self) int
class soma.aims.list_S32_iterator(a0: list_S32 | None)
class soma.aims.list_S32_iterator(a0: list_S32_iterator)

Bases: wrapper

class soma.aims.list_STRING
class soma.aims.list_STRING(a0: Any)
class soma.aims.list_STRING(a0: list_STRING)

Bases: wrapper

append(self, a0: object | None)
assign(self, a0: list_STRING)
index(self, a0: object | None) int
list(self) List
remove(self, a0: object | None)
size(self) int
class soma.aims.list_STRING_iterator(a0: list_STRING | None)
class soma.aims.list_STRING_iterator(a0: list_STRING_iterator)

Bases: wrapper

class soma.aims.list_U32
class soma.aims.list_U32(a0: Any)
class soma.aims.list_U32(a0: list_U32)

Bases: wrapper

append(self, a0: int)
assign(self, a0: list_U32)
index(self, a0: int) int
list(self) List
remove(self, a0: int)
size(self) int
class soma.aims.list_U32_iterator(a0: list_U32 | None)
class soma.aims.list_U32_iterator(a0: list_U32_iterator)

Bases: wrapper

class soma.aims.list_rc_ptr_Graph
class soma.aims.list_rc_ptr_Graph(a0: Any)
class soma.aims.list_rc_ptr_Graph(a0: list_rc_ptr_Graph)

Bases: wrapper

append(self, a0: rc_ptr_Graph | None)
assign(self, a0: list_rc_ptr_Graph)
index(self, a0: rc_ptr_Graph | None) int
list(self) List
remove(self, a0: rc_ptr_Graph | None)
size(self) int
class soma.aims.list_rc_ptr_Graph_iterator(a0: list_rc_ptr_Graph | None)
class soma.aims.list_rc_ptr_Graph_iterator(a0: list_rc_ptr_Graph_iterator)

Bases: wrapper

class soma.aims.list_vector_POINT3DF
class soma.aims.list_vector_POINT3DF(a0: Any)
class soma.aims.list_vector_POINT3DF(a0: list_vector_POINT3DF)

Bases: wrapper

append(self, a0: vector_POINT3DF | None)
assign(self, a0: list_vector_POINT3DF)
index(self, a0: vector_POINT3DF | None) int
list(self) List
remove(self, a0: vector_POINT3DF | None)
size(self) int
class soma.aims.list_vector_POINT3DF_iterator(a0: list_vector_POINT3DF | None)
class soma.aims.list_vector_POINT3DF_iterator(a0: list_vector_POINT3DF_iterator)

Bases: wrapper

class soma.aims.list_vector_STRING
class soma.aims.list_vector_STRING(a0: Any)
class soma.aims.list_vector_STRING(a0: list_vector_STRING)

Bases: wrapper

append(self, a0: vector_STRING | None)
assign(self, a0: list_vector_STRING)
index(self, a0: vector_STRING | None) int
list(self) List
remove(self, a0: vector_STRING | None)
size(self) int
class soma.aims.list_vector_STRING_iterator(a0: list_vector_STRING | None)
class soma.aims.list_vector_STRING_iterator(a0: list_vector_STRING_iterator)

Bases: wrapper

soma.aims.mask(src: BucketMap_VOID, m: BucketMap_VOID, a2: bool = True) BucketMap_VOID | None
soma.aims.maskWithVolume(src: BucketMap_VOID, m: rc_ptr_Volume_S16, a2: int = 0, insideval: bool = False) BucketMap_VOID | None
class soma.aims.merge_t

Bases: int

soma.aims.proxydelitem(self, attr)[source]
soma.aims.proxyiter(self)[source]
class soma.aims.pyaims

Bases: simplewrapper

class DebuggingVolume(sizeX: int = 1, sizeY: int = 1, sizeZ: int = 1, sizeT: int = 1)
class DebuggingVolume(a0: pyaims.DebuggingVolume)

Bases: Volume_S16

created = False
deleted = False
soma.aims.rc_ptr(*args, **kwargs)[source]

Create an instance of aims reference-counting object (rc_ptr_<type>) from a type parameter, which may be specified as the dtype keyword argument, or as one of the arguments if one is identitied as a type.

Type definitions should match those accepted by typeCode().

class soma.aims.rc_ptr_AffineTransformation3d
class soma.aims.rc_ptr_AffineTransformation3d(a0: aims.AffineTransformation3d | None)
class soma.aims.rc_ptr_AffineTransformation3d(a0: rc_ptr_AffineTransformation3d)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: aims.AffineTransformation3d | None)
soma.aims.rc_ptr_AimsTimeSurface_2

alias of rc_ptr_AimsTimeSurface_2_VOID

class soma.aims.rc_ptr_AimsTimeSurface_2_FLOAT
class soma.aims.rc_ptr_AimsTimeSurface_2_FLOAT(a0: AimsTimeSurface_2_FLOAT | None)
class soma.aims.rc_ptr_AimsTimeSurface_2_FLOAT(a0: rc_ptr_AimsTimeSurface_2_FLOAT)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_2_FLOAT | None)
class soma.aims.rc_ptr_AimsTimeSurface_2_POINT2DF
class soma.aims.rc_ptr_AimsTimeSurface_2_POINT2DF(a0: AimsTimeSurface_2_POINT2DF | None)
class soma.aims.rc_ptr_AimsTimeSurface_2_POINT2DF(a0: rc_ptr_AimsTimeSurface_2_POINT2DF)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_2_POINT2DF | None)
class soma.aims.rc_ptr_AimsTimeSurface_2_VOID
class soma.aims.rc_ptr_AimsTimeSurface_2_VOID(a0: AimsTimeSurface_2_VOID | None)
class soma.aims.rc_ptr_AimsTimeSurface_2_VOID(a0: rc_ptr_AimsTimeSurface_2_VOID)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_2_VOID | None)
soma.aims.rc_ptr_AimsTimeSurface_3

alias of rc_ptr_AimsTimeSurface_3_VOID

class soma.aims.rc_ptr_AimsTimeSurface_3_FLOAT
class soma.aims.rc_ptr_AimsTimeSurface_3_FLOAT(a0: AimsTimeSurface_3_FLOAT | None)
class soma.aims.rc_ptr_AimsTimeSurface_3_FLOAT(a0: rc_ptr_AimsTimeSurface_3_FLOAT)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_3_FLOAT | None)
class soma.aims.rc_ptr_AimsTimeSurface_3_POINT2DF
class soma.aims.rc_ptr_AimsTimeSurface_3_POINT2DF(a0: AimsTimeSurface_3_POINT2DF | None)
class soma.aims.rc_ptr_AimsTimeSurface_3_POINT2DF(a0: rc_ptr_AimsTimeSurface_3_POINT2DF)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_3_POINT2DF | None)
class soma.aims.rc_ptr_AimsTimeSurface_3_VOID
class soma.aims.rc_ptr_AimsTimeSurface_3_VOID(a0: AimsTimeSurface_3_VOID | None)
class soma.aims.rc_ptr_AimsTimeSurface_3_VOID(a0: rc_ptr_AimsTimeSurface_3_VOID)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_3_VOID | None)
soma.aims.rc_ptr_AimsTimeSurface_4

alias of rc_ptr_AimsTimeSurface_4_VOID

class soma.aims.rc_ptr_AimsTimeSurface_4_FLOAT
class soma.aims.rc_ptr_AimsTimeSurface_4_FLOAT(a0: AimsTimeSurface_4_FLOAT | None)
class soma.aims.rc_ptr_AimsTimeSurface_4_FLOAT(a0: rc_ptr_AimsTimeSurface_4_FLOAT)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_4_FLOAT | None)
class soma.aims.rc_ptr_AimsTimeSurface_4_POINT2DF
class soma.aims.rc_ptr_AimsTimeSurface_4_POINT2DF(a0: AimsTimeSurface_4_POINT2DF | None)
class soma.aims.rc_ptr_AimsTimeSurface_4_POINT2DF(a0: rc_ptr_AimsTimeSurface_4_POINT2DF)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_4_POINT2DF | None)
class soma.aims.rc_ptr_AimsTimeSurface_4_VOID
class soma.aims.rc_ptr_AimsTimeSurface_4_VOID(a0: AimsTimeSurface_4_VOID | None)
class soma.aims.rc_ptr_AimsTimeSurface_4_VOID(a0: rc_ptr_AimsTimeSurface_4_VOID)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: AimsTimeSurface_4_VOID | None)
class soma.aims.rc_ptr_BucketMap_DOUBLE
class soma.aims.rc_ptr_BucketMap_DOUBLE(a0: BucketMap_DOUBLE | None)
class soma.aims.rc_ptr_BucketMap_DOUBLE(a0: rc_ptr_BucketMap_DOUBLE)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: BucketMap_DOUBLE | None)
class soma.aims.rc_ptr_BucketMap_FLOAT
class soma.aims.rc_ptr_BucketMap_FLOAT(a0: BucketMap_FLOAT | None)
class soma.aims.rc_ptr_BucketMap_FLOAT(a0: rc_ptr_BucketMap_FLOAT)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: BucketMap_FLOAT | None)
class soma.aims.rc_ptr_BucketMap_S16
class soma.aims.rc_ptr_BucketMap_S16(a0: BucketMap_S16 | None)
class soma.aims.rc_ptr_BucketMap_S16(a0: rc_ptr_BucketMap_S16)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: BucketMap_S16 | None)
class soma.aims.rc_ptr_BucketMap_S32
class soma.aims.rc_ptr_BucketMap_S32(a0: BucketMap_S32 | None)
class soma.aims.rc_ptr_BucketMap_S32(a0: rc_ptr_BucketMap_S32)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: BucketMap_S32 | None)
class soma.aims.rc_ptr_BucketMap_U16
class soma.aims.rc_ptr_BucketMap_U16(a0: BucketMap_U16 | None)
class soma.aims.rc_ptr_BucketMap_U16(a0: rc_ptr_BucketMap_U16)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: BucketMap_U16 | None)
class soma.aims.rc_ptr_BucketMap_U32
class soma.aims.rc_ptr_BucketMap_U32(a0: BucketMap_U32 | None)
class soma.aims.rc_ptr_BucketMap_U32(a0: rc_ptr_BucketMap_U32)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: BucketMap_U32 | None)
class soma.aims.rc_ptr_BucketMap_VOID
class soma.aims.rc_ptr_BucketMap_VOID(a0: BucketMap_VOID | None)
class soma.aims.rc_ptr_BucketMap_VOID(a0: rc_ptr_BucketMap_VOID)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: BucketMap_VOID | None)
class soma.aims.rc_ptr_DataSource
class soma.aims.rc_ptr_DataSource(a0: soma.DataSource | None)
class soma.aims.rc_ptr_DataSource(a0: rc_ptr_DataSource)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: soma.DataSource | None)
class soma.aims.rc_ptr_DataSourceInfo
class soma.aims.rc_ptr_DataSourceInfo(a0: soma.DataSourceInfo | None)
class soma.aims.rc_ptr_DataSourceInfo(a0: rc_ptr_DataSourceInfo)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: soma.DataSourceInfo | None)
class soma.aims.rc_ptr_Edge
class soma.aims.rc_ptr_Edge(a0: Edge | None)
class soma.aims.rc_ptr_Edge(a0: rc_ptr_Edge)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Edge | None)
class soma.aims.rc_ptr_GenericObject
class soma.aims.rc_ptr_GenericObject(a0: carto.GenericObject | None)
class soma.aims.rc_ptr_GenericObject(a0: rc_ptr_GenericObject)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: carto.GenericObject | None)
class soma.aims.rc_ptr_Graph
class soma.aims.rc_ptr_Graph(a0: Graph | None)
class soma.aims.rc_ptr_Graph(a0: rc_ptr_Graph)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Graph | None)
class soma.aims.rc_ptr_Interpolator
class soma.aims.rc_ptr_Interpolator(a0: aims.Interpolator | None)
class soma.aims.rc_ptr_Interpolator(a0: rc_ptr_Interpolator)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: aims.Interpolator | None)
class soma.aims.rc_ptr_Site
class soma.aims.rc_ptr_Site(a0: carto.Site | None)
class soma.aims.rc_ptr_Site(a0: rc_ptr_Site)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: carto.Site | None)
class soma.aims.rc_ptr_SiteIterator
class soma.aims.rc_ptr_SiteIterator(a0: carto.SiteIterator | None)
class soma.aims.rc_ptr_SiteIterator(a0: rc_ptr_SiteIterator)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: carto.SiteIterator | None)
class soma.aims.rc_ptr_SparseMatrix
class soma.aims.rc_ptr_SparseMatrix(a0: aims.SparseMatrix | None)
class soma.aims.rc_ptr_SparseMatrix(a0: rc_ptr_SparseMatrix)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: aims.SparseMatrix | None)
class soma.aims.rc_ptr_SparseOrDenseMatrix
class soma.aims.rc_ptr_SparseOrDenseMatrix(a0: aims.SparseOrDenseMatrix | None)
class soma.aims.rc_ptr_SparseOrDenseMatrix(a0: rc_ptr_SparseOrDenseMatrix)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: aims.SparseOrDenseMatrix | None)
class soma.aims.rc_ptr_TimeTexture_DOUBLE
class soma.aims.rc_ptr_TimeTexture_DOUBLE(a0: TimeTexture_DOUBLE | None)
class soma.aims.rc_ptr_TimeTexture_DOUBLE(a0: rc_ptr_TimeTexture_DOUBLE)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: TimeTexture_DOUBLE | None)
class soma.aims.rc_ptr_TimeTexture_FLOAT
class soma.aims.rc_ptr_TimeTexture_FLOAT(a0: TimeTexture_FLOAT | None)
class soma.aims.rc_ptr_TimeTexture_FLOAT(a0: rc_ptr_TimeTexture_FLOAT)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: TimeTexture_FLOAT | None)
class soma.aims.rc_ptr_TimeTexture_POINT2DF
class soma.aims.rc_ptr_TimeTexture_POINT2DF(a0: TimeTexture_POINT2DF | None)
class soma.aims.rc_ptr_TimeTexture_POINT2DF(a0: rc_ptr_TimeTexture_POINT2DF)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: TimeTexture_POINT2DF | None)
class soma.aims.rc_ptr_TimeTexture_S16
class soma.aims.rc_ptr_TimeTexture_S16(a0: TimeTexture_S16 | None)
class soma.aims.rc_ptr_TimeTexture_S16(a0: rc_ptr_TimeTexture_S16)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: TimeTexture_S16 | None)
class soma.aims.rc_ptr_TimeTexture_S32
class soma.aims.rc_ptr_TimeTexture_S32(a0: TimeTexture_S32 | None)
class soma.aims.rc_ptr_TimeTexture_S32(a0: rc_ptr_TimeTexture_S32)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: TimeTexture_S32 | None)
class soma.aims.rc_ptr_TimeTexture_U16
class soma.aims.rc_ptr_TimeTexture_U16(a0: TimeTexture_U16 | None)
class soma.aims.rc_ptr_TimeTexture_U16(a0: rc_ptr_TimeTexture_U16)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: TimeTexture_U16 | None)
class soma.aims.rc_ptr_TimeTexture_U32
class soma.aims.rc_ptr_TimeTexture_U32(a0: TimeTexture_U32 | None)
class soma.aims.rc_ptr_TimeTexture_U32(a0: rc_ptr_TimeTexture_U32)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: TimeTexture_U32 | None)
class soma.aims.rc_ptr_TimeTexture_U8
class soma.aims.rc_ptr_TimeTexture_U8(a0: TimeTexture_U8 | None)
class soma.aims.rc_ptr_TimeTexture_U8(a0: rc_ptr_TimeTexture_U8)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: TimeTexture_U8 | None)
class soma.aims.rc_ptr_Transformation
class soma.aims.rc_ptr_Transformation(a0: soma.Transformation | None)
class soma.aims.rc_ptr_Transformation(a0: rc_ptr_Transformation)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: soma.Transformation | None)
class soma.aims.rc_ptr_Transformation3d
class soma.aims.rc_ptr_Transformation3d(a0: soma.Transformation3d | None)
class soma.aims.rc_ptr_Transformation3d(a0: rc_ptr_Transformation3d)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: soma.Transformation3d | None)
class soma.aims.rc_ptr_Tree
class soma.aims.rc_ptr_Tree(a0: Tree | None)
class soma.aims.rc_ptr_Tree(a0: rc_ptr_Tree)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Tree | None)
class soma.aims.rc_ptr_Vertex
class soma.aims.rc_ptr_Vertex(a0: Vertex | None)
class soma.aims.rc_ptr_Vertex(a0: rc_ptr_Vertex)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Vertex | None)
class soma.aims.rc_ptr_Volume_BOOL
class soma.aims.rc_ptr_Volume_BOOL(a0: Volume_BOOL | None)
class soma.aims.rc_ptr_Volume_BOOL(a0: rc_ptr_Volume_BOOL)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_BOOL | None)
class soma.aims.rc_ptr_Volume_CDOUBLE
class soma.aims.rc_ptr_Volume_CDOUBLE(a0: Volume_CDOUBLE | None)
class soma.aims.rc_ptr_Volume_CDOUBLE(a0: rc_ptr_Volume_CDOUBLE)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_CDOUBLE | None)
class soma.aims.rc_ptr_Volume_CFLOAT
class soma.aims.rc_ptr_Volume_CFLOAT(a0: Volume_CFLOAT | None)
class soma.aims.rc_ptr_Volume_CFLOAT(a0: rc_ptr_Volume_CFLOAT)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_CFLOAT | None)
class soma.aims.rc_ptr_Volume_DOUBLE
class soma.aims.rc_ptr_Volume_DOUBLE(a0: Volume_DOUBLE | None)
class soma.aims.rc_ptr_Volume_DOUBLE(a0: rc_ptr_Volume_DOUBLE)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_DOUBLE | None)
class soma.aims.rc_ptr_Volume_FLOAT
class soma.aims.rc_ptr_Volume_FLOAT(a0: Volume_FLOAT | None)
class soma.aims.rc_ptr_Volume_FLOAT(a0: rc_ptr_Volume_FLOAT)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_FLOAT | None)
class soma.aims.rc_ptr_Volume_HSV
class soma.aims.rc_ptr_Volume_HSV(a0: Volume_HSV | None)
class soma.aims.rc_ptr_Volume_HSV(a0: rc_ptr_Volume_HSV)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_HSV | None)
class soma.aims.rc_ptr_Volume_POINT3DF
class soma.aims.rc_ptr_Volume_POINT3DF(a0: Volume_POINT3DF | None)
class soma.aims.rc_ptr_Volume_POINT3DF(a0: rc_ptr_Volume_POINT3DF)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_POINT3DF | None)
class soma.aims.rc_ptr_Volume_RGB
class soma.aims.rc_ptr_Volume_RGB(a0: Volume_RGB | None)
class soma.aims.rc_ptr_Volume_RGB(a0: rc_ptr_Volume_RGB)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_RGB | None)
class soma.aims.rc_ptr_Volume_RGBA
class soma.aims.rc_ptr_Volume_RGBA(a0: Volume_RGBA | None)
class soma.aims.rc_ptr_Volume_RGBA(a0: rc_ptr_Volume_RGBA)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_RGBA | None)
class soma.aims.rc_ptr_Volume_S16
class soma.aims.rc_ptr_Volume_S16(a0: Volume_S16 | None)
class soma.aims.rc_ptr_Volume_S16(a0: rc_ptr_Volume_S16)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_S16 | None)
class soma.aims.rc_ptr_Volume_S32
class soma.aims.rc_ptr_Volume_S32(a0: Volume_S32 | None)
class soma.aims.rc_ptr_Volume_S32(a0: rc_ptr_Volume_S32)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_S32 | None)
class soma.aims.rc_ptr_Volume_U16
class soma.aims.rc_ptr_Volume_U16(a0: Volume_U16 | None)
class soma.aims.rc_ptr_Volume_U16(a0: rc_ptr_Volume_U16)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_U16 | None)
class soma.aims.rc_ptr_Volume_U32
class soma.aims.rc_ptr_Volume_U32(a0: Volume_U32 | None)
class soma.aims.rc_ptr_Volume_U32(a0: rc_ptr_Volume_U32)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_U32 | None)
class soma.aims.rc_ptr_Volume_U8
class soma.aims.rc_ptr_Volume_U8(a0: Volume_U8 | None)
class soma.aims.rc_ptr_Volume_U8(a0: rc_ptr_Volume_U8)

Bases: wrapper

get(*args, **kwargs)

get() is ambiguous: rc_ptr / Object has the get() method, providing access to the underlying object. GenericObject has the method get(key, default=None) as a dictionary-like object. This proxy calls the right one depending on arguments.

isNull(self) bool
release(self)
reset(self, a0: Volume_U8 | None)
soma.aims.read(filename, border=0, frame=-1, dtype=None, allocmode=None, options=None, object=None)[source]

Equivalent to:

r = Reader(allocmode=allocmode, options=options)
return r.read(filename, border=border, frame=frame, dtype=dtype,
              object=object)

Ex:

  • read a volume:

    vol = aims.read('file.nii')
    
  • read a mesh:

    mesh = aims.read('file.gii')
    
  • read part of a volume, with borders (warning, all formats do not allow it):

    vol = aims.read(
        'file.nii', options={'border': 2, 'ox': 100, 'sx': 100,
                             'oy': 50, 'sy': 150, 'oz': 20, 'sz': 60})
    

    or (equivalent):

    vol = aims.read(
      'file.nii?border=2&ox=100&sx=100&oy=50&sy=150&oz=20&sz=60')
    
  • read a view inside a larger volume (warning, all formats do not allow it, and they may produce inpredictible results, and probably crashes):

    border = aims.Volume_S16(500, 500, 200)
    view = aims.VolumeView(border, [50, 50, 50], [256, 256, 124])
    aims.read('file.nii', object=view, options={'keep_allocation': True})
    
soma.aims.readSpmNormalization(matfilename, source=None, destref=None, srcref=None)[source]

Read a SPM *_sn.mat normalization file and converts it to an Aims AffineTransformation3d. The converted transformation has for source the AIMS referential of the source image, and for destination the template referential of the SPM .mat file. All coordinates are in millimeters.

The source image information may be provided either as its filename, its header object, or the image itself. It should carry the needed information: source volume storage_to_memory transformation matrix, voxel_size, etc. If None is passed as source (the default), then the source image name will be built from the .mat filename and will be read if found.

  • matfilename: string

    file name of the *_sn.mat normalization file to reading

  • source: filename (string), or Volume Volume, or volume header (MappingType)

    file name of the *_sn.mat normalization file to reading

  • destref: string or UUID (Uuid)

    destination referential for the transformation. If not specified, none will be set. If provided as a symbolic name (‘Talairach-MNI template-SPM’), it will be converted to an UUID string.

  • srcref: string or UUID

    source referential for the transformation. If not specified, an attempt will be made to take it from the source image, otherwise it will not be set. If provided as a symbolic name (‘Talairach-MNI template-SPM’), it will be converted to an UUID string.

  • returns: AffineTransformation3d object

    the converted transformation

class soma.aims.set_DOUBLE
class soma.aims.set_DOUBLE(a0: Any)
class soma.aims.set_DOUBLE(a0: set_DOUBLE)

Bases: wrapper

add(self, a0: float)
insert(self, a0: float)
list(self) List
remove(self, a0: float)
size(self) int
class soma.aims.set_DOUBLE_iterator(a0: set_DOUBLE | None)
class soma.aims.set_DOUBLE_iterator(a0: set_DOUBLE_iterator)

Bases: wrapper

class soma.aims.set_EdgePtr
class soma.aims.set_EdgePtr(a0: Any)
class soma.aims.set_EdgePtr(a0: set_EdgePtr)

Bases: wrapper

add(self, a0: Edge | None)
insert(self, a0: Edge | None)
list(self) List
remove(self, a0: Edge | None)
size(self) int
class soma.aims.set_EdgePtr_iterator(a0: set_EdgePtr | None)
class soma.aims.set_EdgePtr_iterator(a0: set_EdgePtr_iterator)

Bases: wrapper

class soma.aims.set_FLOAT
class soma.aims.set_FLOAT(a0: Any)
class soma.aims.set_FLOAT(a0: set_FLOAT)

Bases: wrapper

add(self, a0: float)
insert(self, a0: float)
list(self) List
remove(self, a0: float)
size(self) int
class soma.aims.set_FLOAT_iterator(a0: set_FLOAT | None)
class soma.aims.set_FLOAT_iterator(a0: set_FLOAT_iterator)

Bases: wrapper

class soma.aims.set_S16
class soma.aims.set_S16(a0: Any)
class soma.aims.set_S16(a0: set_S16)

Bases: wrapper

add(self, a0: int)
insert(self, a0: int)
list(self) List
remove(self, a0: int)
size(self) int
class soma.aims.set_S16_iterator(a0: set_S16 | None)
class soma.aims.set_S16_iterator(a0: set_S16_iterator)

Bases: wrapper

class soma.aims.set_S32
class soma.aims.set_S32(a0: Any)
class soma.aims.set_S32(a0: set_S32)

Bases: wrapper

add(self, a0: int)
insert(self, a0: int)
list(self) List
remove(self, a0: int)
size(self) int
class soma.aims.set_S32_iterator(a0: set_S32 | None)
class soma.aims.set_S32_iterator(a0: set_S32_iterator)

Bases: wrapper

class soma.aims.set_STRING
class soma.aims.set_STRING(a0: Any)
class soma.aims.set_STRING(a0: set_STRING)

Bases: wrapper

add(self, a0: object | None)
insert(self, a0: object | None)
list(self) List
remove(self, a0: object | None)
size(self) int
class soma.aims.set_STRING_iterator(a0: set_STRING | None)
class soma.aims.set_STRING_iterator(a0: set_STRING_iterator)

Bases: wrapper

class soma.aims.set_U32
class soma.aims.set_U32(a0: Any)
class soma.aims.set_U32(a0: set_U32)

Bases: wrapper

add(self, a0: int)
insert(self, a0: int)
list(self) List
remove(self, a0: int)
size(self) int
class soma.aims.set_U32_iterator(a0: set_U32 | None)
class soma.aims.set_U32_iterator(a0: set_U32_iterator)

Bases: wrapper

class soma.aims.set_VertexPtr
class soma.aims.set_VertexPtr(a0: Any)
class soma.aims.set_VertexPtr(a0: set_VertexPtr)

Bases: wrapper

add(self, a0: Vertex | None)
insert(self, a0: Vertex | None)
list(self) List
remove(self, a0: Vertex | None)
size(self) int
class soma.aims.set_VertexPtr_iterator(a0: set_VertexPtr | None)
class soma.aims.set_VertexPtr_iterator(a0: set_VertexPtr_iterator)

Bases: wrapper

soma.aims.sip_module() object
soma.aims.sip_module_version() int
class soma.aims.soma

Bases: simplewrapper

class AffineTransformation3dBase
class AffineTransformation3dBase(other: soma.AffineTransformation3dBase)
class AffineTransformation3dBase(mat: vector_FLOAT)
class AffineTransformation3dBase(mat: carto.Object)

Bases: Transformation3d, AffineTransformationBase

extendOrder(self, n: int)
getInverse(self) rc_ptr_Transformation
invertible(self) bool
isDirect(self) bool
isIdentity(self) bool
scale(self, sizeFrom: AimsVector_FLOAT_3, sizeTo: AimsVector_FLOAT_3)
setToIdentity(self)
setTranslation(self, trans: AimsVector_FLOAT_3)
transform(self, p: AimsVector_S16_3) AimsVector_S16_3
transform(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transform(self, pos: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transform(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transform(self, pos: vector_S32) vector_S32
transform(self, pos: vector_FLOAT) vector_FLOAT
transform(self, pos: vector_DOUBLE) vector_DOUBLE
transformDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformNormal(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transformNormal(self, dir: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformNormal(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformUnitNormal(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transformUnitNormal(self, dir: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformUnitNormal(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformVector(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transformVector(self, vec: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transformVector(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformVector(self, pos: vector_S32) vector_S32
transformVector(self, pos: vector_FLOAT) vector_FLOAT
transformVector(self, pos: vector_DOUBLE) vector_DOUBLE
class AffineTransformationBase(order: int = 3)
class AffineTransformationBase(other: soma.AffineTransformationBase)
class AffineTransformationBase(mat: vector_FLOAT)
class AffineTransformationBase(mat: carto.Object)

Bases: Transformation

extendOrder(self, n: int)
fromColumnVector(self, vec: vector_FLOAT)
fromMatrix(value)
getInverse(self) rc_ptr_Transformation
invertible(self) bool
isDirect(self) bool
isIdentity(self) bool
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
order(self) int
setToIdentity(self)
squeezeOrder(self, n: int, check: bool = True, notify_fail: bool = True)
toColumnVector(self) vector_FLOAT
toMatrix()

This function return a copy of the transformation matrix

toVector(self) vector_FLOAT
transform(self, pos: vector_S32) vector_S32
transform(self, pos: vector_FLOAT) vector_FLOAT
transform(self, pos: vector_DOUBLE) vector_DOUBLE
class DataSource(*args)

Bases: RCObject

Abstraction layer for various data sources (file, buffer, socket…).

It can be seen as a stream, and is inspired by the QIODevice of Qt library.

Abstract class.

DirectAccess = 1
class IterateMode

Bases: int

class Mode

Bases: int

Read = 1
ReadWrite = 3
SequentialAccess = 2
Write = 2
allowsMemoryMapping(self) bool

returns True if memory mapping is allowed on this kind of stream

at(self) int

offset = at()

returns the current position in the stream

at(self, pos: int) -> bool bool at(pos)

Sets the current position in the stream (when supported). Returns True if successful.

atEnd(self) bool

True if the current position is at the end of the stream

clone(self) soma.DataSource | None

duplicate the DataSource object

close(self)

Close the stream

eof(self) bool

when the end of stream is reached

flush(self)

flush the stream for buffered output

getch(self) int

read one char and returns it

isOpen(self) bool

tells if the stream is open / ok.

iterateMode(self) int

bitwise combination of possible access: direct (1) or sequential (2) access

mode(self) int

access mode(s) (read/write): bitwise OR of Mode values

none() rc_ptr_DataSource

An empty ref-counter that is more convenient than calling a constructor of rc_ptr_DataSource (useful when calling functions)

open(self, mode: int) bool
open(mode) None

Opens the stream (when supported) in the specified Mode

Parameters:

mode (int) – access Mode: Read (1), Write (2) or ReadWrite (3)

Returns:

ok – if the operation was successful

Return type:

bool

putch(self, ch: int) int
putch(ch) None

write one char, and returns it

Parameters:

ch (int) – char to write

readBlock(self, data: bytes | None, maxlen: int) int
readBlock(data, maxlen) None
Parameters:
  • data (char*) – read buffer (C++)

  • maxlen (unsigned long int) – number of bytes to read

Returns:

num – number of bytes actually read

Return type:

long int

reset(self) bool

reset the stream and get to the start

size(self) int

size (or len) of the data inn stream, in bytes

ungetch(self, ch: int) bool
ungetch(ch) None

un-read one char: put it back in the read buffer, and rewind one char

url(self) object

URL of filename for the stream, when available

writeBlock(self, data: bytes | None, len: int) int
writeBlock(data, len) None
Parameters:
  • data (const char * (C++)) – buffer to be written

  • len (unsigned long int) – size of the buffer to be written

Returns:

num – number of bytes actually written

Return type:

long int

class DataSourceCapabilities

Bases: wrapper

Reading/Writing Capabilities of a FormatReader

This object is constructed by the FormatChecker after reading the header. It allows one to give information about the possible ways to read a volume ( partial reading … ).

see DataSourceInfo

allowsMemoryMapping(self) bool
canHandleStrides(self) bool
canSeekLine(self) bool
canSeekSlice(self) bool
canSeekVolume(self) bool
canSeekVoxel(self) bool
isInit(self) bool

Did we initialize the capabilities ? default : False Since a DataSourceInfo can be either fully initialized because of a previous call to DataSourceInfoLoader or be only partially initialized because we just know the header, it is important to know if the value of this object matters or not. each time one of the mutators is called, setInit( true ) is also called.

isOrdered(self) bool
isRandomAccessEfficient(self) bool
isThreadSafe(self) bool
mappableDataSource(self) rc_ptr_DataSource
reset(self)

Sets the whole capabilities to its default value (including isInit() to false )

setDataSource(self, ds: rc_ptr_DataSource)
setHandleStrides(self, boo: bool = True)
setInit(self, boo: bool = True)
setMemoryMapping(self, boo: bool = True)
setOrdered(self, boo: bool = True)
setRandomAccessEfficient(self, boo: bool = True)
setSeekLine(self, boo: bool = True)
setSeekSlice(self, boo: bool = True)
setSeekVolume(self, boo: bool = True)
setSeekVoxel(self, boo: bool = True)
setThreadSafe(self, boo: bool = True)
class DataSourceInfo(ds: rc_ptr_DataSource, dim: vector_S32 = vector_S32())

Bases: wrapper

DataSourceInfo(ds, dim=[]):

Build a DataSourceInfo from a DataSource, and dimensions

DSList is set as containing only ds pointed by “default” key. Capabilities are set uninitialized. If dim is given, a header is built with keys size[X,Y,Z,T]. Else the header is none().

soma.DataSourceInfo(ds: rc_ptr_DataSource, header: carto.Object) DataSourceInfo(ds, header):

Build a DataSourceInfo from a DataSource and an existing header

soma.DataSourceInfo(fname: object) DataSourceInfo(fname):

Builds a DataSourceInfo from a filename

Parameters:
  • ds (rc_ptr_DataSource)

  • dim (vector_S32) – dimensions (for a volume), up to 4 dimensions

  • header (Object)

  • fname (string)

  • soma.DataSourceInfo(a0 (soma.DataSourceInfo))

  • system (Informative object used by IO)

  • FormatChecker (This object is used by)

  • to (FormatReader or FormatWriter)

  • contains (describe a DataSource. It contains a DataSourceList which)

  • DataSource (at first a single default)

  • a (a Object header and)

  • DataSourceCapabilities.

  • files (* The list is built by a FormatChecker and contains all the) – involved in the reading/writing process (header, data, …)

  • information. (* The header is built by a FormatChecker and contains meta)

  • format (* The DSC contains properties dependant of the) – the specific file, the reading process (partial reading), etc.

:param : the specific file, the reading process (partial reading), etc. :param It is possible to fix some or all of these three objects so that: :param they are not recomputed by the FormatChecker.: :param see DataSourceInfoLoader DataSourceList DataSourceCapabilities:

capabilities(self) soma.DataSourceCapabilities
header(self) carto.Object

get the header dict of the underlying data

identifiedFormat(self) object

file format name

list(self) soma.DataSourceList

get the DataSourceList of the underlying data

setIdentifiedFormat(self, format: object)
setIdentifiedFormat(format) None

force the identified format name

url(self) object

main filename or URL

class DataSourceInfoLoader

Bases: wrapper

Generic information retreiver / checker for all data sources and file formats

It replaces aims.Finder.

DataSourceInfoLoader provides a plug-in system for new formats and data types. Formats are hidden in the plugins and should never be accessed directly.

Usage: check() the DataSourceInfo and then process according to the object type (“Volume of S16”, “Mesh”, “Texture”, “Bucket”, …).

Use the generic Reader once the data type is known, the right format will be selected automatically.

Avoiding manually switching on objects and data types is possible using the ReaderAlgorithm interface and presumably, template functions.

Here is an example of how to use the DataSourceInfoLoader class:

from soma import aims
from soma.aims import soma

f = soma.DataSourceInfoLoader()
info = f.check("toto.nii")
if not info.header():
    print "could not load", info.url()
else:
  object_type = info.header()["object_type"]
  if object_type == aims.typeCode(aims.Volume_S16):
      vr = soma.Reader_Volume_S16(info)
      try:
          vol = vr.read()
          print "volume read"
      except:
          print "Error loading", info.url()
  elif object_type == aims.typeCode(aims.Object):
      # do your thing
      print "Object"
  else:
      print info.url(), "is of type", object_type, \
          "which is not handled"

see DataSourceInfo, Reader, ReaderAlgorithm

Error = 2
Ok = 1
class State

Bases: int

Unchecked = 0
check(self, dsi: soma.DataSourceInfo, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 3) soma.DataSourceInfo
check(dsi, options=aims.carto.none(), passbegin=1, passend=3) None

Finds the right format checker

It is possible to specify wich passes to process through passbegin and passend. * pass 1: extension * pass 2: empty extension * pass 3: all writers see DataSourceInfo DataSourceList DataSourceCapabilities

Parameters:
  • dsi (DataSourceInfo containing header, DSlist and .) – capabilities. It allows us to have none, some or all information already computed. It is for the DSIloader to deal with the all case, and for the FormatCheckers to deal with some and none cases.

  • options (A dictionary containing options. They may not be of) – any use to the checker, but soma are (resolution_level).

Returns:

  • A DataSourceInfo object containing a header, a list of

  • DataSource and a list of Capabilities.

  • check(self, filename (object, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 3) -> soma.DataSourceInfo)

errorMessage(self) object

error message from the last check

extensions(format: object) set_STRING
extensions(format) None

Query supported file extensions for a format

Parameters:

format (string) – format to query

Returns:

exts – set of extensions names

Return type:

set_STRING

launchException(self)

raise the read exception which was most probably the cause of a check() failure

readMinf(ds: soma.DataSource, base: carto.Object = carto.none(), options: carto.Object = carto.none()) carto.Object
readMinf(ds, base=aims.none(), options=aims.none()) None

read a .minf file dictionary

Parameters:
  • ds (DataSource) – minf file DataSource

  • base (Object) – base dict to be completed by .minf information

  • options (Object) – options dict

Returns:

minf – the minf file contents as a dictionary

Return type:

Object

state(self) soma.DataSourceInfoLoader.State

state of the DataSourceInfoLoader reading trial

class DataSourceList

Bases: wrapper

DataSourceList():

Builds a map containing only (“default”, empty pointer)

soma.DataSourceList(ds: rc_ptr_DataSource, type: object = “default”) DataSourceList(ds, type=”default”):

Builds a 1-element map This allows to construct easily a 1 element list, useful when declaring a Reader which creator takes a source as parameter.

Parameters:
  • ds (rc_ptr_DataSource) – Element to insert

  • type (string) – Category of the source. default key is “default”: used at Reader construction

  • soma.DataSourceList(a0 (soma.DataSourceList))

  • DataSource. (This class allows to manipulate "lists" of pointers to)

  • by (It has the design of a dictionary in order to sort sources)

  • (header (content)

  • minf

  • data

  • on (...). Since those contents depend)

  • format (the)

  • checkers (the keywords used are defined by specific)

  • readers. (and)

  • FormatReader (see FormatChecker)

  • the (The only global keyword is "default" which is used to store)

  • reader. (DataSource defining (at construction) a)

  • Reader (see)

  • note:: (..) – The “default” keyword always contains at least one entry, which may be empty. I haven’t for now found any use to several “default” entries.

  • methods. (Access to a source is done using dataSource(...))

  • numbering (Sources are ordered by increasing order of insertion and)

  • 0. (starts at)

addDataSource(self, a0: object, a1: rc_ptr_DataSource)
addDataSource(key, ds) None

Adds an element to the dictionary If new keyword, creates it.

Parameters:
dataSource(self, key: object = 'default', i: int = 0) rc_ptr_DataSource

datasource(key=”default”, i=0)

Accessing an element of the list If keyword doesn’t exist, or is empty, or coordinate is undefined, launches exception.

Parameters:
  • key (string (optional)) – keyword

  • i (int (optional)) – number of the element in list. Numbering starts at 0

empty(self) bool

Returns true only if no keyword inserted.

Warning

May return false while no DataSource present

empty(self, a0: object) -> bool True if there is no key in the dictionary

exists(self, a0: object) bool
exists(key) None

True if the key exists in the dictionary

reset(self)

clear the dictionary: all keys and contents are removed.

size(self, a0: object) int
size(key) None

number of elements with the key key

typecount(self) int

number of keys in the types dictionary

types(self) set_STRING

Returns existing keywords.

Warning

There may be existing keywords with no DataSource

class FDDataSource(*args)

Bases: DataSource

DataSource specialization for file descriptor stream

allowsMemoryMapping(self) bool
at(self) int
at(self, pos: int) bool
clone(self) soma.DataSource | None
close(self)
descriptor(self) int

get the file descriptor

getch(self) int
isFile(self) bool

True if the DataSource is a file

isOpen(self) bool
iterateMode(self) int
open(self, mode: int) bool
putch(self, ch: int) int
readBlock(self, data: bytes | None, maxlen: int) int
setDescriptor(self, fd: int)
setDescriptor(fd) None

Set the file descriptor fd (int)

size(self) int
ungetch(self, ch: int) bool
writeBlock(self, data: bytes | None, len: int) int
class FileDataSource(filename: object, offset: int = 0, mode: int = soma.DataSource.Read)
class FileDataSource(filename, offset=0, mode=aims.soma.DataSource.Read)

Bases: DataSource

Parameters:
  • filename (string) – file name on the filesystem

  • offset (soma.offset_t (optional)) – offset to start reading in the file

  • mode (aims.soma.DataSource.Mode (optional)) – read / write mode

  • soma.FileDataSource(a0 (soma.FileDataSource))

  • file. (DataSource specialization for a)

allowsMemoryMapping(self) bool
at(self) int
at(self, pos: int) bool
clone(self) soma.DataSource | None
close(self)
getch(self) int
initialOffset(self) int

initial offset in the input file to start reading

isOpen(self) bool
iterateMode(self) int
open(self, mode: int) bool
putch(self, ch: int) int
readBlock(self, data: bytes | None, maxlen: int) int
size(self) int
ungetch(self, ch: int) bool
url(self) object

file name or URL of the file

writeBlock(self, data: bytes | None, len: int) int
class Reader_Object

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: carto.Object, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: carto::Object, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[carto.Object])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_CDOUBLE

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_CDOUBLE, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_CDOUBLE, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_CDOUBLE])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_CFLOAT

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_CFLOAT, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_CFLOAT, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_CFLOAT])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_DOUBLE

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_DOUBLE, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_DOUBLE, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_DOUBLE])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_FLOAT

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_FLOAT, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_FLOAT, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_FLOAT])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_HSV

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_HSV, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_HSV, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_HSV])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_POINT3DF

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_POINT3DF, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_POINT3DF, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_POINT3DF])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_RGB

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_RGB, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_RGB, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_RGB])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_RGBA

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_RGBA, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_RGBA, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_RGBA])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_S16

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_S16, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_S16, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_S16])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_S32

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_S32, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_S32, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_S32])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_U16

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_U16, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_U16, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_U16])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_U32

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_U32, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_U32, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_U32])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Reader_Volume_U8

Bases: wrapper

Soma-IO Reader class. This is a C++ template class, which can read a specific type of data. All supported formats can be read.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

  • rc_ptr_DataSourceInfo: DataSource with info (more optimal when the data source has been identified and the header loaded)

allocatorContext(self) carto.AllocatorContext

Get the allocation context

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a DataSource to read from (rc_ptr_DataSource)

attach(self, filename: object, offset: int = 0) attach(filename, offset=0)

Attach a new filename + offset for reading

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

dataSourceInfo(self) rc_ptr_DataSourceInfo

Get the dataSourceInfo, providing information on the read data

flush(self)

Flush the read buffer

options(self) carto.Object

Get reading options (Object dictionary)

read(self, obj: Volume_U8, header: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Read an object from source. Two main modes exist:

  • full: read a full new object and return it

  • in-place: read an existing object, in-place

A multi-pass procedure is used to identify and read the data from the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all readers

Parameters:
  • header (Object (optional)) – in-place mode: Volume_U8, object to be read. OR: full mode: header (Object), optional

  • header

  • passbegin (int (optional)) – begin at given step of the multi-pass identification/read procedure

  • passend (int (optional)) – end at given step of the multi-pass identification/read procedure

Returns:

  • in-place mode – True upon success False upon failure (but readers will more likely throw an exception)

  • full mode – the read object

  • read(self, header (carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) -> Optional[Volume_U8])

setAllocatorContext(self, ac: carto.AllocatorContext)
setAllocatorContext(context) None

Set allocation context for reading

setOptions(self, options: carto.Object)
setOptions(options) None

set reading options (Object dictionary)

class Transformation(*args)

Bases: RCObject

Base class for spatial transformations.

getInverse(self) rc_ptr_Transformation
header()
inverse()
invertible(self) bool
isDirect(self) bool
isIdentity(self) bool

Test if the transformation can safely be omitted

This method must only return true if the transformation behaves exactly like an identity transformation (notably, the transform methods will always return the input coordinates unchanged).

NOTE: Implementors of derived classes may choose to always return false if a test would be difficult to implement or expensive to run.

setHeader(self, ph: carto.Object)
transform(self, pos: vector_S32) vector_S32
transform(self, pos: vector_FLOAT) vector_FLOAT
transform(self, pos: vector_DOUBLE) vector_DOUBLE
transformVector(self, pos: vector_S32) vector_S32
transformVector(self, pos: vector_FLOAT) vector_FLOAT
transformVector(self, pos: vector_DOUBLE) vector_DOUBLE
vadd(v1: vector_S32, v2: vector_S32) vector_S32

vadd(v1: vector_FLOAT, v2: vector_FLOAT) -> vector_FLOAT

vadd(v1: vector_DOUBLE, v2: vector_DOUBLE) -> vector_DOUBLE vector arithmetics, as convenience static functions

vadd(v1: vector_S32, v2: int) -> vector_S32

vadd(v1: vector_FLOAT, v2: float) -> vector_FLOAT

vadd(v1: vector_DOUBLE, v2: float) -> vector_DOUBLE vector arithmetics, as convenience static functions

vadd(v1: int, v2: vector_S32) -> vector_S32

vadd(v1: float, v2: vector_FLOAT) -> vector_FLOAT

vadd(v1: float, v2: vector_DOUBLE) -> vector_DOUBLE vector arithmetics, as convenience static functions

vsub(v1: vector_S32, v2: vector_S32) vector_S32

vsub(v1: vector_FLOAT, v2: vector_FLOAT) -> vector_FLOAT

vsub(v1: vector_DOUBLE, v2: vector_DOUBLE) -> vector_DOUBLE vector arithmetics, as convenience static functions

vsub(v1: vector_S32, v2: int) -> vector_S32

vsub(v1: vector_FLOAT, v2: float) -> vector_FLOAT

vsub(v1: vector_DOUBLE, v2: float) -> vector_DOUBLE vector arithmetics, as convenience static functions

vsub(v1: int, v2: vector_S32) -> vector_S32

vsub(v1: float, v2: vector_FLOAT) -> vector_FLOAT

vsub(v1: float, v2: vector_DOUBLE) -> vector_DOUBLE vector arithmetics, as convenience static functions

class Transformation3d(*args)

Bases: Transformation

Base class for spatial transformations in 3D.

fromObject(a0: carto.GenericObject) rc_ptr_Transformation3d
toObject(self) carto.Object
transform(self, p: AimsVector_S16_3) AimsVector_S16_3
transform(self, dir: AimsVector_FLOAT_3) AimsVector_FLOAT_3
transform(self, pos: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
transform(self, pos: vector_S32) vector_S32
transform(self, pos: vector_FLOAT) vector_FLOAT
transform(self, pos: vector_DOUBLE) vector_DOUBLE
transform(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformDouble(self, x: float, y: float, z: float) AimsVector_DOUBLE_3
transformPoints(self, a0: Any) Any
transformVector(self, pos: vector_S32) vector_S32
transformVector(self, pos: vector_FLOAT) vector_FLOAT
transformVector(self, pos: vector_DOUBLE) vector_DOUBLE
class Writer_Object

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: carto.Object, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (carto::Object) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_CDOUBLE

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_CDOUBLE, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_CDOUBLE) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_CFLOAT

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_CFLOAT, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_CFLOAT) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_DOUBLE

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_DOUBLE, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_DOUBLE) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_FLOAT

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_FLOAT, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_FLOAT) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_HSV

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_HSV, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_HSV) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_POINT3DF

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_POINT3DF, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_POINT3DF) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_RGB

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_RGB, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_RGB) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_RGBA

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_RGBA, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_RGBA) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_S16

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_S16, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_S16) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_S32

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_S32, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_S32) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_U16

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_U16, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_U16) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_U32

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_U32, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_U32) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

class Writer_Volume_U8

Bases: wrapper

Soma-IO Writer class. This is a C++ template class, which can write a specific type of data. All supported formats can be written.

Constructor parameters may be:

  • string: filename

  • rc_ptr_DataSource: generic DataSource

attach(self, ds: rc_ptr_DataSource)
attach(ds) None

Attach a new data source (rc_ptr_DataSource) to write into

attach(self, filename: object) attach(filename)

Attach a new output file name to write into

close(self)

Close the data source stream

dataSource(self) rc_ptr_DataSource

Get the data source (rc_ptr_DataSource)

flush(self)

flush the write buffer

write(self, obj: Volume_U8, options: carto.Object = carto.none(), passbegin: int = 1, passend: int = 4) bool

Write the given object to the data source (generally files)

A multi-pass procedure is used to identify and write the data to the data source:

  • pass 1: format hint

  • pass 2: extension

  • pass 3: empty extension

  • pass 4: all writes

Parameters:
  • obj (Volume_U8) – object to write

  • options (Object (optional)) – Options can be passed to specify some writing parameters. The most important is the format (“format” property): if it is specified, this format is tried first, so you can use it to force the format, otherwise it will be determined from the filename extension (if available). If no extension and no format are given, the first working format will be used.

  • passbegin (int (optional))

  • passend (int (optional))

Return type:

True upon success, False upon failure, but an exception is more likely thrown in such case

writtenObjectType(self) object

After writing, get the object type code (string) of the data

soma.aims.somaio_typeCode(data)[source]

returns the Soma-IO type code (as in soma.carto.IOObjectTypesDictionary.readTypes() dict keys) for the given input type.

Parameters:

data (string or type or instance, or 2-tuple) – If type or instance, get the type code for the given object. If string, try to translate AIMS IO to soma-IO codes. If 2-tuple, translate AIMS object type / data type couple

soma.aims.stdList(*args, **kwargs)[source]

Create an instance of STL C++ list (list_<type>) from a type parameter, which may be specified as the dtype keyword argument, or as one of the arguments if one is identitied as a type.

Type definitions should match those accepted by typeCode().

soma.aims.stdSet(*args, **kwargs)[source]

Create an instance of STL C++ set (set_<type>) from a type parameter, which may be specified as the dtype keyword argument, or as one of the arguments if one is identitied as a type.

Type definitions should match those accepted by typeCode().

soma.aims.stdVector(*args, **kwargs)[source]

Create an instance of STL C++ vector (vector_<type>) from a type parameter, which may be specified as the dtype keyword argument, or as one of the arguments if one is identitied as a type.

Type definitions should match those accepted by typeCode().

soma.aims.supported_io_formats(otypes=None, access='')[source]

Returns a list of formats supported to read or write the given object types. Both AIMS and Soma-IO support are queried.

Parameters:
  • otypes (dict, list, str, or None) – object types. May be given in several shapes: 1. None: will query all possible object types. 2. str: will get all data types (voxel, texture) for the given container object type (Volume, Mesh etc.). 3. list of str: a list of container object types, as in the str case. 4. dict: allows to specify precisely object type / data types mapping: for each object type, a list of data types will be used. When a data type is None, then all possible ones will be used.

  • access (str) – read / write capabilities: restricts soma-io IO queries to the specified access modes. aims IO will not be affected by this parameter since it does not separate reading and writing capabilities. Possible values are: ‘’: any, ‘r’: read, ‘w’: write, ‘rw’: both needed.

Returns:

formats – set of formats names

Return type:

set of str

soma.aims.textureMax(intex: TimeTexture_S16) int
class soma.aims.threshold_t

Bases: int

soma.aims.transformBoundingBox(motion: aims.AffineTransformation3d, pmin1: AimsVector_FLOAT_3, pmax1: AimsVector_FLOAT_3, pmin2: AimsVector_FLOAT_3, pmax2: AimsVector_FLOAT_3)
soma.aims.typeCode(data)[source]

returns the AIMS type code for the given input data. data may be a string code, a python/numpy numeric type, an AIMS type, or an instance of such a type.

soma.aims.vectProduct(v1: AimsVector_FLOAT_3, v2: AimsVector_FLOAT_3) AimsVector_FLOAT_3
soma.aims.vectProduct(v1: AimsVector_DOUBLE_3, v2: AimsVector_DOUBLE_3) AimsVector_DOUBLE_3
class soma.aims.vector_AimsVector_U32_2
class soma.aims.vector_AimsVector_U32_2(a0: Any)
class soma.aims.vector_AimsVector_U32_2(a0: vector_AimsVector_U32_2)

Bases: wrapper

append(self, a0: AimsVector_U32_2)
append(self, a0: int, a1: AimsVector_U32_2) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_AimsVector_U32_2 | None
index(self, a0: AimsVector_U32_2) int
insert(self, a0: int, a1: AimsVector_U32_2)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: AimsVector_U32_2)
resize(self, a0: int)
resize(self, a0: int, a1: AimsVector_U32_2) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_AimsVector_U32_2_iterator(a0: vector_AimsVector_U32_2 | None)
class soma.aims.vector_AimsVector_U32_2_iterator(a0: vector_AimsVector_U32_2_iterator)

Bases: wrapper

class soma.aims.vector_AimsVector_U32_3
class soma.aims.vector_AimsVector_U32_3(a0: Any)
class soma.aims.vector_AimsVector_U32_3(a0: vector_AimsVector_U32_3)

Bases: wrapper

append(self, a0: AimsVector_U32_3)
append(self, a0: int, a1: AimsVector_U32_3) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_AimsVector_U32_3 | None
index(self, a0: AimsVector_U32_3) int
insert(self, a0: int, a1: AimsVector_U32_3)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: AimsVector_U32_3)
resize(self, a0: int)
resize(self, a0: int, a1: AimsVector_U32_3) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_AimsVector_U32_3_iterator(a0: vector_AimsVector_U32_3 | None)
class soma.aims.vector_AimsVector_U32_3_iterator(a0: vector_AimsVector_U32_3_iterator)

Bases: wrapper

class soma.aims.vector_AimsVector_U32_4
class soma.aims.vector_AimsVector_U32_4(a0: Any)
class soma.aims.vector_AimsVector_U32_4(a0: vector_AimsVector_U32_4)

Bases: wrapper

append(self, a0: AimsVector_U32_4)
append(self, a0: int, a1: AimsVector_U32_4) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_AimsVector_U32_4 | None
index(self, a0: AimsVector_U32_4) int
insert(self, a0: int, a1: AimsVector_U32_4)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: AimsVector_U32_4)
resize(self, a0: int)
resize(self, a0: int, a1: AimsVector_U32_4) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_AimsVector_U32_4_iterator(a0: vector_AimsVector_U32_4 | None)
class soma.aims.vector_AimsVector_U32_4_iterator(a0: vector_AimsVector_U32_4_iterator)

Bases: wrapper

class soma.aims.vector_DOUBLE
class soma.aims.vector_DOUBLE(a0: Any)
class soma.aims.vector_DOUBLE(a0: vector_DOUBLE)

Bases: wrapper

append(self, a0: float)
append(self, a0: int, a1: float) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_DOUBLE | None
index(self, a0: float) int
insert(self, a0: int, a1: float)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: float)
resize(self, a0: int)
resize(self, a0: int, a1: float) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_DOUBLE_iterator(a0: vector_DOUBLE | None)
class soma.aims.vector_DOUBLE_iterator(a0: vector_DOUBLE_iterator)

Bases: wrapper

class soma.aims.vector_FLOAT
class soma.aims.vector_FLOAT(a0: Any)
class soma.aims.vector_FLOAT(a0: vector_FLOAT)

Bases: wrapper

append(self, a0: float)
append(self, a0: int, a1: float) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_FLOAT | None
index(self, a0: float) int
insert(self, a0: int, a1: float)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: float)
resize(self, a0: int)
resize(self, a0: int, a1: float) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_FLOAT_iterator(a0: vector_FLOAT | None)
class soma.aims.vector_FLOAT_iterator(a0: vector_FLOAT_iterator)

Bases: wrapper

class soma.aims.vector_POINT2DF
class soma.aims.vector_POINT2DF(a0: Any)
class soma.aims.vector_POINT2DF(a0: vector_POINT2DF)

Bases: wrapper

append(self, a0: AimsVector_FLOAT_2)
append(self, a0: int, a1: AimsVector_FLOAT_2) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_POINT2DF | None
index(self, a0: AimsVector_FLOAT_2) int
insert(self, a0: int, a1: AimsVector_FLOAT_2)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: AimsVector_FLOAT_2)
resize(self, a0: int)
resize(self, a0: int, a1: AimsVector_FLOAT_2) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_POINT2DF_iterator(a0: vector_POINT2DF | None)
class soma.aims.vector_POINT2DF_iterator(a0: vector_POINT2DF_iterator)

Bases: wrapper

class soma.aims.vector_POINT3D
class soma.aims.vector_POINT3D(a0: Any)
class soma.aims.vector_POINT3D(a0: vector_POINT3D)

Bases: wrapper

append(self, a0: AimsVector_S16_3)
append(self, a0: int, a1: AimsVector_S16_3) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_POINT3D | None
index(self, a0: AimsVector_S16_3) int
insert(self, a0: int, a1: AimsVector_S16_3)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: AimsVector_S16_3)
resize(self, a0: int)
resize(self, a0: int, a1: AimsVector_S16_3) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_POINT3DD
class soma.aims.vector_POINT3DD(a0: Any)
class soma.aims.vector_POINT3DD(a0: vector_POINT3DD)

Bases: wrapper

append(self, a0: AimsVector_DOUBLE_3)
append(self, a0: int, a1: AimsVector_DOUBLE_3) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_POINT3DD | None
index(self, a0: AimsVector_DOUBLE_3) int
insert(self, a0: int, a1: AimsVector_DOUBLE_3)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: AimsVector_DOUBLE_3)
resize(self, a0: int)
resize(self, a0: int, a1: AimsVector_DOUBLE_3) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_POINT3DD_iterator(a0: vector_POINT3DD | None)
class soma.aims.vector_POINT3DD_iterator(a0: vector_POINT3DD_iterator)

Bases: wrapper

class soma.aims.vector_POINT3DF
class soma.aims.vector_POINT3DF(a0: Any)
class soma.aims.vector_POINT3DF(a0: vector_POINT3DF)

Bases: wrapper

append(self, a0: AimsVector_FLOAT_3)
append(self, a0: int, a1: AimsVector_FLOAT_3) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_POINT3DF | None
index(self, a0: AimsVector_FLOAT_3) int
insert(self, a0: int, a1: AimsVector_FLOAT_3)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: AimsVector_FLOAT_3)
resize(self, a0: int)
resize(self, a0: int, a1: AimsVector_FLOAT_3) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_POINT3DF_iterator(a0: vector_POINT3DF | None)
class soma.aims.vector_POINT3DF_iterator(a0: vector_POINT3DF_iterator)

Bases: wrapper

class soma.aims.vector_POINT3D_iterator(a0: vector_POINT3D | None)
class soma.aims.vector_POINT3D_iterator(a0: vector_POINT3D_iterator)

Bases: wrapper

class soma.aims.vector_S16
class soma.aims.vector_S16(a0: Any)
class soma.aims.vector_S16(a0: vector_S16)

Bases: wrapper

append(self, a0: int)
append(self, a0: int, a1: int) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_S16 | None
index(self, a0: int) int
insert(self, a0: int, a1: int)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_S16_iterator(a0: vector_S16 | None)
class soma.aims.vector_S16_iterator(a0: vector_S16_iterator)

Bases: wrapper

class soma.aims.vector_S32
class soma.aims.vector_S32(a0: Any)
class soma.aims.vector_S32(a0: vector_S32)

Bases: wrapper

append(self, a0: int)
append(self, a0: int, a1: int) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_S32 | None
index(self, a0: int) int
insert(self, a0: int, a1: int)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_S32_iterator(a0: vector_S32 | None)
class soma.aims.vector_S32_iterator(a0: vector_S32_iterator)

Bases: wrapper

class soma.aims.vector_S64
class soma.aims.vector_S64(a0: Any)
class soma.aims.vector_S64(a0: vector_S64)

Bases: wrapper

append(self, a0: int)
append(self, a0: int, a1: int) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_S64 | None
index(self, a0: int) int
insert(self, a0: int, a1: int)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_S64_iterator(a0: vector_S64 | None)
class soma.aims.vector_S64_iterator(a0: vector_S64_iterator)

Bases: wrapper

class soma.aims.vector_STRING
class soma.aims.vector_STRING(a0: Any)
class soma.aims.vector_STRING(a0: vector_STRING)

Bases: wrapper

append(self, a0: object)
append(self, a0: int, a1: object) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_STRING | None
index(self, a0: object) int
insert(self, a0: int, a1: object)
list(self) List
remove(self, a0: object)
resize(self, a0: int)
resize(self, a0: int, a1: object) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_STRING_iterator(a0: vector_STRING | None)
class soma.aims.vector_STRING_iterator(a0: vector_STRING_iterator)

Bases: wrapper

class soma.aims.vector_U16
class soma.aims.vector_U16(a0: Any)
class soma.aims.vector_U16(a0: vector_U16)

Bases: wrapper

append(self, a0: int)
append(self, a0: int, a1: int) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_U16 | None
index(self, a0: int) int
insert(self, a0: int, a1: int)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_U16_iterator(a0: vector_U16 | None)
class soma.aims.vector_U16_iterator(a0: vector_U16_iterator)

Bases: wrapper

class soma.aims.vector_U32
class soma.aims.vector_U32(a0: Any)
class soma.aims.vector_U32(a0: vector_U32)

Bases: wrapper

append(self, a0: int)
append(self, a0: int, a1: int) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_U32 | None
index(self, a0: int) int
insert(self, a0: int, a1: int)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_U32_iterator(a0: vector_U32 | None)
class soma.aims.vector_U32_iterator(a0: vector_U32_iterator)

Bases: wrapper

class soma.aims.vector_U8
class soma.aims.vector_U8(a0: Any)
class soma.aims.vector_U8(a0: vector_U8)

Bases: wrapper

append(self, a0: int)
append(self, a0: int, a1: int) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_U8 | None
index(self, a0: int) int
insert(self, a0: int, a1: int)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_U8_iterator(a0: vector_U8 | None)
class soma.aims.vector_U8_iterator(a0: vector_U8_iterator)

Bases: wrapper

class soma.aims.vector_ULONG
class soma.aims.vector_ULONG(a0: Any)
class soma.aims.vector_ULONG(a0: vector_ULONG)

Bases: wrapper

append(self, a0: int)
append(self, a0: int, a1: int) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_ULONG | None
index(self, a0: int) int
insert(self, a0: int, a1: int)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_ULONGLONG
class soma.aims.vector_ULONGLONG(a0: Any)
class soma.aims.vector_ULONGLONG(a0: vector_ULONGLONG)

Bases: wrapper

append(self, a0: int)
append(self, a0: int, a1: int) None
array_struct(self) Any

Return a numpy array of elements. For vectors of scalar types, this is the same as the other functions __array__() and arraydata(). But for vectors where the elements are “sub-arrays”, ie objects that can be mapped to arrays, the returned array elements will be structures: for instance a Point3df will be mapped to numpy.dtype([(‘v’, ‘3f4’)])

arraydata(self) Any
assign(self, a0: Any)
checkResize(self)
fromObject(a0: carto.GenericObject) vector_ULONGLONG | None
index(self, a0: int) int
insert(self, a0: int, a1: int)
list(self) List
property np

The np property is a shortcut to the __array__ method. Thus:

something.np

is a handier equivalent to:

numpy.asarray(something)
remove(self, a0: int)
resize(self, a0: int)
resize(self, a0: int, a1: int) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_ULONGLONG_iterator(a0: vector_ULONGLONG | None)
class soma.aims.vector_ULONGLONG_iterator(a0: vector_ULONGLONG_iterator)

Bases: wrapper

class soma.aims.vector_ULONG_iterator(a0: vector_ULONG | None)
class soma.aims.vector_ULONG_iterator(a0: vector_ULONG_iterator)

Bases: wrapper

class soma.aims.vector_VOID
class soma.aims.vector_VOID(a0: Any)
class soma.aims.vector_VOID(a0: vector_VOID)

Bases: wrapper

append(self, a0: object)
append(self, a0: int, a1: object) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_VOID | None
index(self, a0: object) int
insert(self, a0: int, a1: object)
list(self) List
remove(self, a0: object)
resize(self, a0: int)
resize(self, a0: int, a1: object) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_VOID_iterator(a0: vector_VOID | None)
class soma.aims.vector_VOID_iterator(a0: vector_VOID_iterator)

Bases: wrapper

class soma.aims.vector_list_U32
class soma.aims.vector_list_U32(a0: Any)
class soma.aims.vector_list_U32(a0: vector_list_U32)

Bases: wrapper

append(self, a0: list_U32)
append(self, a0: int, a1: list_U32) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_list_U32 | None
index(self, a0: list_U32) int
insert(self, a0: int, a1: list_U32)
list(self) List
remove(self, a0: list_U32)
resize(self, a0: int)
resize(self, a0: int, a1: list_U32) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_list_U32_iterator(a0: vector_list_U32 | None)
class soma.aims.vector_list_U32_iterator(a0: vector_list_U32_iterator)

Bases: wrapper

class soma.aims.vector_rc_ptr_AimsTimeSurface_3_VOID
class soma.aims.vector_rc_ptr_AimsTimeSurface_3_VOID(a0: Any)
class soma.aims.vector_rc_ptr_AimsTimeSurface_3_VOID(a0: vector_rc_ptr_AimsTimeSurface_3_VOID)

Bases: wrapper

append(self, a0: rc_ptr_AimsTimeSurface_3_VOID)
append(self, a0: int, a1: rc_ptr_AimsTimeSurface_3_VOID) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_rc_ptr_AimsTimeSurface_3_VOID | None
index(self, a0: rc_ptr_AimsTimeSurface_3_VOID) int
insert(self, a0: int, a1: rc_ptr_AimsTimeSurface_3_VOID)
list(self) List
remove(self, a0: rc_ptr_AimsTimeSurface_3_VOID)
resize(self, a0: int)
resize(self, a0: int, a1: rc_ptr_AimsTimeSurface_3_VOID) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_rc_ptr_AimsTimeSurface_3_VOID_iterator(a0: vector_rc_ptr_AimsTimeSurface_3_VOID | None)
class soma.aims.vector_rc_ptr_AimsTimeSurface_3_VOID_iterator(a0: vector_rc_ptr_AimsTimeSurface_3_VOID_iterator)

Bases: wrapper

class soma.aims.vector_set_U32
class soma.aims.vector_set_U32(a0: Any)
class soma.aims.vector_set_U32(a0: vector_set_U32)

Bases: wrapper

append(self, a0: set_U32)
append(self, a0: int, a1: set_U32) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_set_U32 | None
index(self, a0: set_U32) int
insert(self, a0: int, a1: set_U32)
list(self) List
remove(self, a0: set_U32)
resize(self, a0: int)
resize(self, a0: int, a1: set_U32) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_set_U32_iterator(a0: vector_set_U32 | None)
class soma.aims.vector_set_U32_iterator(a0: vector_set_U32_iterator)

Bases: wrapper

class soma.aims.vector_vector_FLOAT
class soma.aims.vector_vector_FLOAT(a0: Any)
class soma.aims.vector_vector_FLOAT(a0: vector_vector_FLOAT)

Bases: wrapper

append(self, a0: vector_FLOAT)
append(self, a0: int, a1: vector_FLOAT) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_vector_FLOAT | None
index(self, a0: vector_FLOAT) int
insert(self, a0: int, a1: vector_FLOAT)
list(self) List
remove(self, a0: vector_FLOAT)
resize(self, a0: int)
resize(self, a0: int, a1: vector_FLOAT) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_vector_FLOAT_iterator(a0: vector_vector_FLOAT | None)
class soma.aims.vector_vector_FLOAT_iterator(a0: vector_vector_FLOAT_iterator)

Bases: wrapper

class soma.aims.vector_vector_POINT3DF
class soma.aims.vector_vector_POINT3DF(a0: Any)
class soma.aims.vector_vector_POINT3DF(a0: vector_vector_POINT3DF)

Bases: wrapper

append(self, a0: vector_POINT3DF)
append(self, a0: int, a1: vector_POINT3DF) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_vector_POINT3DF | None
index(self, a0: vector_POINT3DF) int
insert(self, a0: int, a1: vector_POINT3DF)
list(self) List
remove(self, a0: vector_POINT3DF)
resize(self, a0: int)
resize(self, a0: int, a1: vector_POINT3DF) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_vector_POINT3DF_iterator(a0: vector_vector_POINT3DF | None)
class soma.aims.vector_vector_POINT3DF_iterator(a0: vector_vector_POINT3DF_iterator)

Bases: wrapper

class soma.aims.vector_vector_S32
class soma.aims.vector_vector_S32(a0: Any)
class soma.aims.vector_vector_S32(a0: vector_vector_S32)

Bases: wrapper

append(self, a0: vector_S32)
append(self, a0: int, a1: vector_S32) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_vector_S32 | None
index(self, a0: vector_S32) int
insert(self, a0: int, a1: vector_S32)
list(self) List
remove(self, a0: vector_S32)
resize(self, a0: int)
resize(self, a0: int, a1: vector_S32) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_vector_S32_iterator(a0: vector_vector_S32 | None)
class soma.aims.vector_vector_S32_iterator(a0: vector_vector_S32_iterator)

Bases: wrapper

class soma.aims.vector_vector_STRING
class soma.aims.vector_vector_STRING(a0: Any)
class soma.aims.vector_vector_STRING(a0: vector_vector_STRING)

Bases: wrapper

append(self, a0: vector_STRING)
append(self, a0: int, a1: vector_STRING) None
assign(self, a0: Any)
fromObject(a0: carto.GenericObject) vector_vector_STRING | None
index(self, a0: vector_STRING) int
insert(self, a0: int, a1: vector_STRING)
list(self) List
remove(self, a0: vector_STRING)
resize(self, a0: int)
resize(self, a0: int, a1: vector_STRING) None
size(self) int
toObject(self) carto.Object
class soma.aims.vector_vector_STRING_iterator(a0: vector_vector_STRING | None)
class soma.aims.vector_vector_STRING_iterator(a0: vector_vector_STRING_iterator)

Bases: wrapper

soma.aims.version() Tuple

AIMS / Cartobase version, as a 2-digit tuple

soma.aims.versionString() object

AIMS / Cartobase full version, as a string

soma.aims.voxelTypeCode(data)[source]

returns the AIMS type code for the given input data voxel type. For instance, for a volume of 16 bit ints, it will be ‘S16’, whereas typeCode() would return ‘Volume_S16’.

Input data may be a type or an instance of a container type.

soma.aims.write(obj, filename, format=None, options={})[source]

Equivalent to:

w = Writer() w.write(obj, filename, format=format, options=options)

soma.aims.xmlInitParser()