anatomist  5.1.2
3D neuroimaging data viewer
anatomist::AVolume< T > Class Template Reference

Volume object. More...

#include <anatomist/volume/Volume.h>

Inheritance diagram for anatomist::AVolume< T >:
Collaboration diagram for anatomist::AVolume< T >:

Public Member Functions

 AVolume (const std::string &filename="")
 
 AVolume (carto::rc_ptr< carto::Volume< T > >)
 
virtual ~AVolume ()
 
virtual AObjectclone (bool shallow=true)
 Makes a copy of the object, with a duplicated object structure, palette and material, but which may share the underlying low-level data object (Aims object). More...
 
float MinT () const
 Obsolete, deprecated. More...
 
float MaxT () const
 Obsolete, deprecated. More...
 
virtual bool boundingBox2D (std::vector< float > &bmin, std::vector< float > &bmax) const
 Bounding box in 2D views mode. More...
 
virtual bool boundingBox (std::vector< float > &bmin, std::vector< float > &bmax) const
 Fills bmin and bmax with the N-D bounding box extrema in the object's referential coordinates. More...
 
void SetExtrema ()
 Scans the object internals and determines its (texture) extrema values. More...
 
void adjustPalette ()
 Creates or updates object palette according to object values (if needed) More...
 
carto::rc_ptr< carto::Volume< T > > volume ()
 
const carto::rc_ptr< carto::Volume< T > > volume () const
 
virtual void setVolume (carto::rc_ptr< carto::Volume< T > > vol)
 
T & operator() (size_t x=0, size_t y=0, size_t z=0, size_t t=0)
 
const T & operator() (size_t x=0, size_t y=0, size_t z=0, size_t t=0) const
 
virtual bool update2DTexture (AImage &, const Point3df &posbase, const SliceViewState &, unsigned tex=0) const
 new API More...
 
virtual std::vector< float > voxelSize () const
 Returns at least 4 sizes. For 3D objects, returns (1, 1, 1, 1) More...
 
virtual void setVoxelSize (const std::vector< float > &vs)
 
float GetValue (Point3df pos, float time, Referential *winref, Geometry *wingeom)
 Retourne la valeur d'un voxel du volume. More...
 
bool Is2DObject ()
 Can be display in 2D windows. More...
 
bool textured2D () const
 true if 2D rendering uses a textured plane (not a full openGL object) More...
 
bool Is3DObject ()
 Can be display in 3D windows. More...
 
virtual bool isTransparent () const
 
virtual AObjectobjectAt (const std::vector< float > &pos, float tol=0)
 Not selectable: always returns Null. More...
 
virtual bool hasTexture () const
 Textured objects have values associated with a geometric coordinate. More...
 
virtual unsigned dimTexture () const
 Number of texture values for a point. More...
 
virtual float mixedTexValue (const std::vector< float > &pos) const
 Same as above except that coordinates are not transformed but taken in object coordinates system. More...
 
virtual std::vector< float > texValues (const std::vector< float > &pos) const
 
virtual carto::GenericObjectattributed ()
 
virtual const carto::GenericObjectattributed () const
 
virtual bool loadable () const
 
virtual bool savable () const
 
virtual bool reload (const std::string &filename)
 Re-reads objects from disk. More...
 
virtual bool save (const std::string &filename)
 
virtual std::string objectFullTypeName (void) const
 Get Object Full Type Name. More...
 
virtual bool printTalairachCoord (const Point3df &pos, const Referential *) const
 should be replaced by a real referential More...
 
virtual void setInternalsChanged ()
 Notifies some underlying lower-level objects have changed. More...
 
- Public Member Functions inherited from anatomist::AVolumeBase
 AVolumeBase ()
 
virtual ~AVolumeBase ()
 
virtual void setShaderParameters (const Shader &shader, const ViewState &state) const
 
- Public Member Functions inherited from anatomist::SliceableObject
 SliceableObject ()
 
virtual ~SliceableObject ()
 
virtual const GLComponentglAPI () const
 OpenGL objects const API. More...
 
virtual GLComponentglAPI ()
 OpenGL objects API. More...
 
virtual const SliceablesliceableAPI () const
 
virtual SliceablesliceableAPI ()
 
virtual std::vector< float > glVoxelSize () const
 
virtual std::vector< float > glMin2D () const
 
virtual std::vector< float > glMax2D () const
 
virtual void glSetChanged (glPart, bool=true) const
 
virtual void glSetTexImageChanged (bool x=true, unsigned tex=0) const
 
virtual void glSetTexEnvChanged (bool x=true, unsigned tex=0) const
 
