Table of Contents
Anatomist is written in C++ language but has also a python API: PyAnatomist. This python API enables to drive Anatomist application through python scripts : using Anatomist, loading volumes, meshes, graphs, viewing them in windows, merging objects, changing color palettes, etc... It can be useful in order to automate a repetitive visualization task or to add features to Anatomist application by developping a python plugin, which is much more easier than developping directly in Anatomist C++ library. Actually, several features in Anatomist have been added via a python plugin like the gradient palette for example. The python API is also used by several viewers in BrainVISA.
The main entry point is the Anatomist class which must be instantiated before any operation can be performed. It represents Anatomist application. This class contains a number of nested classes: AObject, AWindow... that represent the elements of Anatomist application.
The entry point of this API is the module anatomist.api, you can import it as below :
import anatomist.api as anatomist
And then create an instance of Anatomist :
a=anatomist.Anatomist()
So you can send commands to Anatomist application, for example creating a window :
window=a.createWindow('3D')