anatomist  5.0.5
3D neuroimaging data viewer
anatomist::AObject Class Referenceabstract

Base Anatomist object (abstract) More...

#include <anatomist/object/Object.h>

Inheritance diagram for anatomist::AObject:
Collaboration diagram for anatomist::AObject:

Public Types

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 Member Functions

 AObject (const std::string &filename="")
 
virtual ~AObject ()
 AObject subclasses must call cleanup() in their destructor. More...
 
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...
 
virtual const GLComponentglAPI () const
 OpenGL objects const API. More...
 
virtual GLComponentglAPI ()
 OpenGL objects API. 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 float MinT () const
 Obsolete, deprecated. More...
 
virtual 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...
 
virtual bool render (PrimList &, const ViewState &)
 rendering (generally 2D or 3D using OpenGL). 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 > &)
 
virtual void internalUpdate ()
 Updates the state of the object. More...
 
virtual void adjustPalette ()
 Creates or updates object palette according to object values (if needed) 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 Is2DObject ()=0
 
virtual bool Is3DObject ()=0
 
virtual bool textured2D () const
 true if 2D rendering uses a textured plane (not a full openGL object) More...
 
virtual bool isTransparent () const
 
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 setInternalsChanged ()
 Notifies some underlying lower-level objects have changed. More...
 
virtual void clearHasChangedFlags () const
 Reset has-changed flags. More...
 
virtual AObjectobjectAt (const std::vector< float > &pos, float tol=0)
 Find the object (sub-object) at given postion with a tolerence. 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 void SetExtrema ()
 Scans the object internals and determines its (texture) extrema values. 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 Referential *orgRef) const
 Gets a "mixed" texture value at a given space / time location. 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 Referential *orgRef) const
 Gets the array of texture values at a given location. More...
 
virtual std::vector< float > texValues (const std::vector< float > &pos) const
 
virtual bool loadable () const
 
virtual bool savable () const
 
virtual bool reload (const std::string &filename)
 Re-reads objects from disk. More...
 
virtual std::string objectFullTypeName (void) const
 Get Object Full Type Name. More...
 
virtual bool save (const std::string &filename)
 
virtual bool printTalairachCoord (const Point3df &, const Referential *) const
 should be replaced by a real referential More...
 
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 ()
 

Static Public Member Functions

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...
 

Protected Member Functions

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 Attributes

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

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...
 

Friends

class StaticInitializers
 

Detailed Description

Base Anatomist object (abstract)

Definition at line 95 of file Object.h.

Member Typedef Documentation

◆ ObjectMenuRegistrerFunction

typedef ObjectMenu*(* anatomist::AObject::ObjectMenuRegistrerFunction) (const AObject *objtype, ObjectMenu *menu)

dynamic menu registration function

Definition at line 135 of file Object.h.

◆ ParentList

Storage type for parent objects (multi-objects containing this one)

Definition at line 99 of file Object.h.

Member Enumeration Documentation

◆ ObjectType

Base object type identifiers.

Some of these base types are still unused now. New objects (unknown to the base Anatomist library) use dynamic identifiers that they must register by calling registerObjectType() once (and only once)

Enumerator
VOLUME 
BUCKET 
FACET 
TRIANG 
LIST 
VECTOR 
MAP 
SET 
GRAPH 
GRAPHOBJECT 
VOLSURF 
MULTISURF 
MULTIBUCKET 
MULTIVOLUME 
FUSION2D 
FUSION3D 
FASCICLE 
FASCICLEGRAPH 
TEXTURE 
TEXSURFACE 
FUSION2DMESH 
VECTORFIELD 
OTHER 

External object type (unknown from the base anatomist library)

Definition at line 105 of file Object.h.

Constructor & Destructor Documentation

◆ AObject() [1/2]

anatomist::AObject::AObject ( const std::string &  filename = "")

◆ ~AObject()

virtual anatomist::AObject::~AObject ( )
virtual

AObject subclasses must call cleanup() in their destructor.

◆ AObject() [2/2]

anatomist::AObject::AObject ( const AObject )
protected

copy constructor, protected and used only to reimplement clone()

Member Function Documentation

◆ _referentialInheritance()

AObject*& anatomist::AObject::_referentialInheritance ( )
protected

provide access to derived classes

◆ addObjectMenuRegistration() [1/2]