virtual const MaterialglMaterial () const
 
virtual const AObjectPaletteglPalette (unsigned tex=0) const
 
const ReferentialgetReferential () const
 
- Public Member Functions inherited from anatomist::AObject
 AObject (const std::string &filename="")
 
virtual ~AObject ()
 AObject subclasses must call cleanup() in their destructor. More...
 
virtual const MObjectmObjectAPI () const
 
virtual MObjectmObjectAPI ()
 
int type () const
 Object type identifier. More...
 
void setType (int type)
 Method to set type id, because type() is not virtual. More...
 
int id () const
 Unique ID assigned upon construction, but somewhat unused now... More...
 
std::string name () const
 Name shown in control window. More...
 
std::string fileName () const
 File name (if any) for loaded objects. More...
 
void setName (const std::string &n)
 
void setFileName (const std::string &filename)
 
void setId (int id)
 
virtual int isMultiObject () const
 maybe not necessary ?: we can use dynamic_cast instead More...
 
virtual bool render (PrimList &, const ViewState &)
 rendering (generally 2D or 3D using OpenGL). More...
 
virtual void internalUpdate ()
 Updates the state of the object. More...
 
virtual AObjectPalettepalette ()
 Normally, getOrCreatePalette() should be used instead of this function in most cases. More...
 
virtual const AObjectPalettepalette () const
 
virtual void setPalette (const AObjectPalette &palette)
 
virtual const AObjectPalettegetOrCreatePalette () const
 User normally calls this function. More...
 
virtual void createDefaultPalette (const std::string &name="")
 function called by getOrCreatePalette() - overloadable, need not be called directly More...
 
virtual void SetMaterial (const Material &mat)
 
virtual MaterialGetMaterial ()
 
virtual const Materialmaterial () const
 
ReferentialgetReferential () const
 
AObjectreferentialInheritance () const
 if not null, the object referential is inherited from this object More...
 
virtual void setReferentialInheritance (AObject *ao)
 
virtual void setReferential (Referential *ref)
 
virtual AObjectfallbackReferentialInheritance () const
 object to take referential from when no ref is assigned More...
 
const ReferentialpreviousReferential () const
 Referential that the object was in before the last change. More...
 
virtual TreeoptionTree () const
 Menu tree for new options, see object/optionMatcher.h. More...
 
virtual ObjectMenuoptionMenu () const
 
int InMemory () const
 For objects loading only when needed (not used yet...) More...
 
int Visible () const
 Visibility in control window. More...
 
void SetVisibility (int v)
 
ParentListParents ()
 List of multi-objects containing this one. Obsolete: use parents() More...
 
ParentListparents ()
 List of multi-objects containing this one. More...
 
const ParentListparents () const
 List of multi-objects containing this one. More...
 
virtual void RegisterParent (MObject *pob)
 
virtual void UnregisterParent (MObject *pob)
 
const std::set< AWindow * > & WinList ()
 List of windows showing this object. More...
 
virtual void registerWindow (AWindow *window)
 
virtual void unregisterWindow (AWindow *window)
 
virtual bool IsFusion2DAllowed ()
 
virtual bool renderingIsObserverDependent () const
 true only if the rendering (openGL) of the object changes with the observer position/orientation of the view (which is rare, but typically needed for Volume Rendering) More...
 
virtual int CanBeDestroyed ()
 Allows / unallows destruction of object. More...
 
virtual void setReferenceChanged ()
 
bool hasReferenceChanged () const
 
virtual void clearHasChangedFlags () const
 Reset has-changed flags. More...
 
bool userModified () const
 if the object has been modified by user interaction, and needs saving More...
 
void setUserModified (bool state=true)
 if the object has been modified by user interaction, and needs saving More...
 
virtual AObjectobjectAt (const std::vector< float > &pos, float tol, const Referential *orgref, const Point3df &orggeom)
 Same with origin window referential. More...
 
virtual void setGeomExtrema ()
 Scans the object internals and determines its geometry extrema. More...
 
virtual float mixedTexValue (const std::vector< float > &pos, const Referential *orgRef) const
 Gets a "mixed" texture value at a given space / time location. More...
 
virtual std::vector< float > texValues (const std::vector< float > &pos, const Referential *orgRef) const
 Gets the array of texture values at a given location. More...
 
bool save (const std::string &filename, bool onlyIfModified)
 
void setHeaderOptions ()
 Set some object properties according to the header (.minf), such as material, palette etc. More...
 
virtual void setProperties (carto::Object options)
 Same as setHeaderOptions() and used by it, allows passing a dictionary. More...
 
