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.
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
andWriter
for the generic IO system, which allows to read and write everything, and which can be, in most cases, replaced with the more convenient globalread()
andwrite()
functions.Finder
is also part of the IO system to identify files and get information about them.- Volume_<type> and AimsData_<type>:
volumes
(the cartodata newer Volume and the older aimsdata version). An important feature of Volumes is the link with thenumpy.ndarray
arrays, so all the power of numpy can be used to work on volumes. See for instanceVolume_FLOAT
. Volumes of various types can be build using the convenience factory functionsVolume()
andAimsData()
.carto.GenericObject
: the dynamic C++ generic object which behaves much like a python object, and its proxyObject
which should always be used to access aGenericObject
- 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 functionBucketMap()
- AimsTimeSurface_<polygons_size>_<texture_type=VOID>: meshes, and the factory function
AimsTimeSurface()
. See for instanceAimsTimeSurface_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()
andShallowConverter()
- a few algorithms will be added
-
class
soma.aims.
AffineTransformation3d
(*args)¶ Bases:
soma.aims.Transformation3d
-
affine
()¶
-
fromColumnVector
()¶
-
fromMatrix
(value)¶
-
header
()¶
-
inverse
()¶
-
isDirect
()¶
-
isIdentity
()¶
-
rotation
()¶
-
rotationaroundx
()¶
-
rotationaroundy
()¶
-
rotationaroundz
()¶
-
scale
()¶
-
setRotationAffine
()¶
-
setToIdentity
()¶
-
setTranslation
()¶
-
toColumnVector
()¶
-
toMatrix
(s)¶ This function return a copy of the transformation matrix
-
toVector
()¶
-
transformDouble
()¶
-
transformFloat
()¶
-
transformNormal
()¶
-
transformNormalDouble
()¶
-
transformNormalFloat
()¶
-
transformNormalPoint3dd
()¶
-
transformNormalPoint3df
()¶
-
transformPoint3d
()¶
-
transformPoint3dd
()¶
-
transformPoint3df
()¶
-
transformUnitNormal
()¶
-
transformVector
()¶
-
transformVectorDouble
()¶
-
transformVectorFloat
()¶
-
transformVectorPoint3dd
()¶
-
transformVectorPoint3df
()¶
-
translation
()¶
-
-
soma.aims.
AimsData
(*args, **kwargs)[source]¶ Create an instance of the older Aims volumes (AimsData_<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(). AimsData may also use a numpy array, or another Volume or AimsData_* as unique argument.
Note that Volume( Volume_* ) or Volume( AimsData_* ) actually performs a copy of the data, whereas AimsData( Volume_* ) or AimsData( AimsData_* ) share the input data.
-
class
soma.aims.
AimsData_BOOL
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
maxIndex
()¶
-
maximum
()¶
-
minIndex
()¶
-
minimum
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_CDOUBLE
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_CFLOAT
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_DOUBLE
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
maxIndex
()¶
-
maximum
()¶
-
minIndex
()¶
-
minimum
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_FLOAT
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
maxIndex
()¶
-
maximum
()¶
-
minIndex
()¶
-
minimum
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_HSV
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_POINT3DF
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_RGB
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_RGBA
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_S16
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
maxIndex
()¶
-
maximum
()¶
-
minIndex
()¶
-
minimum
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_S32
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
maxIndex
()¶
-
maximum
()¶
-
minIndex
()¶
-
minimum
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_U16
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
maxIndex
()¶
-
maximum
()¶
-
minIndex
()¶
-
minimum
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_U32
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
maxIndex
()¶
-
maximum
()¶
-
minIndex
()¶
-
minimum
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsData_U8
(*args)¶ Bases:
soma.aims.RCObject
AimsData_<type>
classes correspond to the python bindings of C++ template classes AimsData. They are planned to be obsolete, and replaced with the Volume_<type> classes. Try avoiding using them unless using functions that work onAimsData_<type>
.AimsData
actually contains aVolume
: you can retreive it using thevolume()
method.Inversely, you can also build a
Volume
from aAimsData
by passing it to theVolume
constructor.In all cases the voxels memory block is shared.
-
clone
()¶
-
dimT
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
empty
()¶
-
fill
()¶
-
fillBorder
()¶
-
fromObject
()¶
-
header
()¶
-
maxIndex
()¶
-
maximum
()¶
-
minIndex
()¶
-
minimum
()¶
-
np
¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
setValue
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
value
()¶
-
volume
()¶
-
-
class
soma.aims.
AimsGraphReader
¶ Bases:
sip.wrapper
-
readElements
()¶
-
setExcludeFilter
()¶
-
setReadFilter
()¶
-
-
class
soma.aims.
AimsGraphWriter
¶ Bases:
sip.wrapper
-
Global
= 1¶
-
Keep
= 0¶
-
Local
= 2¶
-
writeElements
()¶
-
-
class
soma.aims.
AimsMerge_S16_S16
¶ Bases:
sip.wrapper
-
soma.aims.
AimsSurfaceTriangle
¶ alias of
soma.aims.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
¶ Bases:
sip.wrapper
thresholded_vol = threshold(volume)
Apply non-binary thresholding: voxels passing the theshold are left with their initial value.
Parameters: volume (AimsData_S16) – input volume to be thresholded Returns: thresholded_vol – thresholded volume Return type: AimsData_FLOAT -
bin
()¶ thresholded_vol = threshold.bin(volume)
Apply binary thresholding: voxels passing the theshold are set to a constant value – which one ?
Parameters: volume (AimsData_FLOAT) – input volume to be thresholded Returns: thresholded_vol – thresholded volume Return type: AimsData_S16
-
-
class
soma.aims.
AimsThreshold_S16_S16
¶ Bases:
sip.wrapper
thresholded_vol = threshold(volume)
Apply non-binary thresholding: voxels passing the theshold are left with their initial value.
Parameters: volume (AimsData_S16) – input volume to be thresholded Returns: thresholded_vol – thresholded volume Return type: AimsData_S16 -
bin
()¶ thresholded_vol = threshold.bin(volume)
Apply binary thresholding: voxels passing the theshold are set to a constant value – which one ?
Parameters: volume (AimsData_S16) – input volume to be thresholded Returns: thresholded_vol – thresholded volume Return type: AimsData_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
soma.aims.AimsTimeSurface_2_VOID
-
class
soma.aims.
AimsTimeSurface_2_FLOAT
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
class
soma.aims.
AimsTimeSurface_2_POINT2DF
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
class
soma.aims.
AimsTimeSurface_2_VOID
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
soma.aims.
AimsTimeSurface_3
¶ alias of
soma.aims.AimsTimeSurface_3_VOID
-
class
soma.aims.
AimsTimeSurface_3_FLOAT
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
class
soma.aims.
AimsTimeSurface_3_POINT2DF
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
class
soma.aims.
AimsTimeSurface_3_VOID
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
soma.aims.
AimsTimeSurface_4
¶ alias of
soma.aims.AimsTimeSurface_4_VOID
-
class
soma.aims.
AimsTimeSurface_4_FLOAT
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
class
soma.aims.
AimsTimeSurface_4_POINT2DF
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
class
soma.aims.
AimsTimeSurface_4_VOID
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
keys
()¶
-
normal
()¶
-
polygon
()¶
-
size
()¶
-
texture
()¶
-
updateNormals
()¶
-
vertex
()¶
-
-
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
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_DOUBLE_3
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_DOUBLE_4
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_FLOAT_2
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_FLOAT_3
¶ Bases:
sip.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
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_FLOAT_4
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_S16_2
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_S16_3
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_S16_4
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_S32_2
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_S32_3
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_S32_4
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_U32_2
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_U32_3
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
class
soma.aims.
AimsVector_U32_4
¶ Bases:
sip.wrapper
-
arraydata
()¶
-
assign
()¶
-
crossed
()¶
-
dnorm
()¶
-
dnorm2
()¶
-
dot
()¶
-
fromObject
()¶
-
isNull
()¶
-
item
()¶
-
items
()¶
-
list
()¶
-
norm
()¶
-
norm2
()¶
-
normalize
()¶
-
np
¶
-
setItems
()¶
-
-
exception
soma.aims.
AssertionError
¶ Bases:
aimssip.StdException
-
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
(*args)¶ Bases:
soma.aims.RCObject
-
clear
()¶
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
insert
()¶
-
iteritems
()¶
-
keys
()¶
-
merge
()¶
-
rcToObject
()¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
size
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
-
class
soma.aims.
BucketMap_FLOAT
(*args)¶ Bases:
soma.aims.RCObject
-
clear
()¶
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
insert
()¶
-
iteritems
()¶
-
keys
()¶
-
merge
()¶
-
rcToObject
()¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
size
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
-
class
soma.aims.
BucketMap_S16
(*args)¶ Bases:
soma.aims.RCObject
-
clear
()¶
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
insert
()¶
-
iteritems
()¶
-
keys
()¶
-
merge
()¶
-
rcToObject
()¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
size
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
-
class
soma.aims.
BucketMap_S32
(*args)¶ Bases:
soma.aims.RCObject
-
clear
()¶
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
insert
()¶
-
iteritems
()¶
-
keys
()¶
-
merge
()¶
-
rcToObject
()¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
size
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
-
class
soma.aims.
BucketMap_U16
(*args)¶ Bases:
soma.aims.RCObject
-
clear
()¶
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
insert
()¶
-
iteritems
()¶
-
keys
()¶
-
merge
()¶
-
rcToObject
()¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
size
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
-
class
soma.aims.
BucketMap_U32
(*args)¶ Bases:
soma.aims.RCObject
-
clear
()¶
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
insert
()¶
-
iteritems
()¶
-
keys
()¶
-
merge
()¶
-
rcToObject
()¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
size
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
-
class
soma.aims.
BucketMap_VOID
(*args)¶ Bases:
soma.aims.RCObject
-
clear
()¶
-
erase
()¶
-
fromObject
()¶
-
header
()¶ The header contains all meta-data.
-
insert
()¶
-
iteritems
()¶
-
keys
()¶
-
merge
()¶
-
rcToObject
()¶
-
setSizeT
()¶
-
setSizeX
()¶
-
setSizeXYZT
()¶
-
setSizeY
()¶
-
setSizeZ
()¶
-
size
()¶
-
sizeT
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
-
class
soma.aims.
BundleListener
¶ Bases:
sip.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
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
-
class
soma.aims.
BundleMotion
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
soma.aims.
BundleProducer
¶ Bases:
sip.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
(listener)¶ Connects a
BundleProducer
to aBunsdleListener
.
-
addFiberPoint
()¶
-
noMoreBundle
()¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
soma.aims.
BundleROISelect
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
soma.aims.
BundleROISplit
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
soma.aims.
BundleReader
¶ Bases:
soma.aims.BundleProducer
Reads a bundles file, and emits events while walking through its data.
BundleReader is a
BundleProducer
, so can be listened by anyBundleListener
. It may read several bundles/fibers formats, using a lower-levelBundleProducer
dedicated to a specific format.Currently
.bundles
(AIMS/Connectomist) and.trk
(Trackvis) formats are supported.-
addFiberPoint
()¶
-
formatExtensions
(format='ALL')¶ 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.
-
noMoreBundle
()¶
-
read
()¶ read() is the entry point to fibers processing, and triggers the producer machinery.
-
startBundle
()¶
-
startFiber
()¶
-
supportedFormats
()¶ return a set of fiber tracts formats names supported by the BundlesReader.
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
soma.aims.
BundleSampler
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
soma.aims.
BundleToGraph
¶ Bases:
soma.aims.BundleListener
,soma.aims.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 aBundleProducer
to work (typically, aBundleReader
).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.
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
-
class
soma.aims.
BundleToGraphWriter
¶ Bases:
soma.aims.BundleToGraph
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
setFileString
()¶
-
-
class
soma.aims.
BundleWriter
¶ Bases:
soma.aims.BundleListener
,soma.aims.PropertySet
Writes bundles information to a bundles file.
BundleWriter is a
BundleListener
, thus must be connected to aBundleProducer
, and is fed by it.It will write the
.bundles
format.-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
setFileString
(filename)¶ Set the output file name.
-
-
class
soma.aims.
BundlesSlicer
¶ Bases:
soma.aims.BundleListener
-
addBundlesSlicerListener
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
-
class
soma.aims.
BundlesSlicerListener
¶ Bases:
sip.wrapper
-
newBundleSlice
()¶
-
noMoreBundleSlice
()¶
-
startBundleSlicing
()¶
-
terminateBundleSlicing
()¶
-
-
class
soma.aims.
CiftiTools
¶ Bases:
sip.wrapper
CIFTI-2 shaped matrices manipulation tools.
This class eases manipulation of matrices (SparseOrDenseMatrix) with CIFTI information in their header. CIFTI information specify the nature of data contained in the matrix, and can bring ROIs or parcellations information.
Mainly one can obtain textures to map matrix information onto meshes. Textures may be ROI information (label textures, TimeTexture_S32), or matrix values textures, possibly expanded onto brain regions (TimeTexture_FLOAT in this case).
-
brainStructureMap
()¶
-
buildDimensionObjectFromLabelsTexture
()¶
-
defaultBrainStructureToMeshMap
()¶ 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
()¶
-
expandedValueTextureFromDimension
(dim, other_dim_index_pos)¶ 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
()¶
-
getBrainStructures
(dim, keepSurfaces=True, keepVoxels=True)¶ Retreive brain structures list in a brain models dimension
Parameters: Returns: brain_structures – brain structures names list
Return type: list of string
-
getDimensionObject
()¶
-
getIndicesForBrainStructure
(dim, struct_name)¶ Get the list of indices corresponding to a given brain structure in the matrix, on a given dimension.
-
getIndicesForSurfaceIndices
(dim, surface_num, roi_indices)¶ Get the list of matrix indices corresponding to a given region on a mesh, for a given dimension.
Parameters: Returns: indices – list of indices in the matrix
Return type:
-
isMatchingSurface
()¶
-
isMatchingSurfaceOrTexture
()¶
-
isMatchingTexture
()¶
-
matrix
()¶
-
roiTextureFromDimension
(dim)¶ 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
()¶
-
setMatrix
()¶
-
valuesDimNum
()¶
-
valuesDimSize
()¶
-
-
class
soma.aims.
Connectivity
¶ Bases:
sip.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¶
-
dir
()¶
-
nbNeighbors
()¶
-
offset
()¶
-
type
()¶
-
type_from_string
()¶
-
type_string
()¶
-
type_to_string
()¶
-
xyzOffset
()¶
-
-
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_AimsData_DOUBLE_BucketMap_DOUBLE
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_DOUBLE) – data to be converted Returns: output data – converted data Return type: BucketMap_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_DOUBLE) – data to be converted
- output_data (BucketMap_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_DOUBLE_BucketMap_FLOAT
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_DOUBLE) – data to be converted Returns: output data – converted data Return type: BucketMap_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_DOUBLE) – data to be converted
- output_data (BucketMap_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_DOUBLE_BucketMap_S16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_DOUBLE) – data to be converted Returns: output data – converted data Return type: BucketMap_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_DOUBLE) – data to be converted
- output_data (BucketMap_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_DOUBLE_BucketMap_S32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_DOUBLE) – data to be converted Returns: output data – converted data Return type: BucketMap_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_DOUBLE) – data to be converted
- output_data (BucketMap_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_DOUBLE_BucketMap_U16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_DOUBLE) – data to be converted Returns: output data – converted data Return type: BucketMap_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_DOUBLE) – data to be converted
- output_data (BucketMap_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_DOUBLE_BucketMap_U32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_DOUBLE) – data to be converted Returns: output data – converted data Return type: BucketMap_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_DOUBLE) – data to be converted
- output_data (BucketMap_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_DOUBLE_BucketMap_VOID
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_DOUBLE) – data to be converted Returns: output data – converted data Return type: BucketMap_VOID -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_DOUBLE) – data to be converted
- output_data (BucketMap_VOID) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_FLOAT_BucketMap_DOUBLE
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_FLOAT) – data to be converted Returns: output data – converted data Return type: BucketMap_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_FLOAT) – data to be converted
- output_data (BucketMap_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_FLOAT_BucketMap_FLOAT
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_FLOAT) – data to be converted Returns: output data – converted data Return type: BucketMap_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_FLOAT) – data to be converted
- output_data (BucketMap_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_FLOAT_BucketMap_S16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_FLOAT) – data to be converted Returns: output data – converted data Return type: BucketMap_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_FLOAT) – data to be converted
- output_data (BucketMap_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_FLOAT_BucketMap_S32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_FLOAT) – data to be converted Returns: output data – converted data Return type: BucketMap_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_FLOAT) – data to be converted
- output_data (BucketMap_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_FLOAT_BucketMap_U16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_FLOAT) – data to be converted Returns: output data – converted data Return type: BucketMap_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_FLOAT) – data to be converted
- output_data (BucketMap_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_FLOAT_BucketMap_U32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_FLOAT) – data to be converted Returns: output data – converted data Return type: BucketMap_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_FLOAT) – data to be converted
- output_data (BucketMap_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_FLOAT_BucketMap_VOID
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_FLOAT) – data to be converted Returns: output data – converted data Return type: BucketMap_VOID -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_FLOAT) – data to be converted
- output_data (BucketMap_VOID) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S16_BucketMap_DOUBLE
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S16) – data to be converted Returns: output data – converted data Return type: BucketMap_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S16) – data to be converted
- output_data (BucketMap_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S16_BucketMap_FLOAT
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S16) – data to be converted Returns: output data – converted data Return type: BucketMap_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S16) – data to be converted
- output_data (BucketMap_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S16_BucketMap_S16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S16) – data to be converted Returns: output data – converted data Return type: BucketMap_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S16) – data to be converted
- output_data (BucketMap_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S16_BucketMap_S32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S16) – data to be converted Returns: output data – converted data Return type: BucketMap_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S16) – data to be converted
- output_data (BucketMap_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S16_BucketMap_U16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S16) – data to be converted Returns: output data – converted data Return type: BucketMap_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S16) – data to be converted
- output_data (BucketMap_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S16_BucketMap_U32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S16) – data to be converted Returns: output data – converted data Return type: BucketMap_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S16) – data to be converted
- output_data (BucketMap_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S16_BucketMap_VOID
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S16) – data to be converted Returns: output data – converted data Return type: BucketMap_VOID -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S16) – data to be converted
- output_data (BucketMap_VOID) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S32_BucketMap_DOUBLE
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S32) – data to be converted Returns: output data – converted data Return type: BucketMap_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S32) – data to be converted
- output_data (BucketMap_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S32_BucketMap_FLOAT
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S32) – data to be converted Returns: output data – converted data Return type: BucketMap_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S32) – data to be converted
- output_data (BucketMap_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S32_BucketMap_S16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S32) – data to be converted Returns: output data – converted data Return type: BucketMap_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S32) – data to be converted
- output_data (BucketMap_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S32_BucketMap_S32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S32) – data to be converted Returns: output data – converted data Return type: BucketMap_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S32) – data to be converted
- output_data (BucketMap_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S32_BucketMap_U16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S32) – data to be converted Returns: output data – converted data Return type: BucketMap_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S32) – data to be converted
- output_data (BucketMap_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S32_BucketMap_U32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S32) – data to be converted Returns: output data – converted data Return type: BucketMap_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S32) – data to be converted
- output_data (BucketMap_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_S32_BucketMap_VOID
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_S32) – data to be converted Returns: output data – converted data Return type: BucketMap_VOID -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_S32) – data to be converted
- output_data (BucketMap_VOID) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U16_BucketMap_DOUBLE
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U16) – data to be converted Returns: output data – converted data Return type: BucketMap_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U16) – data to be converted
- output_data (BucketMap_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U16_BucketMap_FLOAT
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U16) – data to be converted Returns: output data – converted data Return type: BucketMap_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U16) – data to be converted
- output_data (BucketMap_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U16_BucketMap_S16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U16) – data to be converted Returns: output data – converted data Return type: BucketMap_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U16) – data to be converted
- output_data (BucketMap_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U16_BucketMap_S32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U16) – data to be converted Returns: output data – converted data Return type: BucketMap_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U16) – data to be converted
- output_data (BucketMap_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U16_BucketMap_U16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U16) – data to be converted Returns: output data – converted data Return type: BucketMap_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U16) – data to be converted
- output_data (BucketMap_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U16_BucketMap_U32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U16) – data to be converted Returns: output data – converted data Return type: BucketMap_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U16) – data to be converted
- output_data (BucketMap_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U16_BucketMap_VOID
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U16) – data to be converted Returns: output data – converted data Return type: BucketMap_VOID -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U16) – data to be converted
- output_data (BucketMap_VOID) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U32_BucketMap_DOUBLE
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U32) – data to be converted Returns: output data – converted data Return type: BucketMap_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U32) – data to be converted
- output_data (BucketMap_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U32_BucketMap_FLOAT
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U32) – data to be converted Returns: output data – converted data Return type: BucketMap_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U32) – data to be converted
- output_data (BucketMap_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U32_BucketMap_S16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U32) – data to be converted Returns: output data – converted data Return type: BucketMap_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U32) – data to be converted
- output_data (BucketMap_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U32_BucketMap_S32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U32) – data to be converted Returns: output data – converted data Return type: BucketMap_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U32) – data to be converted
- output_data (BucketMap_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U32_BucketMap_U16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U32) – data to be converted Returns: output data – converted data Return type: BucketMap_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U32) – data to be converted
- output_data (BucketMap_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U32_BucketMap_U32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U32) – data to be converted Returns: output data – converted data Return type: BucketMap_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U32) – data to be converted
- output_data (BucketMap_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U32_BucketMap_VOID
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U32) – data to be converted Returns: output data – converted data Return type: BucketMap_VOID -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U32) – data to be converted
- output_data (BucketMap_VOID) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U8_BucketMap_DOUBLE
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U8) – data to be converted Returns: output data – converted data Return type: BucketMap_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U8) – data to be converted
- output_data (BucketMap_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U8_BucketMap_FLOAT
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U8) – data to be converted Returns: output data – converted data Return type: BucketMap_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U8) – data to be converted
- output_data (BucketMap_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U8_BucketMap_S16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U8) – data to be converted Returns: output data – converted data Return type: BucketMap_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U8) – data to be converted
- output_data (BucketMap_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U8_BucketMap_S32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U8) – data to be converted Returns: output data – converted data Return type: BucketMap_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U8) – data to be converted
- output_data (BucketMap_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U8_BucketMap_U16
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U8) – data to be converted Returns: output data – converted data Return type: BucketMap_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U8) – data to be converted
- output_data (BucketMap_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U8_BucketMap_U32
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U8) – data to be converted Returns: output data – converted data Return type: BucketMap_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U8) – data to be converted
- output_data (BucketMap_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_AimsData_U8_BucketMap_VOID
¶ Bases:
sip.wrapper
Converter classes can be used using the convert() method, or as a callable object:
result = converter(input_data)
Parameters: input_data (AimsData_U8) – data to be converted Returns: output data – converted data Return type: BucketMap_VOID -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (AimsData_U8) – data to be converted
- output_data (BucketMap_VOID) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_DOUBLE_AimsData_DOUBLE
¶ Bases:
sip.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: AimsData_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_DOUBLE) – data to be converted
- output_data (AimsData_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_DOUBLE_AimsData_FLOAT
¶ Bases:
sip.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: AimsData_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_DOUBLE) – data to be converted
- output_data (AimsData_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_DOUBLE_AimsData_S16
¶ Bases:
sip.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: AimsData_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_DOUBLE) – data to be converted
- output_data (AimsData_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_DOUBLE_AimsData_S32
¶ Bases:
sip.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: AimsData_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_DOUBLE) – data to be converted
- output_data (AimsData_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_DOUBLE_AimsData_U16
¶ Bases:
sip.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: AimsData_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_DOUBLE) – data to be converted
- output_data (AimsData_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_DOUBLE_AimsData_U32
¶ Bases:
sip.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: AimsData_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_DOUBLE) – data to be converted
- output_data (AimsData_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_DOUBLE_AimsData_U8
¶ Bases:
sip.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: AimsData_U8 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_DOUBLE) – data to be converted
- output_data (AimsData_U8) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_FLOAT_AimsData_DOUBLE
¶ Bases:
sip.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: AimsData_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_FLOAT) – data to be converted
- output_data (AimsData_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_FLOAT_AimsData_FLOAT
¶ Bases:
sip.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: AimsData_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_FLOAT) – data to be converted
- output_data (AimsData_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_FLOAT_AimsData_S16
¶ Bases:
sip.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: AimsData_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_FLOAT) – data to be converted
- output_data (AimsData_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_FLOAT_AimsData_S32
¶ Bases:
sip.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: AimsData_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_FLOAT) – data to be converted
- output_data (AimsData_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_FLOAT_AimsData_U16
¶ Bases:
sip.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: AimsData_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_FLOAT) – data to be converted
- output_data (AimsData_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_FLOAT_AimsData_U32
¶ Bases:
sip.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: AimsData_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_FLOAT) – data to be converted
- output_data (AimsData_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_FLOAT_AimsData_U8
¶ Bases:
sip.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: AimsData_U8 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_FLOAT) – data to be converted
- output_data (AimsData_U8) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S16_AimsData_DOUBLE
¶ Bases:
sip.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: AimsData_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S16) – data to be converted
- output_data (AimsData_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S16_AimsData_FLOAT
¶ Bases:
sip.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: AimsData_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S16) – data to be converted
- output_data (AimsData_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S16_AimsData_S16
¶ Bases:
sip.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: AimsData_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S16) – data to be converted
- output_data (AimsData_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S16_AimsData_S32
¶ Bases:
sip.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: AimsData_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S16) – data to be converted
- output_data (AimsData_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S16_AimsData_U16
¶ Bases:
sip.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: AimsData_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S16) – data to be converted
- output_data (AimsData_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S16_AimsData_U32
¶ Bases:
sip.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: AimsData_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S16) – data to be converted
- output_data (AimsData_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S16_AimsData_U8
¶ Bases:
sip.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: AimsData_U8 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S16) – data to be converted
- output_data (AimsData_U8) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S32_AimsData_DOUBLE
¶ Bases:
sip.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: AimsData_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S32) – data to be converted
- output_data (AimsData_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S32_AimsData_FLOAT
¶ Bases:
sip.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: AimsData_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S32) – data to be converted
- output_data (AimsData_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S32_AimsData_S16
¶ Bases:
sip.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: AimsData_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S32) – data to be converted
- output_data (AimsData_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S32_AimsData_S32
¶ Bases:
sip.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: AimsData_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S32) – data to be converted
- output_data (AimsData_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S32_AimsData_U16
¶ Bases:
sip.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: AimsData_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S32) – data to be converted
- output_data (AimsData_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S32_AimsData_U32
¶ Bases:
sip.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: AimsData_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S32) – data to be converted
- output_data (AimsData_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_S32_AimsData_U8
¶ Bases:
sip.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: AimsData_U8 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_S32) – data to be converted
- output_data (AimsData_U8) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U16_AimsData_DOUBLE
¶ Bases:
sip.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: AimsData_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U16) – data to be converted
- output_data (AimsData_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U16_AimsData_FLOAT
¶ Bases:
sip.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: AimsData_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U16) – data to be converted
- output_data (AimsData_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U16_AimsData_S16
¶ Bases:
sip.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: AimsData_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U16) – data to be converted
- output_data (AimsData_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U16_AimsData_S32
¶ Bases:
sip.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: AimsData_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U16) – data to be converted
- output_data (AimsData_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U16_AimsData_U16
¶ Bases:
sip.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: AimsData_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U16) – data to be converted
- output_data (AimsData_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U16_AimsData_U32
¶ Bases:
sip.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: AimsData_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U16) – data to be converted
- output_data (AimsData_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U16_AimsData_U8
¶ Bases:
sip.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: AimsData_U8 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U16) – data to be converted
- output_data (AimsData_U8) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U32_AimsData_DOUBLE
¶ Bases:
sip.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: AimsData_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U32) – data to be converted
- output_data (AimsData_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U32_AimsData_FLOAT
¶ Bases:
sip.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: AimsData_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U32) – data to be converted
- output_data (AimsData_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U32_AimsData_S16
¶ Bases:
sip.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: AimsData_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U32) – data to be converted
- output_data (AimsData_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U32_AimsData_S32
¶ Bases:
sip.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: AimsData_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U32) – data to be converted
- output_data (AimsData_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U32_AimsData_U16
¶ Bases:
sip.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: AimsData_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U32) – data to be converted
- output_data (AimsData_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U32_AimsData_U32
¶ Bases:
sip.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: AimsData_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U32) – data to be converted
- output_data (AimsData_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_U32_AimsData_U8
¶ Bases:
sip.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: AimsData_U8 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_U32) – data to be converted
- output_data (AimsData_U8) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_VOID_AimsData_DOUBLE
¶ Bases:
sip.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: AimsData_DOUBLE -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_VOID) – data to be converted
- output_data (AimsData_DOUBLE) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_VOID_AimsData_FLOAT
¶ Bases:
sip.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: AimsData_FLOAT -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_VOID) – data to be converted
- output_data (AimsData_FLOAT) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_VOID_AimsData_S16
¶ Bases:
sip.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: AimsData_S16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_VOID) – data to be converted
- output_data (AimsData_S16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_VOID_AimsData_S32
¶ Bases:
sip.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: AimsData_S32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_VOID) – data to be converted
- output_data (AimsData_S32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_VOID_AimsData_U16
¶ Bases:
sip.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: AimsData_U16 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_VOID) – data to be converted
- output_data (AimsData_U16) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_VOID_AimsData_U32
¶ Bases:
sip.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: AimsData_U32 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_VOID) – data to be converted
- output_data (AimsData_U32) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_BucketMap_VOID_AimsData_U8
¶ Bases:
sip.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: AimsData_U8 -
convert
(input_data, output_data)¶ In-place converson inside existing allocated data
Parameters: - input_data (BucketMap_VOID) – data to be converted
- output_data (AimsData_U8) – conversion output will be done into this data
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_DOUBLE_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_FLOAT_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_HSV_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGBA_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_RGB_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S16_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_S32_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U16_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U32_Volume_U8
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_DOUBLE
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_FLOAT
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_HSV
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_RGB
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_RGBA
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_S16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_S32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_U16
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_U32
¶ Bases:
sip.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
(input_data, output_data)¶ 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
Returns: Return type:
-
-
class
soma.aims.
Converter_Volume_U8_Volume_U8
¶ Bases:
sip.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
-
class
soma.aims.
CurveSelection
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
soma.aims.
CutMesh
¶ Bases:
sip.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
()¶
-
cut
()¶
-
cutBorder
()¶
-
cutMeshes
()¶
-
planeMesh
()¶
-
class
soma.aims.
Edge
(*args)¶ Bases:
soma.aims.GraphObject
-
clone
()¶
-
currentValue
()¶
-
getScalar
()¶
-
getString
()¶
-
hasSyntax
()¶
-
hasVertex
()¶
-
has_key
()¶
-
intKey
()¶
-
isArray
()¶
-
isDictionary
()¶
-
isDictionaryIterator
()¶
-
isDynArray
()¶
-
isIterable
()¶
-
isIterator
()¶
-
isValid
()¶
-
key
()¶
-
next
()¶
-
objectIterator
()¶
-
setSyntax
()¶
-
size
()¶
-
type
()¶
-
vertices
()¶
-
verticesSize
()¶
-
-
exception
soma.aims.
ErrnoError
¶ Bases:
aimssip.RuntimeError
-
exception
soma.aims.
FileError
¶ Bases:
aimssip.RuntimeError
-
class
soma.aims.
FileFormatDictionary_SparseOrDenseMatrix
¶ Bases:
sip.wrapper
-
fileExtension
()¶
-
fileFormat
()¶
-
formats
()¶
-
init
()¶
-
registerBaseFormats
()¶
-
registerFormat
()¶
-
unregisterFormat
()¶
-
-
class
soma.aims.
Finder
¶ Bases:
sip.wrapper
-
check
()¶
-
dataType
()¶
-
extensions
()¶
-
finderFormat
()¶
-
format
()¶
-
header
()¶
-
objectType
()¶
-
possibleDataTypes
()¶
-
registerFormat
()¶
-
setDataType
()¶
-
setHeader
()¶
-
setObjectType
()¶
-
setPossibleDataTypes
()¶
-
unregisterFormat
()¶
-
-
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 refered 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) – refered module object to get objects to move from.
-
static
-
class
soma.aims.
Graph
(*args)¶ Bases:
soma.aims.GraphObject
-
addEdge
()¶
-
addVertex
()¶
-
clear
()¶
-
clone
()¶
-
cloneVertex
()¶
-
currentValue
()¶
-
edges
()¶
-
edgesSize
()¶
-
extract
()¶
-
getScalar
()¶
-
getString
()¶
-
hasSyntax
()¶
-
hasVertex
()¶
-
has_key
()¶
-
intKey
()¶
-
isArray
()¶
-
isDictionary
()¶
-
isDictionaryIterator
()¶
-
isDirected
()¶
-
isDynArray
()¶
-
isIterable
()¶
-
isIterator
()¶
-
isUndirected
()¶
-
isValid
()¶
-
key
()¶
-
loadAllMissingElements
()¶
-
next
()¶
-
objectIterator
()¶
-
order
()¶
-
randomVertex
()¶
-
removeEdge
()¶
-
removeVertex
()¶
-
setSyntax
()¶
-
size
()¶
-
type
()¶
-
vertices
()¶
-
-
class
soma.aims.
GraphManip
¶ Bases:
sip.wrapper
-
attributeColor
()¶
-
buckets2Volume
()¶
-
completeGraph
()¶
-
setAttributeColor
()¶
-
storeAims
()¶
-
storeTalairach
()¶
-
talairach
()¶
-
volume2Buckets
()¶
-
-
class
soma.aims.
GraphObject
(*args)¶ Bases:
soma.aims.GenericObject
-
clone
()¶
-
currentValue
()¶
-
getScalar
()¶
-
getString
()¶
-
hasSyntax
()¶
-
has_key
()¶
-
intKey
()¶
-
isArray
()¶
-
isDictionary
()¶
-
isDictionaryIterator
()¶
-
isDynArray
()¶
-
isIterable
()¶
-
isIterator
()¶
-
isNone
()¶
-
isScalar
()¶
-
isString
()¶
-
isValid
()¶
-
key
()¶
-
next
()¶
-
objectIterator
()¶
-
setSyntax
()¶
-
size
()¶
-
type
()¶
-
-
class
soma.aims.
Hierarchy
(*args)¶ Bases:
soma.aims.Tree
-
find
(name)¶
-
find_color
(name, default_color=<type 'exceptions.KeyError'>)¶
-
hasSyntax
()¶
-
next
()¶
-
setSyntax
()¶
-
-
exception
soma.aims.
IOError
¶ Bases:
aimssip.RuntimeError
-
exception
soma.aims.
IndexError
¶ Bases:
aimssip.StdException
-
class
soma.aims.
MaskIterator
(*args)¶ Bases:
soma.aims.RCObject
-
contains
()¶
-
isValid
()¶
-
next
()¶
-
regionName
()¶
-
restart
()¶
-
value
()¶
-
valueMillimeters
()¶
-
volumeDimension
()¶
-
voxelSize
()¶
-
-
soma.aims.
Motion
¶ alias of
soma.aims.AffineTransformation3d
-
class
soma.aims.
Object
¶ Bases:
soma.aims.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, andhdr
its header, of typeObject
.>>> 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 typePyObject
(orPyString
). 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 typestd::vector<float>
, so writing tohdr['voxel_size'][0]
needs to enure we are actually writing afloat
, 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
theget
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, aGenericObject
) - 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()
andrc_ptr.get()
have been renamed_get()
years ago (in aims 4.0 I think) butget()
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
()¶
-
next
()¶
-
static
ptrToObject
(x)¶
-
static
rcToObject
(x)¶
-
static
toObject
(x)¶
-
soma.aims.
Point2d
¶ alias of
soma.aims.AimsVector_S16_2
-
soma.aims.
Point2dd
¶ alias of
soma.aims.AimsVector_DOUBLE_2
-
soma.aims.
Point2df
¶ alias of
soma.aims.AimsVector_FLOAT_2
-
soma.aims.
Point2du
¶ alias of
soma.aims.AimsVector_U32_2
-
soma.aims.
Point3d
¶ alias of
soma.aims.AimsVector_S16_3
-
soma.aims.
Point3dd
¶ alias of
soma.aims.AimsVector_DOUBLE_3
-
soma.aims.
Point3df
¶ alias of
soma.aims.AimsVector_FLOAT_3
-
soma.aims.
Point3du
¶ alias of
soma.aims.AimsVector_U32_3
-
soma.aims.
Point4d
¶ alias of
soma.aims.AimsVector_S16_4
-
soma.aims.
Point4dd
¶ alias of
soma.aims.AimsVector_DOUBLE_4
-
soma.aims.
Point4df
¶ alias of
soma.aims.AimsVector_FLOAT_4
-
soma.aims.
Point4du
¶ alias of
soma.aims.AimsVector_U32_4
-
class
soma.aims.
Quaternion
¶ Bases:
sip.wrapper
-
angle
()¶
-
axis
()¶
-
buildFromMatrix
(m)¶ 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
()¶
-
compose
¶ x.__mul__(y) <==> x*y
-
fromAxis
()¶
-
inverse
()¶
-
norm
()¶
-
normalized
()¶
-
setVector
()¶
-
transform
()¶
-
transformInverse
()¶
-
vector
()¶
-
-
class
soma.aims.
RawConverter_BucketMap_VOID_AimsData_S16
¶ Bases:
sip.wrapper
-
convert
()¶
-
printToVolume
()¶
-
setTimeIsLabel
()¶
-
timeIsLabel
()¶
-
-
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()
andsoma.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' : 'AimsData'}
)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: - typemap (dict (optional)) – described above
- allocmode ((optional)) –
carto.AllocatorContext
orcarto.AllocatorStrategy
.DataAccess constant: allocation specification.
-
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)[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.
-
class
soma.aims.
RoiDiff
¶ Bases:
sip.wrapper
-
diff
()¶
-
globalStats
()¶
-
graph2LabelVolume
()¶
-
mismatch_bucket
()¶
-
roiNames
()¶
-
roiNamesInv
()¶
-
statsByLabel
()¶
-
writeCSV
()¶
-
-
class
soma.aims.
RoiIterator
(*args)¶ Bases:
soma.aims.RCObject
-
count
()¶
-
isValid
()¶
-
maskIterator
()¶
-
next
()¶
-
regionName
()¶
-
restart
()¶
-
setRegionNameAttributes
(attributes)¶ 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.
-
-
exception
soma.aims.
RuntimeError
¶ Bases:
aimssip.StdException
-
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.
SimpleBundlesSlicer
¶ Bases:
soma.aims.BundlesSlicer
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
-
class
soma.aims.
SparseMatrix
(*args)¶ Bases:
soma.aims.RCObject
-
erase_element
()¶
-
fill
()¶
-
getColumn
()¶
-
getComposition
()¶
-
getNonZeroElementCount
()¶
-
getRow
()¶
-
getSize1
()¶
-
getSize2
()¶
-
getTrace
()¶
-
getTransposition
()¶
-
hasElement
()¶
-
header
()¶
-
isSquare
()¶
-
read
()¶
-
reallocate
()¶
-
setColumn
()¶
-
setDiagonal
()¶
-
setIdentity
()¶
-
setRow
()¶
-
setZero
()¶
-
transpose
()¶
-
write
()¶
-
-
class
soma.aims.
SparseOrDenseMatrix
(*args)¶ Bases:
soma.aims.RCObject
-
asDense
()¶
-
asSparse
()¶
-
denseMatrix
()¶
-
erase_element
()¶
-
freeColumn
()¶
-
freeRow
()¶
-
getColumn
()¶
-
getNonZeroElementCount
()¶
-
getRow
()¶
-
getSize
()¶
-
getSize1
()¶
-
getSize2
()¶
-
hasElement
()¶
-
header
()¶
-
isDense
()¶
-
isOptimalShape
()¶
-
muteToDense
()¶
-
muteToOptimalShape
()¶
-
muteToSparse
()¶
-
read
()¶
-
readAll
()¶
-
readColumn
()¶
-
readRow
()¶
-
reallocate
()¶
-
setColumn
()¶
-
setHeader
()¶
-
setMatrix
()¶
-
setRow
()¶
-
set_element
()¶
-
sparseMatrix
()¶
-
subMatrix
()¶
-
write
()¶
-
-
class
soma.aims.
StandardReferentials
¶ Bases:
sip.wrapper
-
acPcReferential
()¶
-
acPcReferentialID
()¶
-
commonScannerBasedReferential
()¶
-
commonScannerBasedReferentialID
()¶
-
mniTemplateReferential
()¶
-
mniTemplateReferentialID
()¶
-
talairachReferential
()¶
-
-
exception
soma.aims.
StdException
¶ Bases:
exceptions.Exception
-
class
soma.aims.
SurfaceGenerator
¶ Bases:
sip.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
()¶ static arrow( dictionary ) See the description() and printDescription() methods for more information. static arrow( Point3df arrowhead, Point3df base, float headradius, float arrowradius, unsigned nfaces, float arrowlengthfactor )
-
circle_wireframe
()¶ - 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
()¶ static cone( dictionary ) See the description() and printDescription() methods for more information. static cone( Point3df arrowhead, Point3df base, float radius, unsigned nfaces, bool closed, bool smooth=False )
-
cube
()¶ static cube( dictionary ) See the description() and printDescription() methods for more information. static cube( Point3df center, float radius, bool smoothnormals=False )
-
cylinder
()¶ static cylinder( dictionary ) See the description() and printDescription() methods for more information. static cylinder( Point3df center1, Point3df center2, float radius1, float radius2, unsigned nfaces, bool closed, bool smooth=False )
-
description
()¶
-
description_wireframe
()¶
-
ellipse
()¶ static ellipse( dictionary ) See the description() and printDescription() methods for more information. static ellipse( Point3df center, float radius1, float radius2, unsigned nfaces, bool uniquevertices=False )
-
generate
()¶
-
generate_wireframe
()¶
-
grid
(dict)¶ See the description() and printDescription() methods for more information. grid(Point3df boundingbox_min, Point3df boundingbox_max, Point3df grid_sampling) Regular, wireframe grid
-
icosahedron
()¶ static icosahedron( dictionary ) See the description() and printDescription() methods for more information. static icosahedron( Point3df center, float radius )
-
icosphere
(dictionary)¶ See the description() and printDescription() methods for more information. 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
(boundingbox_min, boundingbox_max, smooth=False)¶ Parameters:
-
parallelepiped_wireframe
(Point3df boundingbox_min, Point3df boundingbox_max)¶
-
printDescription
()¶
-
printDescription_wireframe
()¶
-
sphere
()¶ static sphere( dictionary ) See the description() and printDescription() methods for more information. static sphere( Point3df center, float radius, unsigned nfaces, bool uniquevertices=False )
-
class
soma.aims.
SurfaceManip
¶ Bases:
sip.wrapper
Surface Manipulation Object. All mehtods are static in this class, it is just a means of grouping functions.
-
checkMeshIntersect
()¶
-
cutMesh
(in_mesh, plane, cut_mesh, border_line)¶ 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
Returns: Return type:
-
invertSurfacePolygons
(mesh)¶ 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.
-
lineDirections
(segments_mesh)¶ calculate directions of a line mesh, for each vertex
Parameters: segments_mesh (AimsTimeSurface_2_VOID) – Returns: directions Return type: vector_POINT3DF
-
meshArea
()¶ Surface area of a triangular mesh, in mm^2
-
meshDensity
(mesh, as_distance=False)¶ 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:
-
meshEdgeLengthRatioTexture
(numerator_mesh, denominator_mesh)¶ 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:
-
meshExtract
(mesh, texture, label_value)¶ 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
(input_output_mesh, input_mesh)¶ Concatenates the second mesh to the first one. The first argument will be modified.
Parameters: - input_output_mesh (AimsTimeSurface_3_VOID) – first mesh. Will be modified to be the output.
- input_mesh (AimsTimeSurface_3_VOID) – second mesh to be appended to the first one.
Returns: Return type:
-
meshPlanarPolygon
(plane, polygon)¶ 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:
-
meshTextureBoundary
(mesh, label_texture, region_value)¶ 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: - mesh (AimsSurfaceTriangle) – input mesh to extract boundary on
- label_texture (TimeTexture_S16, TimeTexture_S32, or TimeTexture_FLOAT) – label texture defining regions on the mesh
- region_value (int16, int32 or float) – label of the desired region
Returns: boundary – output segments mesh (filar mesh) for the boundary
Return type:
-
meshTransform
(mesh, transformation)¶ Apply linear coordinates transformation to a mesh. The input mesh will be modified in-place.
Parameters: - mesh (AimsTimeSurface_3_VOID or AimsTimeSurface_2_VOID) – mesh to be transformed. Will be modified.
- transformation (AffineTransformation3d) – Linear transformation matrix
Returns: Return type:
-
meshVolume
(mesh)¶ 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
()¶
-
rasterizeMesh
(mesh, volume, value=2)¶ 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, volume, value=1)¶ 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
-
refineMeshTri4
(mesh, selected_polygons=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:
-
sortPolygonsAlongDirection
(mesh, timestep, direction)¶ 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) –
- timestep, direction) (sortPolygonsAlongDirection(mesh,) –
- polygons along a given direction. (Sort) –
- centers will be used for sorting. Only one timestep is performed (to be fast) (Polygons) –
- mesh – The mesh will be modified.
- timestep –
- direction –
- timestep, direction) –
- polygons along a given direction. –
- centers will be used for sorting. Only one timestep is performed (to be fast) –
- mesh – The mesh will be modified.
- timestep –
- direction –
-
surfaceNeighbours
()¶
-
-
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
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶
-
arraydata
()¶
-
assign
()¶
-
checkResize
()¶
-
data
()¶
-
erase
()¶
-
item
()¶
-
list
()¶
-
nItem
()¶
-
np
¶
-
push_back
()¶
-
reserve
()¶
-
resize
()¶
-
size
()¶
-
-
class
soma.aims.
Texture_FLOAT
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶
-
arraydata
()¶
-
assign
()¶
-
checkResize
()¶
-
data
()¶
-
erase
()¶
-
item
()¶
-
list
()¶
-
nItem
()¶
-
np
¶
-
push_back
()¶
-
reserve
()¶
-
resize
()¶
-
size
()¶
-
-
class
soma.aims.
Texture_POINT2DF
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶
-
arraydata
()¶
-
assign
()¶
-
checkResize
()¶
-
data
()¶
-
erase
()¶
-
item
()¶
-
list
()¶
-
nItem
()¶
-
np
¶
-
push_back
()¶
-
reserve
()¶
-
resize
()¶
-
size
()¶
-
-
class
soma.aims.
Texture_S16
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶
-
arraydata
()¶
-
assign
()¶
-
checkResize
()¶
-
data
()¶
-
erase
()¶
-
item
()¶
-
list
()¶
-
nItem
()¶
-
np
¶
-
push_back
()¶
-
reserve
()¶
-
resize
()¶
-
size
()¶
-
-
class
soma.aims.
Texture_S32
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶
-
arraydata
()¶
-
assign
()¶
-
checkResize
()¶
-
data
()¶
-
erase
()¶
-
item
()¶
-
list
()¶
-
nItem
()¶
-
np
¶
-
push_back
()¶
-
reserve
()¶
-
resize
()¶
-
size
()¶
-
-
class
soma.aims.
Texture_U32
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶
-
arraydata
()¶
-
assign
()¶
-
checkResize
()¶
-
data
()¶
-
erase
()¶
-
item
()¶
-
list
()¶
-
nItem
()¶
-
np
¶
-
push_back
()¶
-
reserve
()¶
-
resize
()¶
-
size
()¶
-
-
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
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
has_key
()¶
-
header
()¶
-
iteritems
()¶
-
keys
()¶
-
nItem
()¶
-
push_back
()¶
-
reserve
()¶
-
size
()¶
-
-
class
soma.aims.
TimeTexture_FLOAT
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
has_key
()¶
-
header
()¶
-
iteritems
()¶
-
keys
()¶
-
nItem
()¶
-
push_back
()¶
-
reserve
()¶
-
size
()¶
-
-
class
soma.aims.
TimeTexture_POINT2DF
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
has_key
()¶
-
header
()¶
-
iteritems
()¶
-
keys
()¶
-
nItem
()¶
-
push_back
()¶
-
reserve
()¶
-
size
()¶
-
-
class
soma.aims.
TimeTexture_S16
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
has_key
()¶
-
header
()¶
-
iteritems
()¶
-
keys
()¶
-
nItem
()¶
-
push_back
()¶
-
reserve
()¶
-
size
()¶
-
-
class
soma.aims.
TimeTexture_S32
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
has_key
()¶
-
header
()¶
-
iteritems
()¶
-
keys
()¶
-
nItem
()¶
-
push_back
()¶
-
reserve
()¶
-
size
()¶
-
-
class
soma.aims.
TimeTexture_U32
(*args)¶ Bases:
soma.aims.RCObject
-
erase
()¶
-
fromObject
()¶
-
has_key
()¶
-
header
()¶
-
iteritems
()¶
-
keys
()¶
-
nItem
()¶
-
push_back
()¶
-
reserve
()¶
-
size
()¶
-
-
class
soma.aims.
Transformation
(*args)¶ Bases:
soma.aims.RCObject
Base class for spatial transformations.
-
isIdentity
()¶ 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.
-
-
class
soma.aims.
Transformation3d
(*args)¶ Bases:
soma.aims.Transformation
Base class for spatial transformations in 3D.
-
transform
()¶
-
transformDouble
()¶
-
transformFloat
()¶
-
transformPoint3d
()¶
-
transformPoint3dd
()¶
-
transformPoint3df
()¶
-
transformPoints
()¶
-
-
class
soma.aims.
Tree
(*args)¶ Bases:
soma.aims.GenericObject
-
children
()¶
-
childrenSize
()¶
-
clone
()¶
-
currentValue
()¶
-
getScalar
()¶
-
getString
()¶
-
hasSyntax
()¶
-
has_key
()¶
-
insert
()¶
-
intKey
()¶
-
isArray
()¶
-
isDictionary
()¶
-
isDictionaryIterator
()¶
-
isDynArray
()¶
-
isIterable
()¶
-
isIterator
()¶
-
isNone
()¶
-
isScalar
()¶
-
isString
()¶
-
isValid
()¶
-
key
()¶
-
next
()¶
-
objectIterator
()¶
-
remove
()¶
-
setSyntax
()¶
-
size
()¶
-
type
()¶
-
-
exception
soma.aims.
ValueError
¶ Bases:
aimssip.StdException
-
class
soma.aims.
Vertex
(*args)¶ Bases:
soma.aims.GraphObject
-
clone
()¶
-
currentValue
()¶
-
edges
()¶
-
edgesSize
()¶
-
getScalar
()¶
-
getString
()¶
-
hasSyntax
()¶
-
has_key
()¶
-
intKey
()¶
-
isArray
()¶
-
isDictionary
()¶
-
isDictionaryIterator
()¶
-
isDynArray
()¶
-
isIterable
()¶
-
isIterator
()¶
-
isValid
()¶
-
key
()¶
-
neighbours
()¶
-
next
()¶
-
objectIterator
()¶
-
randomNeighbour
()¶
-
setSyntax
()¶
-
size
()¶
-
type
()¶
-
-
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 or AimsData_* as unique argument.
Note that Volume( Volume_* ) or Volume( AimsData_* ) actually performs a copy of the data, whereas AimsData( Volume_* ) or AimsData( AimsData_* ) 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:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_BOOL using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_CDOUBLE
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_CDOUBLE using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_CFLOAT
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_CFLOAT using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_DOUBLE
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_DOUBLE using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_FLOAT
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_FLOAT using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_HSV
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_HSV using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_POINT3DF
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_POINT3DF using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_RGB
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_RGB using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_RGBA
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_RGBA using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_S16
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_S16 using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_S32
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_S32 using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_U16
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_U16 using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_U32
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_U32 using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position.
-
shape
¶
-
class
-
class
soma.aims.
Volume_U8
(*args)¶ Bases:
soma.aims.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
andWriter
classes, which are in turn used by the simpleread()
andwrite()
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)
ornumpy.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 obsoloetearraydata()
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, usingvolume.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 thatvolume[x, y, z, t]
is the same asnupmy.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 theheader()
method. This header object also has a read-write access with some restrictions inherent to theObject
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 classesConverter_<type1>_<type2>
andShallowConverter_<type1>_<type2>
with <type1> and <type2> being volume or other object types: for instanceConverter_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 ]
-
class
Position4Di
¶ Bases:
sip.wrapper
4 ints for position or size, used for Volume views.
-
all
()¶
-
allocatorContext
()¶
-
any
()¶
-
arraydata
()¶ Note
arraydata() returns a numpy array to the internal memory block, without strides. 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 = numpy.array(volume, copy=False)
or:
>>> volarray = numpy.asarray(volume)
Note
The array conversion is currently only supported for scalar volumes, and is not present on volumes of types RGB or RGBA.
-
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.
Returns: Return type: A volume of the converted type
-
at
(posx, posy=0, posz=0, post=0)¶ Returns the volume value for the selected voxel. at(vector_int)
Returns the volume value for the selected voxel.
-
checkResize
()¶
-
copyHeaderFrom
()¶
-
fill
(value)¶ Fill Volume_U8 using the given value.
-
fillBorder
(value)¶ Fill the surrounding of the volume view in the reference volume (if any) using the given value.
-
getSize
()¶ Number of voxels in each dimension (list of 4 ints)
-
getSizeT
()¶
-
getSizeX
()¶
-
getSizeY
()¶
-
getSizeZ
()¶
-
getVoxelSize
()¶ Voxel sizes in mm (list of 4 floats)
-
header
()¶ The header contains all meta-data.
-
max
()¶
-
min
()¶
-
np
¶
-
posInRefVolume
()¶ If the volume is a view into another (larger) one, this returns the position in “parent” one.
-
refVolume
()¶ If the volume is a view into another (larger) one, this returns the “parent” one.
-
setPosInRefVolume
()¶ Set position in parent volume
-
setValue
(value, x, y=0, z=0, t=0)¶ Set the voxel value at the given position. setValue(value, [x1, x2, x3, x4, x5, x6…])
Set the voxel value at the given position. Set a voxel value at given position Set a voxel value at given position
-
shape
¶
-
class
-
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.
-
-
class
soma.aims.
aims
¶ Bases:
sip.simplewrapper
-
class
AffineTransformation3d
(*args)¶ Bases:
soma.aims.Transformation3d
-
affine
()¶
-
fromColumnVector
()¶
-
fromMatrix
(value)¶
-
header
()¶
-
inverse
()¶
-
isDirect
()¶
-
isIdentity
()¶
-
rotation
()¶
-
rotationaroundx
()¶
-
rotationaroundy
()¶
-
rotationaroundz
()¶
-
scale
()¶
-
setRotationAffine
()¶
-
setToIdentity
()¶
-
setTranslation
()¶
-
toColumnVector
()¶
-
toMatrix
(s)¶ This function return a copy of the transformation matrix
-
toVector
()¶
-
transformDouble
()¶
-
transformFloat
()¶
-
transformNormal
()¶
-
transformNormalDouble
()¶
-
transformNormalFloat
()¶
-
transformNormalPoint3dd
()¶
-
transformNormalPoint3df
()¶
-
transformPoint3d
()¶
-
transformPoint3dd
()¶
-
transformPoint3df
()¶
-
transformUnitNormal
()¶
-
transformVector
()¶
-
transformVectorDouble
()¶
-
transformVectorFloat
()¶
-
transformVectorPoint3dd
()¶
-
transformVectorPoint3df
()¶
-
translation
()¶
-
-
AimsConnectedComponent
()¶ - 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: - 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: - 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: - 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: - 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: - 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: - 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: - 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: - 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: - 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: - 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: - 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:
-
class
BundleListener
¶ Bases:
sip.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
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
-
class
BundleMotion
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
BundleProducer
¶ Bases:
sip.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
(listener)¶ Connects a
BundleProducer
to aBunsdleListener
.
-
addFiberPoint
()¶
-
noMoreBundle
()¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
BundleROISelect
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
BundleROISplit
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
BundleReader
¶ Bases:
soma.aims.BundleProducer
Reads a bundles file, and emits events while walking through its data.
BundleReader is a
BundleProducer
, so can be listened by anyBundleListener
. It may read several bundles/fibers formats, using a lower-levelBundleProducer
dedicated to a specific format.Currently
.bundles
(AIMS/Connectomist) and.trk
(Trackvis) formats are supported.-
addFiberPoint
()¶
-
formatExtensions
(format='ALL')¶ 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.
-
noMoreBundle
()¶
-
read
()¶ read() is the entry point to fibers processing, and triggers the producer machinery.
-
startBundle
()¶
-
startFiber
()¶
-
supportedFormats
()¶ return a set of fiber tracts formats names supported by the BundlesReader.
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
BundleSampler
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
BundleToGraph
¶ Bases:
soma.aims.BundleListener
,soma.aims.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 aBundleProducer
to work (typically, aBundleReader
).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.
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
-
class
BundleToGraphWriter
¶ Bases:
soma.aims.BundleToGraph
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
setFileString
()¶
-
-
class
BundleTransformer
(direct_transformation)¶ Bases:
soma.aims.BundleListener
,soma.aims.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.
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
BundleWriter
¶ Bases:
soma.aims.BundleListener
,soma.aims.PropertySet
Writes bundles information to a bundles file.
BundleWriter is a
BundleListener
, thus must be connected to aBundleProducer
, and is fed by it.It will write the
.bundles
format.-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
setFileString
(filename)¶ Set the output file name.
-
-
class
BundlesSlicer
¶ Bases:
soma.aims.BundleListener
-
addBundlesSlicerListener
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
-
class
BundlesSlicerListener
¶ Bases:
sip.wrapper
-
newBundleSlice
()¶
-
noMoreBundleSlice
()¶
-
startBundleSlicing
()¶
-
terminateBundleSlicing
()¶
-
-
class
CiftiTools
¶ Bases:
sip.wrapper
CIFTI-2 shaped matrices manipulation tools.
This class eases manipulation of matrices (SparseOrDenseMatrix) with CIFTI information in their header. CIFTI information specify the nature of data contained in the matrix, and can bring ROIs or parcellations information.
Mainly one can obtain textures to map matrix information onto meshes. Textures may be ROI information (label textures, TimeTexture_S32), or matrix values textures, possibly expanded onto brain regions (TimeTexture_FLOAT in this case).
-
brainStructureMap
()¶
-
buildDimensionObjectFromLabelsTexture
()¶
-
defaultBrainStructureToMeshMap
()¶ 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
()¶
-
expandedValueTextureFromDimension
(dim, other_dim_index_pos)¶ 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
()¶
-
getBrainStructures
(dim, keepSurfaces=True, keepVoxels=True)¶ Retreive brain structures list in a brain models dimension
Parameters: Returns: brain_structures – brain structures names list
Return type: list of string
-
getDimensionObject
()¶
-
getIndicesForBrainStructure
(dim, struct_name)¶ Get the list of indices corresponding to a given brain structure in the matrix, on a given dimension.
-
getIndicesForSurfaceIndices
(dim, surface_num, roi_indices)¶ Get the list of matrix indices corresponding to a given region on a mesh, for a given dimension.
Parameters: Returns: indices – list of indices in the matrix
Return type:
-
isMatchingSurface
()¶
-
isMatchingSurfaceOrTexture
()¶
-
isMatchingTexture
()¶
-
matrix
()¶
-
roiTextureFromDimension
(dim)¶ 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
()¶
-
setMatrix
()¶
-
valuesDimNum
()¶
-
valuesDimSize
()¶
-
-
class
ConeSamplable
¶ Bases:
soma.aimsalgo.Samplable_FLOAT_3
-
contains
()¶
-
-
class
Connectivity
¶ Bases:
sip.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¶
-
dir
()¶
-
nbNeighbors
()¶
-
offset
()¶
-
type
()¶
-
type_from_string
()¶
-
type_string
()¶
-
type_to_string
()¶
-
xyzOffset
()¶
-
-
class
CoordinatesFieldMeshInterpoler
¶ Bases:
soma.aims.MeshInterpoler
-
class
CurveSelection
¶ Bases:
soma.aims.BundleProducer
,soma.aims.BundleListener
-
addFiberPoint
()¶
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
startBundle
()¶
-
startFiber
()¶
-
terminateBundle
()¶
-
terminateFiber
()¶
-
-
class
CutMesh
¶ Bases:
sip.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
()¶
-
cut
()¶
-
cutBorder
()¶
-
cutMeshes
()¶
-
planeMesh
()¶
-
class
FastMarching
¶ Bases:
sip.wrapper
Fast marching algorithm implementation, for images.
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
()¶
-
doit
(vol, worklabel, inlabel, outlabel)¶ 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(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:
-
invSpeedMap
()¶
-
midInterface
(label1, label2)¶ 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 maust have taken place.
-
midInterfaceLabels
()¶ 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
(label1, label2)¶ 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 maust have taken place.
-
setInvSpeedMap
(invspeed)¶ 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
(speed)¶ 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
()¶
-
verbose
()¶
-
voronoiVol
()¶ get the resulting Voronoi regions (after propagation)
-
class
FastMarching_BucketMap_S16
¶ Bases:
sip.wrapper
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
()¶
-
doit
(vol, worklabel, inlabel, outlabel)¶ 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(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:
-
midInterface
(label1, label2)¶ 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 maust have taken place.
-
midInterfaceLabels
()¶ 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
(label1, label2)¶ 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 maust have taken place.
-
setInvSpeedMap
(invspeed)¶ Sets an initialized inverse speed map (overrides any previous speed map).
Parameters: invspeed (rc_ptr_BucketMap_FLOAT) –
-
setSpeedMap
(speed)¶ Sets an initialized speed map. The inverse speed will be deduced from it.
Parameters: speed (rc_ptr_BucketMap_FLOAT) –
-
setVerbose
()¶
-
verbose
()¶
-
voronoiVol
()¶ get the resulting Voronoi regions (after propagation)
-
class
FfdTransformation
(*args)¶ Bases:
soma.aims.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 AimsData_POINT3DF.
-
deformation
()¶
-
dimX
()¶
-
dimY
()¶
-
dimZ
()¶
-
ffdCoord
()¶
-
getCtrlKnot
()¶
-
increaseResolution
()¶
-
isFlat
()¶
-
isIdentity
()¶
-
isXFlat
()¶
-
isYFlat
()¶
-
isZFlat
()¶
-
printControlPointsGrid
()¶
-
sizeX
()¶
-
sizeY
()¶
-
sizeZ
()¶
-
transformDouble
()¶
-
transformFloat
()¶
-
transformPoint3d
()¶
-
transformPoint3dd
()¶
-
transformPoint3df
()¶
-
updateAllCtrlKnot
()¶
-
updateAllCtrlKnotFromDeformation
()¶
-
updateCtrlKnot
()¶
-
updateDimensions
()¶
-
write
()¶
-
writeDebugCtrlKnots
()¶
-
writeDebugDeformations
()¶
-
-
class
Finder
¶ Bases:
sip.wrapper
-
check
()¶
-
dataType
()¶
-
extensions
()¶
-
finderFormat
()¶
-
format
()¶
-
header
()¶
-
objectType
()¶
-
possibleDataTypes
()¶
-
registerFormat
()¶
-
setDataType
()¶
-
setHeader
()¶
-
setObjectType
()¶
-
setPossibleDataTypes
()¶
-
unregisterFormat
()¶
-
-
class
FoldArgOverSegment
¶ Bases:
sip.wrapper
-
dilateBucket
()¶
-
findSplitLine
()¶
-
printSplitInSkeleton
()¶
-
splitLineOnBucket
()¶
-
splitSimpleSurface
()¶
-
splitVertex
()¶
-
subdivizeGraph
()¶
-
subdivizeVertex
()¶
-
-
class
FoldGraphAttributes
¶ Bases:
sip.wrapper
-
cleanup
()¶
-
doAll
()¶
-
getBrainDepth
()¶
-
getBrainDepthGradX
()¶
-
getBrainDepthGradY
()¶
-
getBrainDepthGradZ
()¶
-
getDepth
()¶
-
getDepthfactor
()¶
-
getDilatedDepth
()¶
-
getDilatedDepthGradX
()¶
-
getDilatedDepthGradY
()¶
-
getDilatedDepthGradZ
()¶
-
getNDepth
()¶
-
greyAndCSFVolumes
()¶
-
makeCorticalRelationAttributes
()¶
-
makeGlobalAttributes
()¶
-
makeJunctionAttributes
()¶
-
makeMeshes
()¶
-
makePliDePassageAttributes
()¶
-
makeSimpleSurfaceAttributes
()¶
-
makeSummaryGlobalAttributes
()¶
-
maxThreads
()¶
-
mesher
()¶
-
prepareBrainDepthMap
()¶
-
prepareDepthMap
()¶
-
rebuildCorticalRelations
()¶
-
setMaxThreads
()¶ 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
()¶
-
-
class
GeodesicPath
¶ Bases:
sip.wrapper
Geodesic paths or distance maps, using the Dijkstra algorithm
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')
It is possible to get distance maps, or paths between two or more points.
-
distanceMap_1_N_ind
()¶ 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:
-
longestPath_1_N_ind
(source, targets, type_distance)¶ Parameters: - source (unsigned) –
- targets (vector_U32) –
- type_distance (int) –
Returns: - target (unsigned)
- length (float)
-
longestPath_N_N_ind
(points, type_distance)¶ Parameters: - points (vector_U32) –
- type_distance (int) –
Returns: - s (int)
- d (int)
- length (float)
-
shortestPath_1_1_1_ind
(source, middle, target)¶ Parameters: - source (unsigned) –
- middle (unsigned) –
- target (unsigned) –
Returns: path
Return type:
-
shortestPath_1_1_ind
(source, target)¶ Parameters: - source (unsigned) –
- target (unsigned) –
- source –
- target –
- subset (TimeTexture_S16) –
Returns: - path (vector_U32)
- shortestPath_1_1_ind(source, target, subset)
Returns: path
Return type:
-
shortestPath_1_1_ind_xyz
(source, target, indice, coord3D)¶ Parameters: - source (unsigned) –
- target (unsigned) –
- indice (vector_U32 (output)) –
- coord3D (vector_POINT3DF (output)) –
-
shortestPath_1_1_len
(source, target)¶ Parameters: - source (unsigned) –
- target (unsigned) –
Returns: length
Return type:
-
shortestPath_1_1_tex
(source, target, texturevalue, tex)¶ Parameters: - source (unsigned) –
- target (unsigned) –
- texturevalue (float) –
- tex (TimeTexture_S16 (output)) –
-
shortestPath_1_N_ind
(source, targets)¶ Parameters: - source (unsigned) –
- targets (vector_U32) –
Returns: - target (unsigned)
- length (float)
-
-
class
GradientAdvection
¶ Bases:
sip.wrapper
-
descend_scalar_field
()¶
-
doit
()¶
-
propagate_all_labels
()¶
-
setPropagationThreshold
()¶
-
setVerbose
()¶
-
-
class
GraphManip
¶ Bases:
sip.wrapper
-
attributeColor
()¶
-
buckets2Volume
()¶
-
completeGraph
()¶
-
setAttributeColor
()¶
-
storeAims
()¶
-
storeTalairach
()¶
-
talairach
()¶
-
volume2Buckets
()¶
-
-
class
HarmonicCageMeshResampler
¶ Bases:
sip.wrapper
-
computeCoordinates
()¶
-
coordinate
()¶
-
coordinates
()¶
-
getControl
()¶
-
get_image_coords
()¶
-
moveControl
()¶
-
set_keep_image_coords
()¶
-
-
class
Hierarchy
(*args)¶ Bases:
soma.aims.Tree
-
find
(name)¶
-
find_color
(name, default_color=<type 'exceptions.KeyError'>)¶
-
hasSyntax
()¶
-
next
()¶
-
setSyntax
()¶
-
-
class
MaskIterator
(*args)¶ Bases:
soma.aims.RCObject
-
contains
()¶
-
isValid
()¶
-
next
()¶
-
regionName
()¶
-
restart
()¶
-
value
()¶
-
valueMillimeters
()¶
-
volumeDimension
()¶
-
voxelSize
()¶
-
-
class
MeshInterpoler
¶ Bases:
sip.wrapper
-
Linear
= 0¶
-
NearestNeighbour
= 1¶
-
project
()¶
-
projectedTriCoord1
()¶
-
projectedTriCoord2
()¶
-
projectedTriCoord3
()¶
-
projectedTriangles
()¶
-
reloadProjectionParams
()¶
-
resampleMesh
()¶
-
resampleTexture
()¶
-
setDiscontinuityThresholds
()¶
-
setMeshes
()¶
-
-
class
PointsDistribution
¶ Bases:
sip.wrapper
Points repartition using forces in a given geometry (on a sphere for instance).
adapted from: http://www.nicoptere.net/blog/index.php/2008/09/20/50-distribution-points-sphere-actionscript http://www.nicoptere.net/AS3/distribution/Distribute.as
Points are moved according to forces, using an energy minimization method.
A few parameters have been added, to allow fitting spheres, or “free” geometries and forces.
Linked points can be defined, with different force behaviours.
-
class
CoulombAndRestoringForce
¶ Bases:
soma.aims.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
()¶
-
force
()¶
-
-
class
CoulombForce
¶ Bases:
soma.aims.ForceFunction
Utility function for sphere_distribution.
Individual Coulomb force between 2 points
-
energy
()¶ Coulomb energy of the force between 2 points (1/r)
-
force
()¶ Coulomb electrostatic force between 2 points (r_vec/r^3)
-
-
class
ForceFunction
¶ Bases:
sip.wrapper
Utility force class for sphere_distribution.
Individual force and energy between 2 points
-
energy
()¶ Energy of the force between 2 points
Energy functions are the integral of corresponding forces - they are used to drive the minimization.
-
-
class
MoveConstraints
¶ Bases:
sip.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…)
-
class
SphereMove
¶ Bases:
soma.aims.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
()¶
-
-
distribute
(pts, nsteps=100, step=0.01)¶ 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)) –
- nsteps=100, step=0.01) (distribute(npoints,) –
- as above but point are randomly initialized on a sphere, (Same) –
- the init_points() function (using) –
-
get_coulomb_energy
()¶
-
get_forces
()¶
-
init_points
(npoints)¶ 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
(force)¶ Set the individual force function
Parameters: force (aims.PointsDistribution.ForceFunction instance) –
-
setMoveConstraints
(move_constaint)¶ Set the individual move constraints function
Parameters: move_constaint (aims.PointsDistribution.MoveConstraints instance) –
-
set_links
(links)¶ 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
-
class
Quaternion
¶ Bases:
sip.wrapper
-
angle
()¶
-
axis
()¶
-
buildFromMatrix
(m)¶ 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
()¶
-
compose
¶ x.__mul__(y) <==> x*y
-
fromAxis
()¶
-
inverse
()¶
-
norm
()¶
-
normalized
()¶
-
setVector
()¶
-
transform
()¶
-
transformInverse
()¶
-
vector
()¶
-
-
class
RegularBinnedHistogram_DOUBLE
¶ Bases:
soma.aimsalgo.Histogram_DOUBLE
-
bins
()¶
-
doit
()¶
-
maxDataValue
()¶
-
minDataValue
()¶
-
setBins
()¶
-
unique
()¶
-
-
class
RegularBinnedHistogram_FLOAT
¶ Bases:
soma.aimsalgo.Histogram_FLOAT
-
bins
()¶
-
doit
()¶
-
maxDataValue
()¶
-
minDataValue
()¶
-
setBins
()¶
-
unique
()¶
-
-
class
RegularBinnedHistogram_S16
¶ Bases:
soma.aimsalgo.Histogram_S16
-
bins
()¶
-
doit
()¶
-
maxDataValue
()¶
-
minDataValue
()¶
-
setBins
()¶
-
unique
()¶
-
-
class
RegularBinnedHistogram_S32
¶ Bases:
soma.aimsalgo.Histogram_S32
-
bins
()¶
-
doit
()¶
-
maxDataValue
()¶
-
minDataValue
()¶
-
setBins
()¶
-
unique
()¶
-
-
class
RegularBinnedHistogram_U16
¶ Bases:
soma.aimsalgo.Histogram_U16
-
bins
()¶
-
doit
()¶
-
maxDataValue
()¶
-
minDataValue
()¶
-
setBins
()¶
-
unique
()¶
-
-
class
RegularBinnedHistogram_U32
¶ Bases:
soma.aimsalgo.Histogram_U32
-
bins
()¶
-
doit
()¶
-
maxDataValue
()¶
-
minDataValue
()¶
-
setBins
()¶
-
unique
()¶
-
-
class
RegularBinnedHistogram_U8
¶ Bases:
soma.aimsalgo.Histogram_U8
-
bins
()¶
-
doit
()¶
-
maxDataValue
()¶
-
minDataValue
()¶
-
setBins
()¶
-
unique
()¶
-
-
class
ResamplerFactory_DOUBLE
¶ Bases:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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:
sip.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¶
-
SeventhOrder
= 7¶
-
SixthOrder
= 6¶
-
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
¶ Bases:
sip.wrapper
-
diff
()¶
-
globalStats
()¶
-
graph2LabelVolume
()¶
-
mismatch_bucket
()¶
-
roiNames
()¶
-
roiNamesInv
()¶
-
statsByLabel
()¶
-
writeCSV
()¶
-
-
class
RoiIterator
(*args)¶ Bases:
soma.aims.RCObject
-
count
()¶
-
isValid
()¶
-
maskIterator
()¶
-
next
()¶
-
regionName
()¶
-
restart
()¶
-
setRegionNameAttributes
(attributes)¶ 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.
-
-
class
SimpleBundlesSlicer
¶ Bases:
soma.aims.BundlesSlicer
-
bundleStarted
(producer, bundle_info)¶
-
bundleTerminated
(producer, bundle_info)¶
-
fiberStarted
(producer, bundle_info, fiber_info)¶
-
fiberTerminated
(producer, bundle_info, fiber_info)¶
-
newFiberPoint
(producer, bundle_info, fiber_info, point)¶
-
noMoreBundle
(producer)¶
-
-
class
Spam
¶ Bases:
soma.aims.SpamBase
-
class
SpamBase
¶ Bases:
sip.wrapper
-
prodlikelihoods
()¶
-
set_bb_talairach_offset
()¶
-
set_bb_talairach_size
()¶
-
set_img_density
()¶
-
-
class
SpamFromLikelihood
¶ Bases:
soma.aims.SpamBase
-
class
SparseMatrix
(*args)¶ Bases:
soma.aims.RCObject
-
erase_element
()¶
-
fill
()¶
-
getColumn
()¶
-
getComposition
()¶
-
getNonZeroElementCount
()¶
-
getRow
()¶
-
getSize1
()¶
-
getSize2
()¶
-
getTrace
()¶
-
getTransposition
()¶
-
hasElement
()¶
-
header
()¶
-
isSquare
()¶
-
read
()¶
-
reallocate
()¶
-
setColumn
()¶
-
setDiagonal
()¶
-
setIdentity
()¶
-
setRow
()¶
-
setZero
()¶
-
transpose
()¶
-
write
()¶
-
-
class
SparseOrDenseMatrix
(*args)¶ Bases:
soma.aims.RCObject
-
asDense
()¶
-
asSparse
()¶
-
denseMatrix
()¶
-
erase_element
()¶
-
freeColumn
()¶
-
freeRow
()¶
-
getColumn
()¶
-
getNonZeroElementCount
()¶
-
getRow
()¶
-
getSize
()¶
-
getSize1
()¶
-
getSize2
()¶
-
hasElement
()¶
-
header
()¶
-
isDense
()¶
-
isOptimalShape
()¶
-
muteToDense
()¶
-
muteToOptimalShape
()¶
-
muteToSparse
()¶
-
read
()¶
-
readAll
()¶
-
readColumn
()¶
-
readRow
()¶
-
reallocate
()¶
-
setColumn
()¶
-
setHeader
()¶
-
setMatrix
()¶
-
setRow
()¶
-
set_element
()¶
-
sparseMatrix
()¶
-
subMatrix
()¶
-
write
()¶
-
-
class
SphereSamplable
¶ Bases:
soma.aimsalgo.Samplable_FLOAT_3
-
contains
()¶
-
-
class
SplineFfd
(*args)¶ Bases:
soma.aims.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 AimsData_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.
-
spline3
()¶
-
transformDouble
()¶
-
transformFloat
()¶
-
transformPoint3d
()¶
-
transformPoint3dd
()¶
-
transformPoint3df
()¶
-
-
class
StandardReferentials
¶ Bases:
sip.wrapper
-
acPcReferential
()¶
-
acPcReferentialID
()¶
-
commonScannerBasedReferential
()¶
-
commonScannerBasedReferentialID
()¶
-
mniTemplateReferential
()¶
-
mniTemplateReferentialID
()¶
-
talairachReferential
()¶
-
-
class
SurfaceGenerator
¶ Bases:
sip.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
()¶ static arrow( dictionary ) See the description() and printDescription() methods for more information. static arrow( Point3df arrowhead, Point3df base, float headradius, float arrowradius, unsigned nfaces, float arrowlengthfactor )
-
circle_wireframe
()¶ - 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
()¶ static cone( dictionary ) See the description() and printDescription() methods for more information. static cone( Point3df arrowhead, Point3df base, float radius, unsigned nfaces, bool closed, bool smooth=False )
-
cube
()¶ static cube( dictionary ) See the description() and printDescription() methods for more information. static cube( Point3df center, float radius, bool smoothnormals=False )
-
cylinder
()¶ static cylinder( dictionary ) See the description() and printDescription() methods for more information. static cylinder( Point3df center1, Point3df center2, float radius1, float radius2, unsigned nfaces, bool closed, bool smooth=False )
-
description
()¶
-
description_wireframe
()¶
-
ellipse
()¶ static ellipse( dictionary ) See the description() and printDescription() methods for more information. static ellipse( Point3df center, float radius1, float radius2, unsigned nfaces, bool uniquevertices=False )
-
generate
()¶
-
generate_wireframe
()¶
-
grid
(dict)¶ See the description() and printDescription() methods for more information. grid(Point3df boundingbox_min, Point3df boundingbox_max, Point3df grid_sampling) Regular, wireframe grid
-
icosahedron
()¶ static icosahedron( dictionary ) See the description() and printDescription() methods for more information. static icosahedron( Point3df center, float radius )
-
icosphere
(dictionary)¶ See the description() and printDescription() methods for more information. 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
(boundingbox_min, boundingbox_max, smooth=False)¶ Parameters:
-
parallelepiped_wireframe
(Point3df boundingbox_min, Point3df boundingbox_max)¶
-
printDescription
()¶
-
printDescription_wireframe
()¶
-
sphere
()¶ static sphere( dictionary ) See the description() and printDescription() methods for more information. static sphere( Point3df center, float radius, unsigned nfaces, bool uniquevertices=False )
-
class
SurfaceManip
¶ Bases:
sip.wrapper
Surface Manipulation Object. All mehtods are static in this class, it is just a means of grouping functions.
-
checkMeshIntersect
()¶
-
cutMesh
(in_mesh, plane, cut_mesh, border_line)¶ 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
Returns: Return type:
-
invertSurfacePolygons
(mesh)¶ 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.
-
lineDirections
(segments_mesh)¶ calculate directions of a line mesh, for each vertex
Parameters: segments_mesh (AimsTimeSurface_2_VOID) – Returns: directions Return type: vector_POINT3DF
-
meshArea
()¶ Surface area of a triangular mesh, in mm^2
-
meshDensity
(mesh, as_distance=False)¶ 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:
-
meshEdgeLengthRatioTexture
(numerator_mesh, denominator_mesh)¶ 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:
-
meshExtract
(mesh, texture, label_value)¶ 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
(input_output_mesh, input_mesh)¶ Concatenates the second mesh to the first one. The first argument will be modified.
Parameters: - input_output_mesh (AimsTimeSurface_3_VOID) – first mesh. Will be modified to be the output.
- input_mesh (AimsTimeSurface_3_VOID) – second mesh to be appended to the first one.
Returns: Return type:
-
meshPlanarPolygon
(plane, polygon)¶ 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:
-
meshTextureBoundary
(mesh, label_texture, region_value)¶ 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: - mesh (AimsSurfaceTriangle) – input mesh to extract boundary on
- label_texture (TimeTexture_S16, TimeTexture_S32, or TimeTexture_FLOAT) – label texture defining regions on the mesh
- region_value (int16, int32 or float) – label of the desired region
Returns: boundary – output segments mesh (filar mesh) for the boundary
Return type:
-
meshTransform
(mesh, transformation)¶ Apply linear coordinates transformation to a mesh. The input mesh will be modified in-place.
Parameters: - mesh (AimsTimeSurface_3_VOID or AimsTimeSurface_2_VOID) – mesh to be transformed. Will be modified.
- transformation (AffineTransformation3d) – Linear transformation matrix
Returns: Return type:
-
meshVolume
(mesh)¶ 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
()¶
-
rasterizeMesh
(mesh, volume, value=2)¶ 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, volume, value=1)¶ 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
-
refineMeshTri4
(mesh, selected_polygons=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:
-
sortPolygonsAlongDirection
(mesh, timestep, direction)¶ 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) –
- timestep, direction) (sortPolygonsAlongDirection(mesh,) –
- polygons along a given direction. (Sort) –
- centers will be used for sorting. Only one timestep is performed (to be fast) (Polygons) –
- mesh – The mesh will be modified.
- timestep –
- direction –
- timestep, direction) –
- polygons along a given direction. –
- centers will be used for sorting. Only one timestep is performed (to be fast) –
- mesh – The mesh will be modified.
- timestep –
- direction –
-
surfaceNeighbours
()¶
-
-
class
TrilinearFfd
(*args)¶ Bases:
soma.aims.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.
-
transformDouble
()¶
-
transformFloat
()¶
-
transformPoint3d
()¶
-
transformPoint3dd
()¶
-
transformPoint3df
()¶
-
-
floodFill
()¶
-
getLinearInterpolator
()¶
-
getMaskIterator
()¶
-
getRoiIterator
()¶
-
giftiColormap
()¶
-
mask
()¶
-
maskWithVolume
()¶
-
class
meshdistance
¶ Bases:
sip.simplewrapper
-
MeshDilation
()¶
-
MeshDistance
()¶
-
MeshErosion
()¶
-
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: - mesh (AimsSurfaceTriangle) –
- inittex (TimeTexture_S16) –
- background (short) –
- forbidden (short) –
- dist (float) –
- connexity (bool) –
- object (bool) –
Returns: voronoi_texture
Return type:
-
MeshVoronoiStepbyStep
()¶
-
-
textureMax
()¶
-
transformBoundingBox
()¶
-
class
-
class
soma.aims.
carto
¶ Bases:
sip.simplewrapper
-
class
AllocatorContext
¶ Bases:
sip.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
()¶
-
allocatorType
()¶
-
allowsMemoryMapping
()¶
-
dataSource
()¶
-
dataSourceInfo
()¶
-
isAllocated
()¶
-
setAccessMode
()¶
-
setAllowsMemoryMapping
()¶
-
setDataSource
()¶
-
setDataSourceInfo
()¶
-
setUseFactor
()¶
-
useFactor
()¶
-
-
class
AllocatorStrategy
¶ Bases:
sip.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
()¶ 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
FormatDictionary_AffineTransformation3d
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_CDOUBLE
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_CFLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_DOUBLE
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_FLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_HSV
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_POINT3DF
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_RGB
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_RGBA
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_S16
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_S32
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_U16
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_U32
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsData_U8
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_2_FLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_2_POINT2DF
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_2_VOID
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_3_FLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_3_POINT2DF
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_3_VOID
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_4_FLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_4_POINT2DF
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_AimsTimeSurface_4_VOID
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_BucketMap_DOUBLE
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_BucketMap_FLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_BucketMap_S16
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_BucketMap_S32
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_BucketMap_U16
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_BucketMap_U32
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_BucketMap_VOID
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Graph
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Hierarchy
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Object
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_SparseMatrix
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_SparseOrDenseMatrix
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_TimeTexture_DOUBLE
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_TimeTexture_FLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_TimeTexture_POINT2DF
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_TimeTexture_S16
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_TimeTexture_S32
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_TimeTexture_U32
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_CDOUBLE
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_CFLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_DOUBLE
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_FLOAT
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_HSV
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_POINT3DF
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_RGB
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_RGBA
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_S16
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_S32
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_U16
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_U32
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
FormatDictionary_Volume_U8
¶ Bases:
sip.wrapper
-
readExtensions
()¶
-
readFormats
()¶
-
writeExtensions
()¶
-
writeFormats
()¶
-
-
class
GenericObject
(*args)¶ Bases:
soma.aims.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
()¶
-
currentValue
()¶
-
get
()¶
-
getScalar
()¶
-
getString
()¶
-
getSyntax
()¶
-
hasSyntax
()¶
-
has_key
()¶
-
index
()¶
-
intKey
()¶
-
isArray
()¶
-
isDictionary
()¶
-
isDictionaryIterator
()¶
-
isDynArray
()¶
-
isIterable
()¶
-
isIterator
()¶
-
isNone
()¶
-
isScalar
()¶
-
isString
()¶
-
isValid
()¶
-
items
()¶
-
iteritems
()¶
-
iterkeys
()¶
-
itervalues
()¶
-
key
()¶
-
keys
()¶
-
next
()¶
-
objectIterator
()¶
-
setSyntax
()¶
-
size
()¶
-
type
()¶
-
update
(x)¶
-
values
()¶
-
-
class
IOObjectTypesDictionary
¶ Bases:
sip.wrapper
-
hasReadType
()¶
-
hasWriteType
()¶
-
readTypes
()¶
-
writeTypes
()¶
-
-
class
Info
¶ Bases:
sip.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
()¶ Static method. Get a list of Info objects, each library may provide one (or several).
-
printBuiltins
()¶ 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
()¶ Print on the standard output additional information (such as IO properties, settings options, etc).
-
printPaths
()¶ Print on the standard output configured data paths.
-
printVersion
()¶ Print on the standard output the library version.
-
printVersions
()¶ Static method. Print versions of libraries
-
-
class
Object
¶ Bases:
soma.aims.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, andhdr
its header, of typeObject
.>>> 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 typePyObject
(orPyString
). 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 typestd::vector<float>
, so writing tohdr['voxel_size'][0]
needs to enure we are actually writing afloat
, 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
theget
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, aGenericObject
) - 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()
andrc_ptr.get()
have been renamed_get()
years ago (in aims 4.0 I think) butget()
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
()¶
-
next
()¶
-
static
ptrToObject
(x)¶
-
static
rcToObject
(x)¶
-
static
toObject
(x)¶
-
class
Paths
¶ Bases:
sip.simplewrapper
-
findResourceFile
()¶
-
findResourceFiles
()¶
-
home
()¶
-
memmap
()¶
-
resourceSearchPath
()¶
-
tempDir
()¶
-
-
class
PropertySet
¶ Bases:
sip.wrapper
-
clearProperties
()¶
-
copyBuiltinProperties
()¶
-
getProperty
()¶
-
hasProperty
()¶
-
objectIterator
()¶
-
removeProperty
()¶
-
setProperty
()¶
-
size
()¶
-
-
PyObjectfromObject
()¶
-
class
RCObject
(*args)¶ Bases:
sip.wrapper
-
class
Roi
(*args)¶ Bases:
soma.aims.Headered
Bases:
soma.aims.RCObject
-
debugMessageLevel
()¶
-
class
fdinhibitor
¶ Bases:
sip.wrapper
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
¶ Bases:
sip.wrapper
-
close
()¶
-
hasResetCallback
()¶
-
notify
()¶
-
open
()¶
-
registerResetCallback
()¶
-
unregisterResetCallback
()¶
-
class
-
none
()¶ Returns a null aims.Object
-
class
rc_ptr_MaskIterator
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
rc_ptr_RoiIterator
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
setDebugMessageLevel
()¶
-
setVerbose
()¶
-
verbose
()¶
-
class
-
soma.aims.
convertersObjectToPython
= {'POINT2DF': <built-in function fromObject>, 'POINT3DF': <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 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> at 0x7f7ca3afb6d0>}¶ 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.
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
andtransformations
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:
-
class
soma.aims.
list_DOUBLE
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_FLOAT
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_GraphPtr
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_POINT3D
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_POINT3DF
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_PluginFile
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_STRING
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_rc_ptr_Graph
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_vector_POINT3DF
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
list_vector_STRING
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
size
()¶
-
-
class
soma.aims.
pyaims
¶ Bases:
sip.simplewrapper
-
class
DebuggingVolume
(*args)¶ Bases:
soma.aims.Volume_S16
-
created
= False¶
-
deleted
= False¶
-
-
class
-
soma.aims.
range
¶ alias of
__builtin__.xrange
-
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
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_BOOL
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_CDOUBLE
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_CFLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_DOUBLE
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_FLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_HSV
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_POINT3DF
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_RGB
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_RGBA
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_S16
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_S32
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_U16
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_U32
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsData_U8
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
soma.aims.
rc_ptr_AimsTimeSurface_2
¶
-
class
soma.aims.
rc_ptr_AimsTimeSurface_2_FLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsTimeSurface_2_POINT2DF
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsTimeSurface_2_VOID
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
soma.aims.
rc_ptr_AimsTimeSurface_3
¶
-
class
soma.aims.
rc_ptr_AimsTimeSurface_3_FLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsTimeSurface_3_POINT2DF
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsTimeSurface_3_VOID
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
soma.aims.
rc_ptr_AimsTimeSurface_4
¶
-
class
soma.aims.
rc_ptr_AimsTimeSurface_4_FLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsTimeSurface_4_POINT2DF
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_AimsTimeSurface_4_VOID
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_BucketMap_DOUBLE
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_BucketMap_FLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_BucketMap_S16
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_BucketMap_S32
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_BucketMap_U16
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_BucketMap_U32
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_BucketMap_VOID
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_DataSource
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_DataSourceInfo
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_GenericObject
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Graph
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Interpolator
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Site
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_SiteIterator
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_SparseMatrix
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_SparseOrDenseMatrix
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_TimeTexture_DOUBLE
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_TimeTexture_FLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_TimeTexture_POINT2DF
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_TimeTexture_S16
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_TimeTexture_S32
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_TimeTexture_U32
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Transformation3d
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Tree
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_BOOL
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_CDOUBLE
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_CFLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_DOUBLE
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_FLOAT
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_HSV
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_POINT3DF
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_RGB
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_RGBA
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_S16
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_S32
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_U16
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_U32
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
class
soma.aims.
rc_ptr_Volume_U8
¶ Bases:
sip.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
()¶
-
release
()¶
-
reset
()¶
-
-
soma.aims.
read
(filename, border=0, frame=-1, dtype=None, allocmode=None, options=None)[source]¶ Equivalent to:
r = Reader( allocmode=allocmode, options=options ) return r.read( filename, border=border, frame=frame, dtype=dtype )
-
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
orAimsData
), 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
objectthe converted transformation
-
class
soma.aims.
soma
¶ Bases:
sip.simplewrapper
-
class
DataSource
(*args)¶ Bases:
soma.aims.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¶
-
Read
= 1¶
-
ReadWrite
= 3¶
-
SequentialAccess
= 2¶
-
Write
= 2¶
-
allowsMemoryMapping
()¶ returns True if memory mapping is allowed on this kind of stream
-
at
()¶ offset = at()
returns the current position in the stream bool at(pos)
Sets the current position in the stream (when supported). Returns True if successful.
-
atEnd
()¶ True if the current position is at the end of the stream
-
clone
()¶ duplicate the DataSource object
-
close
()¶ Close the stream
-
eof
()¶ when the end of stream is reached
-
flush
()¶ flush the stream for buffered output
-
getch
()¶ read one char and returns it
-
isOpen
()¶ tells if the stream is open / ok.
-
iterateMode
()¶ bitwise combination of possible access: direct (1) or sequential (2) access
-
mode
()¶ access mode(s) (read/write): bitwise OR of Mode values
-
none
()¶ An empty ref-counter that is more convenient than calling a constructor of rc_ptr_DataSource (useful when calling functions)
-
open
(mode)¶ 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
-
readBlock
(data, maxlen)¶ 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
()¶ reset the stream and get to the start
-
size
()¶ size (or len) of the data inn stream, in bytes
-
ungetch
(ch)¶ un-read one char: put it back in the read buffer, and rewind one char
-
url
()¶ URL of filename for the stream, when available
-
writeBlock
(data, len)¶ 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
DataSourceInfo
¶ Bases:
sip.wrapper
Informative object used by IO system
This object is used by FormatChecker, FormatReader or FormatWriter to describe a DataSource. It contains a DataSourceList which contains at first a single default DataSource, a Object header and a DataSourceCapabilities.
- The list is built by a FormatChecker and contains all the files involved in the reading/writing process (header, data, …)
- The header is built by a FormatChecker and contains meta information.
- The DSC contains properties dependant of the format, the specific file, the reading process (partial reading), etc.
It is possible to fix some or all of these three objects so that they are not recomputed by the FormatChecker.
see DataSourceInfoLoader DataSourceList DataSourceCapabilities
-
header
()¶ get the header dict of the underlying data
-
identifiedFormat
()¶ file format name
-
list
()¶ get the DataSourceList of the underlying data
-
setIdentifiedFormat
(format)¶ force the identified format name
-
url
()¶ main filename or URL
-
class
DataSourceInfoLoader
¶ Bases:
sip.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¶
-
Unchecked
= 0¶
-
check
(dsi, options=aims.carto.none(), passbegin=1, passend=3)¶ 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.
-
errorMessage
()¶ error message from the last check
-
extensions
(format)¶ Query supported file extensions for a format
Parameters: format (string) – format to query Returns: exts – set of extensions names Return type: set_STRING
-
launchException
()¶ raise the read exception which was most probably the cause of a check() failure
-
readMinf
(ds, base=aims.none(), options=aims.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:
-
state
()¶ state of the DataSourceInfoLoader reading trial
-
-
class
DataSourceList
¶ Bases:
sip.wrapper
This class allows to manipulate “lists” of pointers to DataSource.
It has the design of a dictionary in order to sort sources by content (header, minf, data, …). Since those contents depend on the format, the keywords used are defined by specific checkers and readers.
see FormatChecker FormatReader
The only global keyword is “default” which is used to store the DataSource defining (at construction) a reader.
see Reader
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.
Access to a source is done using dataSource(…) methods. Sources are ordered by increasing order of insertion and numbering starts at 0.
-
addDataSource
(key, ds)¶ Adds an element to the dictionary If new keyword, creates it.
Parameters: - key (string) – keyword
- ds (rc_ptr_DataSource) – DataSource to be added
-
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:
-
empty
()¶ Returns true only if no keyword inserted.
Warning
May return false while no DataSource present True if there is no key in the dictionary
-
exists
(key)¶ True if the key exists in the dictionary
-
reset
()¶ clear the dictionary: all keys and contents are removed.
-
size
(key)¶ number of elements with the key key
-
typecount
()¶ number of keys in the types dictionary
-
types
()¶ Returns existing keywords.
Warning
There may be existing keywords with no DataSource
-
-
class
FDDataSource
(*args)¶ Bases:
soma.aims.DataSource
DataSource specialization for file descriptor stream
-
allowsMemoryMapping
()¶
-
at
()¶
-
clone
()¶
-
close
()¶
-
descriptor
()¶ get the file descriptor
-
getch
()¶
-
isFile
()¶ True if the DataSource is a file
-
isOpen
()¶
-
iterateMode
()¶
-
open
()¶
-
putch
()¶
-
readBlock
()¶
-
setDescriptor
(fd)¶ Set the file descriptor fd (int)
-
size
()¶
-
ungetch
()¶
-
writeBlock
()¶
-
-
class
FileDataSource
(*args)¶ Bases:
soma.aims.DataSource
DataSource specialization for a file.
-
allowsMemoryMapping
()¶
-
at
()¶
-
clone
()¶
-
close
()¶
-
getch
()¶
-
initialOffset
()¶ initial offset in the input file to start reading
-
isOpen
()¶
-
iterateMode
()¶
-
open
()¶
-
putch
()¶
-
readBlock
()¶
-
size
()¶
-
ungetch
()¶
-
url
()¶ file name or URL of the file
-
writeBlock
()¶
-
-
class
Reader_Object
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: carto::Object, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_CDOUBLE
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_CDOUBLE, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_CFLOAT
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_CFLOAT, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_DOUBLE
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_DOUBLE, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_FLOAT
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_FLOAT, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_HSV
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_HSV, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_POINT3DF
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_POINT3DF, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_RGB
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_RGB, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_RGBA
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_RGBA, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_S16
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_S16, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_S32
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_S32, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_U16
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_U16, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_U32
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_U32, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Reader_Volume_U8
¶ Bases:
sip.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
()¶ Get the allocation context
-
attach
(ds)¶ Attach a DataSource to read from (rc_ptr_DataSource) attach(filename, offset=0)
Attach a new filename + offset for reading
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
dataSourceInfo
()¶ Get the dataSourceInfo, providing information on the read data
-
flush
()¶ Flush the read buffer
-
options
()¶ Get reading options (Object dictionary)
-
read
()¶ 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: - or header (obj) – in-place mode: Volume_U8, object to be read. OR: full mode: header (Object), optional
- header (Object (optional)) –
- 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
-
setAllocatorContext
(context)¶ Set allocation context for reading
-
setOptions
(options)¶ set reading options (Object dictionary)
-
class
Transformation
(*args)¶ Bases:
soma.aims.RCObject
Base class for spatial transformations.
-
isIdentity
()¶ 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.
-
-
class
Transformation3d
(*args)¶ Bases:
soma.aims.Transformation
Base class for spatial transformations in 3D.
-
transform
()¶
-
transformDouble
()¶
-
transformFloat
()¶
-
transformPoint3d
()¶
-
transformPoint3dd
()¶
-
transformPoint3df
()¶
-
transformPoints
()¶
-
-
class
Writer_Object
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_CDOUBLE
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_CFLOAT
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_DOUBLE
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_FLOAT
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_HSV
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_POINT3DF
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_RGB
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_RGBA
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_S16
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_S32
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_U16
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_U32
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
Writer_Volume_U8
¶ Bases:
sip.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
(ds)¶ Attach a new data source (rc_ptr_DataSource) to write into attach(filename)
Attach a new output file name to write into
-
close
()¶ Close the data source stream
-
dataSource
()¶ Get the data source (rc_ptr_DataSource)
-
flush
()¶ flush the write buffer
-
write
()¶ 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)) –
Returns: Return type: True upon success, False upon failure, but an exception is more likely thrown in such case
-
writtenObjectType
()¶ After writing, get the object type code (string) of the data
-
class
-
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.
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
()¶
-
class
soma.aims.
vector_AimsVector_U32_2
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_AimsVector_U32_3
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_AimsVector_U32_4
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_DOUBLE
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_FLOAT
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_POINT2DF
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_POINT3D
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_POINT3DD
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_POINT3DF
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_S16
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_S32
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_STRING
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_U16
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_U32
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_U8
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_ULONG
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_ULONGLONG
¶ Bases:
sip.wrapper
-
append
()¶
-
array_struct
()¶ 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
()¶
-
assign
()¶
-
checkResize
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
np
¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_VOID
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_rc_ptr_AimsTimeSurface_3_VOID
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_set_U32
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_vector_FLOAT
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_vector_POINT3DF
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_vector_S32
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
class
soma.aims.
vector_vector_STRING
¶ Bases:
sip.wrapper
-
append
()¶
-
assign
()¶
-
fromObject
()¶
-
index
()¶
-
list
()¶
-
remove
()¶
-
resize
()¶
-
size
()¶
-
toObject
()¶
-
-
soma.aims.
version
()¶ AIMS / Cartobase version, as a 2-digit tuple
-
soma.aims.
versionString
()¶ 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
()¶