PyAims programming documentation¶
Overview¶
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
Tutorial¶
There is a PyAims tutorial available as a Jupyter/Ipython notebook:
Contents¶
- PyAims high-level functions and classes
- PyAims low-level classes and functions
- PyAims basic algorithms
- PyAims examples
- PyAims advanced examples
- PyAimsAlgo programming documentation
- Module: soma.aims
- Module: soma.aimsalgo
- PyAIMS submodules API
- SubModule:
apctools
- SubModule:
colormaphints
- SubModule:
filetools
- SubModule:
fslTransformation
- SubModule:
graph_comparison
- SubModule:
lazy_read_data
- SubModule:
meshSplit
- SubModule:
pandas
- SubModule:
spmnormalizationreader
- SubModule:
texturetools
- SubModule:
volumetools
- SubModule:
aimsalgo.lazy_resample_volume
- SubModule:
aimsalgo.mesh_coordinates_sphere_resampling
- SubModule:
aimsalgo.meshwatershedtools
- SubModule:
aimsalgo.polyfit
- SubModule:
aimsalgo.t1mapping