virtual void storeHeaderOptions ()
 Store some object properties into the header (.minf), such as material, palette etc before saving the object. More...
 
virtual carto::Object makeHeaderOptions () const
 get object properties into a generic object, such as material, palette etc before saving the object More...
 
long loadDate () const
 Time the object was created, loaded or reloaded. More...
 
void setLoadDate (long t)
 
virtual void update (const Observable *observable, void *arg)
 This method is called whenever the observed object is changed. More...
 
bool isCopy () const
 
void setCopyFlag (bool x=true)
 
virtual std::string toolTip () const
 tooltip displayed in 3D views (HTML). More...
 
carto::Object aimsMeshFromGLComponent ()
 
- Public Member Functions inherited from anatomist::Observable
 Observable ()
 Construct an Observable with zero observers. More...
 
virtual ~Observable ()
 does nothing More...
 
void addObserver (Observer *observer)
 Adds an observer to the set of observers for this object. More...
 
void deleteObserver (Observer *observer)
 Deletes an observer from the set of observers of this object. More...
 
void deleteObservers ()
 Clears the observer list so that this object no longer has any observers (doesn't call any observer method - see notifyUnregisterObservers() for this ) More...
 
int countObservers () const
 Returns the number of observers of this object. More...
 
virtual void notifyObservers (void *arg=0)
 If this object has changed, as indicated by the hasChanged method, then notify all of its observers. More...
 
virtual void notifyUnregisterObservers ()
 Notifies observable destruction to all observers and unregisters them. More...
 
bool hasChanged () const
 Tests if this object has changed. More...
 
bool obsHasChanged (int) const
 only valid during an Observer::update() More...
 
bool obsHasChanged (const std::string &) const
 only valid during an Observer::update() More...
 
void setChanged () const
 Indicates that this object has changed. More...
 
- Public Member Functions inherited from carto::SharedObject
 SharedObject ()
 
 SharedObject (const SharedObject &x)
 
virtual ~SharedObject ()
 
SharedObjectoperator= (const SharedObject &)
 
bool testDeletable ()
 
bool tryDelete ()
 
- Public Member Functions inherited from carto::WeakObject
void attachWeakPtr (weak_ptr< T > &) const
 
void detachWeakPtr (weak_ptr< T > &) const
 
void attachWeakPtr (weak_shared_ptr< T > &) const
 
void detachWeakPtr (weak_shared_ptr< T > &) const
 
virtual ~WeakObject ()
 
- Public Member Functions inherited from carto::RCObject
 RCObject ()
 
 RCObject (const RCObject &)
 
RCObjectoperator= (const RCObject &)
 
virtual ~RCObject ()
 
- Public Member Functions inherited from anatomist::Observer
virtual ~Observer ()
 
- Public Member Functions inherited from anatomist::Sliceable
 Sliceable ()
 
virtual ~Sliceable ()
 
virtual unsigned glNumVertex (const ViewState &) const
 
virtual const GLfloat * glVertexArray (const ViewState &) const
 
virtual const GLfloat * glNormalArray (const ViewState &state) const
 normals array (optional), default=0 (no normals, flat shaded faces) More...
 
virtual unsigned glPolygonSize (const ViewState &) const
 number of vertices per polygon (default = 3: triangles) More...
 
virtual unsigned glNumPolygon (const ViewState &) const
 
virtual const GLuint * glPolygonArray (const ViewState &) const
 
virtual unsigned glDimTex (const ViewState &, unsigned tex=0) const
 texture dimension (1, 2 [or 3]) More...
 
virtual unsigned glTexCoordSize (const ViewState &, unsigned tex=0) const
 texture array size (must be >= numVertex to work), defalut=0 More...
 
virtual const GLfloat * glTexCoordArray (const ViewState &, unsigned tex=0) const
 
virtual carto::VolumeRef< AimsRGBAglBuildTexImage (const ViewState &state, unsigned tex, int dimx=-1, int dimy=-1, bool useTexScale=true) const
 If you make non-standard textures (ie not from a palette), overload this function. More...
 
virtual bool glMakeTexImage (const ViewState &state, const GLTexture &gltex, unsigned tex) const
 If you make non-standard textures (ie not from a palette), overload this function to fill gltex. More...
 
virtual carto::VolumeRef< AimsRGBArgbaVolume (const SliceViewState *=0, int tex=0) const
 fills a resampled RGBA volume More...
 
virtual void rgbaVolume (carto::Volume< AimsRGBA > &, const SliceViewState *=0, int tex=0) const
 same as the other rgbaVolume() but fills an already allocated volume More...
 
virtual bool glAllowedTexRGBInterpolation (unsigned tex=0) const
 
virtual std::string viewStateID (glPart part, const ViewState &) const
 Makes a unique ID from a viewstate. More...
 
- Public Member Functions inherited from anatomist::GLComponent
 GLComponent ()
 
virtual ~GLComponent ()
 
void clearLists ()
 
virtual void glClearHasChangedFlags () const
 
virtual bool glHasChanged (glPart) const
 
void setShader (const Shader &shader)
 
void removeShader ()
 
void setupShader ()
 create, setup, or remove the shader More...
 
const ShadergetShader () const
 
ShadergetShader ()
 
virtual unsigned long glMaxNumDisplayedPolygons () const
 Limit to the number of displayed polygons (default: 0, unlimited or ) global default value) More...
 