static void anatomist::AObject::addObjectMenuRegistration ( ObjectMenuRegistrerFunction  )
static

◆ addObjectMenuRegistration() [2/2]

static void anatomist::AObject::addObjectMenuRegistration ( ObjectMenuRegistrerClass )
static

◆ adjustPalette()

virtual void anatomist::AObject::adjustPalette ( )
inlinevirtual

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

Reimplemented in anatomist::AVolume< T >, anatomist::AVolume< float >, and anatomist::AVolumeView< T >.

Definition at line 221 of file Object.h.

Referenced by anatomist::AVolume< float >::MaxT().

◆ aimsMeshFromGLComponent()

carto::Object anatomist::AObject::aimsMeshFromGLComponent ( )

◆ boundingBox()

virtual bool anatomist::AObject::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 in anatomist::MObject, anatomist::ATexSurface, anatomist::AConnectivityMatrix, anatomist::AGraph, anatomist::Fusion3D, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::AVolumeView< T >, anatomist::AVolume< T >, anatomist::AVolume< float >, anatomist::ATexture, anatomist::CutMesh, anatomist::PlanarFusion3D, and anatomist::Bucket.

Referenced by anatomist::AVolume< float >::MaxT().

◆ boundingBox2D()

virtual bool anatomist::AObject::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 in anatomist::MObject, anatomist::AGraph, anatomist::Fusion2DMesh, anatomist::AVolumeView< T >, anatomist::AVolume< T >, anatomist::AVolume< float >, and anatomist::Bucket.

Referenced by anatomist::AVolume< float >::MaxT().

◆ CanBeDestroyed()

virtual int anatomist::AObject::CanBeDestroyed ( )
virtual

Allows / unallows destruction of object.

(cannot be destroyed if part of some other kind of multi-object)

◆ cleanStatic()

static void anatomist::AObject::cleanStatic ( )
static

cleanup static global variables (called when quitting anatomist)

◆ cleanup()

virtual void anatomist::AObject::cleanup ( )
protectedvirtual

must be called by objects destructors - Must be explicitly called by each object destructor since it can call virtual functions

◆ clearHasChangedFlags()

virtual void anatomist::AObject::clearHasChangedFlags ( ) const
virtual

Reset has-changed flags.

Must be called after a call to notifyObservers function to reset changes. This system is somewhat insuficient in fact: some observers don't need to update just now, and won't see the change later...

Reimplemented in anatomist::MObject, and anatomist::CutMesh.

◆ clearReferentialInheritance()

virtual void anatomist::AObject::clearReferentialInheritance ( )
protectedvirtual

sets the object to get referential from to null, unregister it

Reimplemented in anatomist::MObject.

◆ clone()

virtual AObject* anatomist::AObject::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 in anatomist::ATexture, anatomist::ASparseMatrix, anatomist::AGraph, anatomist::AVolume< T >, anatomist::AVolume< float >, anatomist::ASurface< D >, anatomist::ASurface< 2 >, and anatomist::ASurface< 3 >.

◆ createDefaultPalette()

virtual void anatomist::AObject::createDefaultPalette ( const std::string &  name = "")
virtual

function called by getOrCreatePalette() - overloadable, need not be called directly

Reimplemented in anatomist::AGraph, anatomist::ATexture, anatomist::VectorField, anatomist::VolRenderShader, and anatomist::VolRender.

◆ dimTexture()

virtual unsigned anatomist::AObject::dimTexture ( ) const
inlinevirtual

Number of texture values for a point.

Reimplemented in anatomist::AVolume< T >, anatomist::AVolume< float >, anatomist::Fusion2D, and anatomist::ATexture.

Definition at line 317 of file Object.h.

◆ fallbackReferentialInheritance()

virtual AObject* anatomist::AObject::fallbackReferentialInheritance ( ) const
virtual

object to take referential from when no ref is assigned

Reimplemented in anatomist::PlanarFusion3D, anatomist::TesselatedMesh, anatomist::Fusion2D, and anatomist::CutMesh.

◆ fileName()

std::string anatomist::AObject::fileName ( ) const
inline

File name (if any) for loaded objects.

Definition at line 167 of file Object.h.

◆ GetMaterial()

◆ getObjectMenu()

static carto::rc_ptr<ObjectMenu> anatomist::AObject::getObjectMenu ( std::string  type)
inlinestatic