virtual void glSetMaxNumDisplayedPolygons (unsigned long n)
 
virtual unsigned glNumTextures () const
 
virtual unsigned glNumTextures (const ViewState &) const
 
virtual glTextureMode glTexMode (unsigned tex=0) const
 
virtual void glSetTexMode (glTextureMode mode, unsigned tex=0)
 
virtual float glTexRate (unsigned tex=0) const
 
virtual void glSetTexRate (float rate, unsigned tex=0)
 
virtual glTextureFiltering glTexFiltering (unsigned tex=0) const
 
virtual void glSetTexFiltering (glTextureFiltering x, unsigned tex=0)
 
virtual glAutoTexturingMode glAutoTexMode (unsigned tex=0) const
 
virtual void glSetAutoTexMode (glAutoTexturingMode mode, unsigned tex=0)
 
virtual const float * glAutoTexParams (unsigned coord=0, unsigned tex=0) const
 
virtual void glSetAutoTexParams (const float *params, unsigned coord=0, unsigned tex=0)
 
virtual bool glTexImageChanged (unsigned tex=0) const
 
virtual bool glTexEnvChanged (unsigned tex=0) const
 
virtual GLint glGLTexMode (unsigned tex=0) const
 
virtual GLint glGLTexFiltering (unsigned tex=0) const
 
virtual void glSetTexRGBInterpolation (bool x, unsigned tex=0)
 
virtual bool glTexRGBInterpolation (unsigned tex=0) const
 
virtual const TexExtremaglTexExtrema (unsigned tex=0) const
 
virtual TexExtremaglTexExtrema (unsigned tex=0)
 
virtual GLPrimitives glMainGLL (const ViewState &)
 
virtual void glGarbageCollector (int nkept=-1)
 Frees unused display lists. More...
 
unsigned glStateMemory () const
 Number of unused display lists in different states kept in memory (default: 4) More...
 
virtual void glSetStateMemory (unsigned n)
 
virtual bool glMakeBodyGLL (const ViewState &state, const GLList &gllist) const
 If you want to make a non-standard GL display list for the body geometry, overload this function to fill gllist. More...
 
virtual void glBeforeBodyGLL (const ViewState &state, GLPrimitives &pl) const
 GL list to execute before the body is rendered. More...
 
virtual void glAfterBodyGLL (const ViewState &state, GLPrimitives &pl) const
 GL list to execute after the body is rendered. More...
 
virtual bool glMakeTexEnvGLL (const ViewState &state, const GLList &gllist, unsigned tex) const
 
virtual GLPrimitives glBodyGLL (const ViewState &state) const
 
virtual GLPrimitives glMaterialGLL (const ViewState &state) const
 
virtual GLPrimitives glTexNameGLL (const ViewState &, unsigned tex=0) const
 
virtual GLPrimitives glTexEnvGLL (const ViewState &, unsigned tex=0) const
 
virtual void glSetMainGLL (const std::string &state, GLPrimitives x)
 
virtual void glSetBodyGLL (const std::string &state, RefGLItem x)
 
virtual void glSetMaterialGLL (const std::string &state, RefGLItem x)
 
virtual void glSetTexNameGLL (const std::string &state, RefGLItem x, unsigned tex=0)
 
virtual std::set< glTextureModeglAllowedTexModes (unsigned tex=0) const
 List of actually allowed texturing modes for this particular object. More...
 
virtual std::set< glTextureFilteringglAllowedTexFilterings (unsigned tex=0) const
 
virtual std::set< glAutoTexturingModeglAllowedAutoTexModes (unsigned tex=0) const
 
virtual bool glAllowedTexRate (unsigned tex=0) const
 
virtual carto::Object debugInfo () const
 
int glObjectID () const
 
virtual TexInfoglTexInfo (unsigned tex=0) const
 
- Public Member Functions inherited from anatomist::PythonAObject
 PythonAObject ()
 
virtual ~PythonAObject ()
 

Protected Member Functions

void updateSlice (AImage &image, const Point3df &p0, const std::vector< float > &time, const Transformation *tra, const Point3df &inc, const Point3df &offset, const Geometry *wingeom) const
 Generic texture filling routine for any transformation. More...
 
void updateAxial (AImage *ximage, const Point3df &p0, const std::vector< float > &time) const
 Optimized texture filling routine (no transformation) More...
 
void updateCoronal (AImage *ximage, const Point3df &p0, const std::vector< float > &time) const
 Optimized texture filling routine (no transformation) More...
 
void updateSagittal (AImage *ximage, const Point3df &p0, const std::vector< float > &time) const
 Optimized texture filling routine (no transformation) More...
 
- Protected Member Functions inherited from anatomist::AObject
const PrimListprimitives () const
 
PrimListprimitives ()
 
virtual void cleanup ()
 must be called by objects destructors - Must be explicitly called by each object destructor since it can call virtual functions More...
 
virtual void clearReferentialInheritance ()
 sets the object to get referential from to null, unregister it More...
 
AObject *& _referentialInheritance ()
 provide access to derived classes More...
 
virtual void unregisterObservable (Observable *)
 Called when an observable is destroyed, only called by Observable: don't use this function directly. More...
 
 AObject (const AObject &)
 copy constructor, protected and used only to reimplement clone() More...
 
- Protected Member Functions inherited from anatomist::Observable
void clearChanged () const
 Indicates that this object has no longer changed, or that it has already notified all of its observers of its most recent change. More...
 
void obsSetChanged (int, bool=true) const
 int-based change flags (use enums to address them) More...
 
void obsSetChanged (const std::string &, bool=true) const
 string-based change flags More...
 
- Protected Member Functions inherited from carto::SharedObject
void disableRefCount ()
 
- Protected Member Functions inherited from carto::WeakObject
 WeakObject ()
 
 WeakObject (const WeakObject &)
 
WeakObjectoperator= (const WeakObject &)
 
- Protected Member Functions inherited from anatomist::Observer
virtual void cleanupObserver ()
 call this function from inherited classes destructors. More...
 
virtual void registerObservable (Observable *)
 only called by Observable: don't use this function directly More...
 
const std::set< Observable * > & observed () const
 
- Protected Member Functions inherited from anatomist::GLComponent
void glAddTextures (unsigned ntex=1)
 

Additional Inherited Members

- Public Types inherited from anatomist::AObject
enum  ObjectType {
  VOLUME , BUCKET , FACET , TRIANG ,
  LIST , VECTOR , MAP , SET ,
  GRAPH , GRAPHOBJECT , VOLSURF , MULTISURF ,
  MULTIBUCKET , MULTIVOLUME , FUSION2D , FUSION3D ,
  FASCICLE , FASCICLEGRAPH , TEXTURE , TEXSURFACE ,
  FUSION2DMESH , VECTORFIELD , OTHER
}
 Base object type identifiers. More...
 
typedef std::set< MObject * > ParentList
 Storage type for parent objects (multi-objects containing this one) More...
 
typedef ObjectMenu *(* ObjectMenuRegistrerFunction) (const AObject *objtype, ObjectMenu *menu)
 dynamic menu registration function More...
 
- Public Types inherited from carto::RCObject
typedef int RefCounterType
 
- Public Types inherited from anatomist::GLComponent
enum  glTextureMode {
  glGEOMETRIC , glLINEAR , glREPLACE , glDECAL ,
  glBLEND , glADD , glCOMBINE , glLINEAR_A_IF_A ,
  glLINEAR_ON_DEFINED , glLINEAR_A_IF_B = glLINEAR_ON_DEFINED , glLINEAR_A_IF_NOT_A , glLINEAR_A_IF_NOT_B ,
  glLINEAR_B_IF_A , glLINEAR_B_IF_B , glLINEAR_B_IF_NOT_A , glLINEAR_B_IF_NOT_B ,
  glLINEAR_A_IF_A_ALPHA , glLINEAR_A_IF_NOT_B_ALPHA , glLINEAR_B_IF_B_ALPHA , glLINEAR_B_IF_NOT_A_ALPHA ,
  glMAX_CHANNEL , glMIN_CHANNEL , glMAX_ALPHA , glMIN_ALPHA ,
  glGEOMETRIC_SQRT , glGEOMETRIC_LIGHTEN
}
 
enum  glTextureFiltering { glFILT_NEAREST , glFILT_LINEAR }
 