Definition at line 412 of file Object.h.

◆ getObjectMenuMap()

static std::map<std::string, carto::rc_ptr<ObjectMenu> >& anatomist::AObject::getObjectMenuMap ( )
inlinestatic

Definition at line 417 of file Object.h.

◆ getOrCreatePalette()

virtual const AObjectPalette* anatomist::AObject::getOrCreatePalette ( ) const
virtual

User normally calls this function.

◆ getReferential()

Referential* anatomist::AObject::getReferential ( ) const

◆ glAPI() [1/2]

◆ glAPI() [2/2]

◆ hasReferenceChanged()

bool anatomist::AObject::hasReferenceChanged ( ) const

◆ hasTexture()

virtual bool anatomist::AObject::hasTexture ( ) const
inlinevirtual

Textured objects have values associated with a geometric coordinate.

Reimplemented in anatomist::Fusion3D, anatomist::AVolume< T >, anatomist::AVolume< float >, and anatomist::Fusion2D.

Definition at line 315 of file Object.h.

◆ id()

int anatomist::AObject::id ( ) const
inline

Unique ID assigned upon construction, but somewhat unused now...

Definition at line 163 of file Object.h.

◆ InMemory()

int anatomist::AObject::InMemory ( ) const
inline

For objects loading only when needed (not used yet...)

Definition at line 256 of file Object.h.

◆ internalUpdate()

virtual void anatomist::AObject::internalUpdate ( )
virtual

Updates the state of the object.

(when a part has changed and other parts depend on this change). Does nothing by default

Reimplemented in anatomist::AGraphObject, and anatomist::Hierarchy.

◆ Is2DObject()

◆ Is3DObject()

◆ isCopy()

bool anatomist::AObject::isCopy ( ) const

◆ isMultiObject()

virtual int anatomist::AObject::isMultiObject ( ) const
inlinevirtual

maybe not necessary ?: we can use dynamic_cast instead

Reimplemented in anatomist::MObject.

Definition at line 172 of file Object.h.

◆ isTransparent()

◆ load()

static std::list<AObject *> anatomist::AObject::load ( const std::string &  filename)
static

Static object loader: creates an objects, loads its contents.

◆ loadable()

virtual bool anatomist::AObject::loadable ( ) const
inlinevirtual

◆ loadDate()

long anatomist::AObject::loadDate ( ) const

Time the object was created, loaded or reloaded.

◆ makeHeaderOptions()

virtual carto::Object anatomist::AObject::makeHeaderOptions ( ) const
virtual

get object properties into a generic object, such as material, palette etc before saving the object

Reimplemented in anatomist::CutMesh, anatomist::Slice, and anatomist::ClippedObject.

◆ material()

virtual const Material& anatomist::AObject::material ( ) const
inlinevirtual

◆ MaxT()

◆ MinT()

◆ mixedTexValue() [1/2]

virtual float anatomist::AObject::mixedTexValue ( const std::vector< float > &  pos,
const Referential orgRef 
) const
virtual

Gets a "mixed" texture value at a given space / time location.

The value is mixed, for multi-dimensional textures, according to an internal method (each object can use its own). Space coordinates are transformed from the incoming referential to the object's one.

Note: in Anatomist 4.4 and earlier, this method was taking an additional argument, org_voxel_size. This was kind of pointless since it more or less supposed that coordinates were passed in voxels rather in mm, which is wrong. In Anatomist 4.5 coords are officially always in mm.

Reimplemented in anatomist::Fusion2D.

Referenced by anatomist::RoiDynSegmentAction::dimensionModeTo3D(), and anatomist::AVolume< float >::dimTexture().

◆ mixedTexValue() [2/2]

float anatomist::AObject::mixedTexValue ( const std::vector< float > &  pos) const
inlinevirtual

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

Reimplemented in anatomist::AVolume< T >, anatomist::AVolume< float >, and anatomist::Fusion2D.

Definition at line 485 of file Object.h.

◆ mObjectAPI() [1/2]

virtual const MObject* anatomist::AObject::mObjectAPI ( ) const
inlinevirtual

Reimplemented in anatomist::MObject.

Definition at line 153 of file Object.h.

◆ mObjectAPI() [2/2]

virtual MObject* anatomist::AObject::mObjectAPI ( )
inlinevirtual