enum  glPart {
  glGENERAL , glBODY , glMATERIAL , glGEOMETRY ,
  glPALETTE , glREFERENTIAL , glTEXIMAGE , glTEXENV ,
  glNOPART , glTEXIMAGE_NUM , glTEXENV_NUM
}
 GL object parts, each driving a GL list. More...
 
enum  glAutoTexturingMode {
  glTEX_MANUAL , glTEX_OBJECT_LINEAR , glTEX_EYE_LINEAR , glTEX_SPHERE_MAP ,
  glTEX_REFLECTION_MAP , glTEX_NORMAL_MAP
}
 
typedef ViewState::glSelectRenderMode glSelectRenderMode
 
- Static Public Member Functions inherited from anatomist::AObject
static std::list< AObject * > load (const std::string &filename)
 Static object loader: creates an objects, loads its contents. More...
 
static bool reload (AObject *object, bool onlyoutdated=false)
 Reads from disk again. More...
 
static int registerObjectType (const std::string &id)
 Creates a new object type number and returns it. More...
 
static std::string objectTypeName (int type)
 
static void setObjectMenu (std::string type, carto::rc_ptr< ObjectMenu > om)
 
static carto::rc_ptr< ObjectMenugetObjectMenu (std::string type)
 
static std::map< std::string, carto::rc_ptr< ObjectMenu > > & getObjectMenuMap ()
 
static void addObjectMenuRegistration (ObjectMenuRegistrerFunction)
 
static void addObjectMenuRegistration (ObjectMenuRegistrerClass *)
 
static void cleanStatic ()
 cleanup static global variables (called when quitting anatomist) More...
 
- Static Public Member Functions inherited from anatomist::GLComponent
static unsigned long glGlobalMaxNumDisplayedPolygons ()
 
static void glSetGlobalMaxNumDisplayedPolygons (unsigned long n)
 
static GLPrimitives glHandleTransformation (const ViewState &vs, const Referential *myref)
 helper function used in AObject::render() More...
 
static GLPrimitives glPopTransformation (const ViewState &vs, const Referential *myref)
 called after glHandleTransformation() and glMainGLL() to pop the transformation matrix More...
 
- Protected Attributes inherited from anatomist::AObject
int _type
 Should be static in each object class. More...
 
int _id
 
std::string _name
 
std::string _filename
 
std::set< AWindow * > _winList
 
int _inMemory
 
int _visible
 
ParentList _parents
 
Material _material
 Should be a pointer: some objects don't have a material (2D objects) More...
 
Referential_referential
 Referentiel. More...
 
bool _referenceHasChanged
 Reference has-changed flag. More...
 
AObjectPalette_palette
 Palette. More...
 
- Static Protected Attributes inherited from anatomist::AObject
static std::map< std::string, int > _objectTypes
 name-to-type map More...
 
static std::map< int, std::string > _objectTypeNames
 type-to-name map More...
 
static std::map< std::string, carto::rc_ptr< ObjectMenu > > _objectmenu_map
 Object Menu Map. More...
 

Detailed Description

template<typename T>
class anatomist::AVolume< T >

Volume object.

Definition at line 64 of file Volume.h.

Constructor & Destructor Documentation

◆ AVolume() [1/2]

template<typename T >
anatomist::AVolume< T >::AVolume ( const std::string &  filename = "")

◆ AVolume() [2/2]

template<typename T >
anatomist::AVolume< T >::AVolume ( carto::rc_ptr< carto::Volume< T > >  )

◆ ~AVolume()

template<typename T >
virtual anatomist::AVolume< T >::~AVolume ( )
virtual

Member Function Documentation

◆ adjustPalette()

template<typename T >
void anatomist::AVolume< T >::adjustPalette ( )
virtual

Creates or updates object palette according to object values (if needed)

Reimplemented from anatomist::AObject.

◆ attributed() [1/2]

template<typename T >
virtual carto::GenericObject* anatomist::AVolume< T >::attributed ( )
virtual

◆ attributed() [2/2]

template<typename T >
virtual const carto::GenericObject* anatomist::AVolume< T >::attributed ( ) const
virtual

Reimplemented from anatomist::PythonAObject.

◆ boundingBox()

template<typename T >
virtual bool anatomist::AVolume< T >::boundingBox ( std::vector< float > &  bmin,
std::vector< float > &  bmax 
) const
virtual

Fills bmin and bmax with the N-D bounding box extrema in the object's referential coordinates.

Changed in Anatomist 4.6. The older API was using Point3df instead of vector and informed only the spatial dimensions.

An object with no spatial information (a texture for instance) may still have time information. For this reason, the resulting bounding box should always have 4 components (at least), then 4th and additional ones should be valid, even if the function returns false (no spatial bounding box).

Returns
true if object has a "spatial" bounding box (x, y, z coordinates)

Reimplemented from anatomist::AObject.

◆ boundingBox2D()

template<typename T >
virtual bool anatomist::AVolume< T >::boundingBox2D ( std::vector< float > &  bmin,
std::vector< float > &  bmax 
) const
virtual

Bounding box in 2D views mode.

In mm, may be the same as boundingBox() if the object field of view is the same in 3D and 2D modes. It normally includes voxels size (for a volume, bmin will be -vs/2 where vs is the voxel size, for the 3 first coordinates).

The default implementation just calls boundingBox().

Reimplemented from anatomist::AObject.

◆ clone()

template<typename T >
virtual AObject* anatomist::AVolume< T >::clone ( bool  shallow = true)
virtual

Makes a copy of the object, with a duplicated object structure, palette and material, but which may share the underlying low-level data object (Aims object).

This is especially useful to show the same object with several palettes. This virtual method returns null by default if it is not overloaded.

Reimplemented from anatomist::AObject.

◆ dimTexture()

template<typename T >
virtual unsigned anatomist::AVolume< T >::dimTexture ( ) const
inlinevirtual

Number of texture values for a point.

Reimplemented from anatomist::AObject.

Definition at line 112 of file Volume.h.

◆ GetValue()

template<typename T >
float anatomist::AVolume< T >::GetValue ( Point3df  pos,
float  time,
Referential winref,
Geometry wingeom 
)

Retourne la valeur d'un voxel du volume.

◆ hasTexture()

template<typename T >
virtual bool anatomist::AVolume< T >::hasTexture ( ) const
inlinevirtual

Textured objects have values associated with a geometric coordinate.

Reimplemented from anatomist::AObject.

Definition at line 111 of file Volume.h.

◆ Is2DObject()

template<typename T >
bool anatomist::AVolume< T >::Is2DObject ( )
inlinevirtual

Can be display in 2D windows.

Implements anatomist::AObject.

Definition at line 103 of file Volume.h.

◆ Is3DObject()

template<typename T >
bool anatomist::AVolume< T >::Is3DObject ( )
inlinevirtual

Can be display in 3D windows.

Implements anatomist::AObject.

Definition at line 106 of file Volume.h.

◆ isTransparent()

template<typename T >
virtual bool anatomist::AVolume< T >::isTransparent ( ) const
virtual

Reimplemented from anatomist::AObject.

◆ loadable()

template<typename T >
virtual bool anatomist::AVolume< T >::loadable ( ) const
inlinevirtual

Reimplemented from anatomist::AObject.

Definition at line 120 of file Volume.h.

◆ MaxT()

template<typename T >
float anatomist::AVolume< T >::MaxT ( ) const
inlinevirtual

Obsolete, deprecated.

Reimplemented from anatomist::AObject.

Definition at line 74 of file Volume.h.

◆ MinT()

template<typename T >
float anatomist::AVolume< T >::MinT ( ) const
inlinevirtual

Obsolete, deprecated.

Reimplemented from anatomist::AObject.

Definition at line 73 of file Volume.h.

◆ mixedTexValue()

template<typename T >
virtual float anatomist::AVolume< T >::mixedTexValue ( const std::vector< float > &  pos) const
virtual

Same as above except that coordinates are not transformed but taken in object coordinates system.

Reimplemented from anatomist::AObject.

◆ objectAt()

template<class T >
AObject * anatomist::AVolume< T >::objectAt ( const std::vector< float > &  pos,
float  tol = 0 
)
inlinevirtual

Not selectable: always returns Null.

Reimplemented from anatomist::AObject.

Definition at line 156 of file Volume.h.

◆ objectFullTypeName()

template<typename T >
virtual std::string anatomist::AVolume< T >::objectFullTypeName ( void  ) const
virtual

Get Object Full Type Name.

It should be objectTypeName(_type) for most anatomist objects and completed with <T> for templated anatomist objects. For instance : AVolume<AimsRGBA>::objectFullTypeName() return : VOLUME<AimsRGBA>

Reimplemented from anatomist::AObject.

◆ operator()() [1/2]

template<typename T >
T& anatomist::AVolume< T >::operator() ( size_t  x = 0,
size_t  y = 0,
size_t  z = 0,
size_t  t = 0 
)
inline

Definition at line 87 of file Volume.h.

◆ operator()() [2/2]