Reimplemented in anatomist::MObject.

Definition at line 154 of file Object.h.

◆ name()

std::string anatomist::AObject::name ( ) const
inline

◆ objectAt() [1/2]

virtual AObject* anatomist::AObject::objectAt ( const std::vector< float > &  pos,
float  tol = 0 
)
virtual

◆ objectAt() [2/2]

virtual AObject* anatomist::AObject::objectAt ( const std::vector< float > &  pos,
float  tol,
const Referential orgref,
const Point3df orggeom 
)
virtual

Same with origin window referential.

◆ objectFullTypeName()

virtual std::string anatomist::AObject::objectFullTypeName ( void  ) const
inlinevirtual

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 in anatomist::AVolume< T >, and anatomist::AVolume< float >.

Definition at line 366 of file Object.h.

Referenced by anatomist::AVolume< float >::savable().

◆ objectTypeName()

static std::string anatomist::AObject::objectTypeName ( int  type)
static

◆ optionMenu()

virtual ObjectMenu* anatomist::AObject::optionMenu ( ) const
virtual

◆ optionTree()

◆ palette() [1/2]

virtual AObjectPalette* anatomist::AObject::palette ( )
inlinevirtual

Normally, getOrCreatePalette() should be used instead of this function in most cases.

Reimplemented in anatomist::GLMObject, anatomist::AGraphObject, anatomist::VectorField, anatomist::VolRenderShader, anatomist::ClippedObject, anatomist::Slice, and anatomist::VolRender.

Definition at line 224 of file Object.h.

◆ palette() [2/2]

virtual const AObjectPalette* anatomist::AObject::palette ( ) const
inlinevirtual

◆ Parents()

ParentList& anatomist::AObject::Parents ( )
inline

List of multi-objects containing this one. Obsolete: use parents()

Definition at line 261 of file Object.h.

◆ parents() [1/2]

ParentList& anatomist::AObject::parents ( )
inline

List of multi-objects containing this one.

Definition at line 263 of file Object.h.

Referenced by anatomist::Hierarchy::classType().

◆ parents() [2/2]

const ParentList& anatomist::AObject::parents ( ) const
inline

List of multi-objects containing this one.

Definition at line 265 of file Object.h.

◆ previousReferential()

const Referential* anatomist::AObject::previousReferential ( ) const

Referential that the object was in before the last change.

This function is only here to overcome a problem in the observer pattern, it is only used by observers that must react to a referential change

◆ primitives() [1/2]

const PrimList& anatomist::AObject::primitives ( ) const
protected

◆ primitives() [2/2]

PrimList& anatomist::AObject::primitives ( )
protected

◆ printTalairachCoord()

virtual bool anatomist::AObject::printTalairachCoord ( const Point3df ,
const Referential  
) const
inlinevirtual

should be replaced by a real referential

Reimplemented in anatomist::AVolume< T >, and anatomist::AVolume< float >.

Definition at line 371 of file Object.h.

Referenced by anatomist::AVolume< float >::savable().

◆ referentialInheritance()

AObject* anatomist::AObject::referentialInheritance ( ) const

if not null, the object referential is inherited from this object

◆ registerObjectType()

static int anatomist::AObject::registerObjectType ( const std::string &  id)
static

Creates a new object type number and returns it.

◆ RegisterParent()

virtual void anatomist::AObject::RegisterParent ( MObject pob)
inlinevirtual

Definition at line 266 of file Object.h.

◆ registerWindow()

virtual void anatomist::AObject::registerWindow ( AWindow window)
virtual

◆ reload() [1/2]

virtual bool anatomist::AObject::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 in anatomist::AVolume< T >, anatomist::AVolume< float >, anatomist::Bucket, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ATexture, and anatomist::ASparseMatrix.

Referenced by anatomist::AVolume< float >::savable().

◆ reload() [2/2]

static bool anatomist::AObject::reload ( AObject object,
bool  onlyoutdated = false 
)
static

Reads from disk again.

◆ render()

◆ renderingIsObserverDependent()

virtual bool anatomist::AObject::renderingIsObserverDependent ( ) const
virtual

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)

Reimplemented in anatomist::MObject, anatomist::VolRenderShader, anatomist::VolRender, and anatomist::TransformedObject.

◆ savable()

◆ save()

◆ setCopyFlag()

void anatomist::AObject::setCopyFlag ( bool  x = true)

◆ SetExtrema()

virtual void anatomist::AObject::SetExtrema ( )
inlinevirtual

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

Reimplemented in anatomist::AVolume< T >, anatomist::AVolume< float >, and anatomist::AVolumeView< T >.

Definition at line 313 of file Object.h.

Referenced by anatomist::AVolume< float >::MaxT().

◆ setFileName()

void anatomist::AObject::setFileName ( const std::string &  filename)

◆ setGeomExtrema()

virtual void anatomist::AObject::setGeomExtrema ( )
inlinevirtual

Scans the object internals and determines its geometry extrema.

Reimplemented in anatomist::AGraph, and anatomist::Bucket.

Definition at line 311 of file Object.h.

◆ setHeaderOptions()

void anatomist::AObject::setHeaderOptions ( )

Set some object properties according to the header (.minf), such as material, palette etc.

◆ setId()

void anatomist::AObject::setId ( int  id)

◆ setInternalsChanged()

virtual void anatomist::AObject::setInternalsChanged ( )
virtual

Notifies some underlying lower-level objects have changed.

Useful especially after an underlying AIMS object has been modified

Reimplemented in anatomist::AVolume< T >, anatomist::AVolume< float >, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::Bucket, and anatomist::ATexture.

Referenced by anatomist::AVolume< float >::savable().

◆ setLoadDate()

void anatomist::AObject::setLoadDate ( long  t)

◆ SetMaterial()

◆ setName()

void anatomist::AObject::setName ( const std::string &  n)

◆ setObjectMenu()

static void anatomist::AObject::setObjectMenu ( std::string  type,
carto::rc_ptr< ObjectMenu om 
)
inlinestatic

Definition at line 408 of file Object.h.

◆ setPalette()

virtual void anatomist::AObject::setPalette ( const AObjectPalette palette)
virtual

◆ setProperties()

virtual void anatomist::AObject::setProperties ( carto::Object  options)
virtual

Same as setHeaderOptions() and used by it, allows passing a dictionary.

Reimplemented in anatomist::AGraph, anatomist::CutMesh, anatomist::Slice, and anatomist::ClippedObject.

◆ setReferenceChanged()

virtual void anatomist::AObject::setReferenceChanged ( )
virtual

◆ setReferential()

virtual void anatomist::AObject::setReferential ( Referential ref)
virtual

Reimplemented in anatomist::MObject.

◆ setReferentialInheritance()

virtual void anatomist::AObject::setReferentialInheritance ( AObject ao)
virtual

Reimplemented in anatomist::MObject.

◆ setType()

void anatomist::AObject::setType ( int  type)
inline

Method to set type id, because type() is not virtual.

Usefull when registering new AObject class from python.

Definition at line 161 of file Object.h.

◆ SetVisibility()

void anatomist::AObject::SetVisibility ( int  v)
inline

Definition at line 259 of file Object.h.

◆ setVoxelSize()

virtual void anatomist::AObject::setVoxelSize ( const std::vector< float > &  )
inlinevirtual

◆ storeHeaderOptions()

virtual void anatomist::AObject::storeHeaderOptions ( )
virtual

Store some object properties into the header (.minf), such as material, palette etc before saving the object.

basically calls makeHeaderOptions() and stored them in the object header.

◆ textured2D()

virtual bool anatomist::AObject::textured2D ( ) const
inlinevirtual

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

Reimplemented in anatomist::AVolume< T >, anatomist::AVolume< float >, anatomist::Fusion2D, and anatomist::AVolumeView< T >.

Definition at line 275 of file Object.h.

◆ texValues() [1/2]

virtual std::vector<float> anatomist::AObject::texValues ( const std::vector< float > &  pos,
const Referential orgRef 
) const
virtual

Gets the array of texture values at a given location.

Note: in Anatomist 4.4 and earlier, this method was taking an additional argument, org_voxel_size. This was kind of pointless since it more or less supposed that coordinates were passed in voxels rather in mm, which is wrong. In Anatomist 4.5 coords are officially always in mm.

Reimplemented in anatomist::Fusion2D.

Referenced by anatomist::AVolume< float >::dimTexture().

◆ texValues() [2/2]

std::vector< float > anatomist::AObject::texValues ( const std::vector< float > &  pos) const
inlinevirtual

◆ toolTip()

virtual std::string anatomist::AObject::toolTip ( ) const
virtual

tooltip displayed in 3D views (HTML).

The default impementation returns an empty string, and the default tooltip will be displayed (see QAViewToolTip)

◆ type()

◆ unregisterObservable()

virtual void anatomist::AObject::unregisterObservable ( Observable )
protectedvirtual

Called when an observable is destroyed, only called by Observable: don't use this function directly.

Reimplemented from anatomist::Observer.

Reimplemented in anatomist::Fusion2D.

◆ UnregisterParent()

virtual void anatomist::AObject::UnregisterParent ( MObject pob)
inlinevirtual

Definition at line 267 of file Object.h.

◆ unregisterWindow()

virtual void anatomist::AObject::unregisterWindow ( AWindow window)
virtual

◆ update()

virtual void anatomist::AObject::update ( const Observable observable,
void *  arg 
)
virtual

This method is called whenever the observed object is changed.

The programmer calls an observable object's notifyObservers method to have all the object's observers notified of the change.

Parameters
observablethe observable object

Implements anatomist::Observer.

Reimplemented in anatomist::MObject, anatomist::ATexSurface, anatomist::Fusion2D, anatomist::Fusion3D, anatomist::AMTexture, anatomist::ATexture, anatomist::AVolumeView< T >, anatomist::VolRenderShader, anatomist::VolRender, anatomist::AInterpoler, anatomist::AConnectivityMatrix, anatomist::Fusion2DMesh, anatomist::VectorField, anatomist::PlanarFusion3D, anatomist::ClippedObject, anatomist::Slice, anatomist::CutMesh, anatomist::TesselatedMesh, anatomist::GLMObject, and anatomist::ANormalsMesh.

◆ Visible()

int anatomist::AObject::Visible ( ) const
inline

Visibility in control window.

Definition at line 258 of file Object.h.

◆ voxelSize()

virtual std::vector<float> anatomist::AObject::voxelSize ( ) const
virtual

◆ WinList()

const std::set<AWindow*>& anatomist::AObject::WinList ( )
inline

List of windows showing this object.

Definition at line 269 of file Object.h.

Friends And Related Function Documentation

◆ StaticInitializers

friend class StaticInitializers
friend

Definition at line 474 of file Object.h.

Member Data Documentation

◆ _filename

std::string anatomist::AObject::_filename
protected

Definition at line 448 of file Object.h.

◆ _id

int anatomist::AObject::_id
protected

Definition at line 446 of file Object.h.

◆ _inMemory

int anatomist::AObject::_inMemory
protected

Definition at line 451 of file Object.h.

◆ _material

Material anatomist::AObject::_material
protected

Should be a pointer: some objects don't have a material (2D objects)

Definition at line 456 of file Object.h.

◆ _name

std::string anatomist::AObject::_name
protected

Definition at line 447 of file Object.h.

◆ _objectmenu_map

std::map<std::string, carto::rc_ptr<ObjectMenu> > anatomist::AObject::_objectmenu_map
staticprotected

Object Menu Map.

Definition at line 472 of file Object.h.

◆ _objectTypeNames

std::map<int,std::string> anatomist::AObject::_objectTypeNames
staticprotected

type-to-name map

Definition at line 468 of file Object.h.

◆ _objectTypes

std::map<std::string, int> anatomist::AObject::_objectTypes
staticprotected

name-to-type map

Definition at line 466 of file Object.h.

◆ _palette

AObjectPalette* anatomist::AObject::_palette
mutableprotected

Palette.

Definition at line 463 of file Object.h.

◆ _parents

ParentList anatomist::AObject::_parents
protected

Definition at line 453 of file Object.h.

◆ _referenceHasChanged

bool anatomist::AObject::_referenceHasChanged
mutableprotected

Reference has-changed flag.

Definition at line 460 of file Object.h.

◆ _referential

Referential* anatomist::AObject::_referential
protected

Referentiel.

Definition at line 458 of file Object.h.

◆ _type

int anatomist::AObject::_type
protected

Should be static in each object class.

Definition at line 445 of file Object.h.

◆ _visible

int anatomist::AObject::_visible
protected

Definition at line 452 of file Object.h.

◆ _winList

std::set<AWindow*> anatomist::AObject::_winList
protected

Definition at line 450 of file Object.h.


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