template<typename T >
const T& anatomist::AVolume< T >::operator() ( size_t  x = 0,
size_t  y = 0,
size_t  z = 0,
size_t  t = 0 
) const
inline

Definition at line 89 of file Volume.h.

◆ printTalairachCoord()

template<typename T >
virtual bool anatomist::AVolume< T >::printTalairachCoord ( const Point3df pos,
const Referential  
) const
virtual

should be replaced by a real referential

Reimplemented from anatomist::AObject.

◆ reload()

template<typename T >
virtual bool anatomist::AVolume< T >::reload ( const std::string &  filename)
virtual

Re-reads objects from disk.

Only called if loadable() is true and fileName() is not empty. A new filename can be passed to the reload function, so that files uncompressed by the ObjectReader in temporary locations can be processed. Overload this function in inherited classes to implement it.

If onlyoutdated is true, reloading will only be done if the files containing the object have been modified since the object has been created/loaded/saved

Reimplemented from anatomist::AObject.

◆ savable()

template<typename T >
virtual bool anatomist::AVolume< T >::savable ( ) const
inlinevirtual

Reimplemented from anatomist::AObject.

Definition at line 121 of file Volume.h.

◆ save()

template<typename T >
virtual bool anatomist::AVolume< T >::save ( const std::string &  filename)
virtual

Reimplemented from anatomist::AObject.

◆ SetExtrema()

template<typename T >
void anatomist::AVolume< T >::SetExtrema ( )
virtual

Scans the object internals and determines its (texture) extrema values.

Reimplemented from anatomist::AObject.

◆ setInternalsChanged()

template<typename T >
virtual void anatomist::AVolume< T >::setInternalsChanged ( )
virtual

Notifies some underlying lower-level objects have changed.

Useful especially after an underlying AIMS object has been modified

Reimplemented from anatomist::AObject.

◆ setVolume()

template<typename T >
virtual void anatomist::AVolume< T >::setVolume ( carto::rc_ptr< carto::Volume< T > >  vol)
virtual

◆ setVoxelSize()

template<typename T >
virtual void anatomist::AVolume< T >::setVoxelSize ( const std::vector< float > &  vs)
virtual

Reimplemented from anatomist::AObject.

◆ textured2D()

template<typename T >
bool anatomist::AVolume< T >::textured2D ( ) const
inlinevirtual

true if 2D rendering uses a textured plane (not a full openGL object)

Reimplemented from anatomist::AObject.

Definition at line 104 of file Volume.h.

◆ texValues()

template<typename T >
virtual std::vector<float> anatomist::AVolume< T >::texValues ( const std::vector< float > &  pos) const
virtual

Reimplemented from anatomist::AObject.

◆ update2DTexture()

template<typename T >
virtual bool anatomist::AVolume< T >::update2DTexture ( AImage ,
const Point3df posbase,
const SliceViewState ,
unsigned  tex = 0 
) const
virtual

new API

Reimplemented from anatomist::Sliceable.

◆ updateAxial()

template<typename T >
void anatomist::AVolume< T >::updateAxial ( AImage ximage,
const Point3df p0,
const std::vector< float > &  time 
) const
protected

Optimized texture filling routine (no transformation)

◆ updateCoronal()

template<typename T >
void anatomist::AVolume< T >::updateCoronal ( AImage ximage,
const Point3df p0,
const std::vector< float > &  time 
) const
protected

Optimized texture filling routine (no transformation)

◆ updateSagittal()

template<typename T >
void anatomist::AVolume< T >::updateSagittal ( AImage ximage,
const Point3df p0,
const std::vector< float > &  time 
) const
protected

Optimized texture filling routine (no transformation)

◆ updateSlice()

template<typename T >
void anatomist::AVolume< T >::updateSlice ( AImage image,
const Point3df p0,
const std::vector< float > &  time,
const Transformation tra,
const Point3df inc,
const Point3df offset,
const Geometry wingeom 
) const
protected

Generic texture filling routine for any transformation.

◆ volume() [1/2]

template<typename T >
carto::rc_ptr<carto::Volume<T> > anatomist::AVolume< T >::volume ( )
inline

Definition at line 84 of file Volume.h.

◆ volume() [2/2]

template<typename T >
const carto::rc_ptr<carto::Volume<T> > anatomist::AVolume< T >::volume ( ) const
inline

Definition at line 85 of file Volume.h.

◆ voxelSize()

template<typename T >
virtual std::vector<float> anatomist::AVolume< T >::voxelSize ( ) const
virtual

Returns at least 4 sizes. For 3D objects, returns (1, 1, 1, 1)

Reimplemented from anatomist::AObject.


The documentation for this class was generated from the following file: