![]() |
anatomist 6.0.4
3D neuroimaging data viewer
|
Base Anatomist object (abstract) More...
#include <anatomist/object/Object.h>


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) | |
| typedef ObjectMenu *(* | ObjectMenuRegistrerFunction) (const AObject *objtype, ObjectMenu *menu) |
| dynamic menu registration function | |
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. | |
| virtual AObject * | clone (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). | |
| virtual const GLComponent * | glAPI () const |
| OpenGL objects const API. | |
| virtual GLComponent * | glAPI () |
| OpenGL objects API. | |
| virtual const MObject * | mObjectAPI () const |
| virtual MObject * | mObjectAPI () |
| int | type () const |
| Object type identifier. | |
| void | setType (int type) |
| Method to set type id, because type() is not virtual. | |
| int | id () const |
| Unique ID assigned upon construction, but somewhat unused now... | |
| std::string | name () const |
| Name shown in control window. | |
| std::string | fileName () const |
| File name (if any) for loaded objects. | |
| 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 | |
| virtual float | MinT () const |
| Obsolete, deprecated. | |
| virtual float | MaxT () const |
| Obsolete, deprecated. | |
| virtual bool | boundingBox2D (std::vector< float > &bmin, std::vector< float > &bmax) const |
| Bounding box in 2D views mode. | |
| 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. | |
| virtual bool | render (PrimList &, const ViewState &) |
| rendering (generally 2D or 3D using OpenGL). | |
| virtual std::vector< float > | voxelSize () const |
| Returns at least 4 sizes. For 3D objects, returns (1, 1, 1, 1) | |
| virtual void | setVoxelSize (const std::vector< float > &) |
| virtual void | internalUpdate () |
| Updates the state of the object. | |
| virtual void | adjustPalette () |
| Creates or updates object palette according to object values (if needed) | |
| virtual AObjectPalette * | palette () |
| Normally, getOrCreatePalette() should be used instead of this function in most cases. | |
| virtual const AObjectPalette * | palette () const |
| virtual void | setPalette (const AObjectPalette &palette) |
| virtual const AObjectPalette * | getOrCreatePalette () const |
| User normally calls this function. | |
| virtual void | createDefaultPalette (const std::string &name="") |
| function called by getOrCreatePalette() - overloadable, need not be called directly | |
| virtual void | SetMaterial (const Material &mat) |
| virtual Material & | GetMaterial () |
| virtual const Material & | material () const |
| Referential * | getReferential () const |
| AObject * | referentialInheritance () const |
| if not null, the object referential is inherited from this object | |
| virtual void | setReferentialInheritance (AObject *ao) |
| virtual void | setReferential (Referential *ref) |
| virtual AObject * | fallbackReferentialInheritance () const |
| object to take referential from when no ref is assigned | |
| const Referential * | previousReferential () const |
| Referential that the object was in before the last change. | |
| virtual Tree * | optionTree () const |
| Menu tree for new options, see object/optionMatcher.h. | |
| virtual ObjectMenu * | optionMenu () const |
| int | InMemory () const |
| For objects loading only when needed (not used yet...) | |
| int | Visible () const |
| Visibility in control window. | |
| void | SetVisibility (int v) |
| ParentList & | Parents () |
| List of multi-objects containing this one. Obsolete: use parents() | |
| ParentList & | parents () |
| List of multi-objects containing this one. | |
| const ParentList & | parents () const |
| List of multi-objects containing this one. | |
| virtual void | RegisterParent (MObject *pob) |
| virtual void | UnregisterParent (MObject *pob) |
| const std::set< AWindow * > & | WinList () |
| List of windows showing this object. | |
| virtual void | registerWindow (AWindow *window) |
| virtual void | unregisterWindow (AWindow *window) |
| virtual bool | Is2DObject ()=0 |
| virtual bool | Is3DObject ()=0 |
| virtual bool | IsFusion2DAllowed () |
| virtual bool | textured2D () const |
| true if 2D rendering uses a textured plane (not a full openGL object) | |
| 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) | |
| virtual int | CanBeDestroyed () |
| Allows / unallows destruction of object. | |
| virtual void | setReferenceChanged () |
| bool | hasReferenceChanged () const |
| virtual void | setInternalsChanged () |
| Notifies some underlying lower-level objects have changed. | |
| virtual void | clearHasChangedFlags () const |
| Reset has-changed flags. | |
| bool | userModified () const |
| if the object has been modified by user interaction, and needs saving | |
| void | setUserModified (bool state=true) |
| if the object has been modified by user interaction, and needs saving | |
| virtual AObject * | objectAt (const std::vector< float > &pos, float tol=0) |
| Find the object (sub-object) at given postion with a tolerence. | |
| virtual AObject * | objectAt (const std::vector< float > &pos, float tol, const Referential *orgref, const Point3df &orggeom) |
| Same with origin window referential. | |
| virtual const AObject * | nearestVertex (const std::vector< float > &pos, int *vertex, float *distance, float tol=-1, int *polygon=0, bool tex_only=false, int target_poly=-1) const |
| Get the nearest vertex to a given position. | |
| virtual void | setGeomExtrema () |
| Scans the object internals and determines its geometry extrema. | |
| virtual void | SetExtrema () |
| Scans the object internals and determines its (texture) extrema values. | |
| virtual bool | hasTexture () const |
| Textured objects have values associated with a geometric coordinate. | |
| virtual unsigned | dimTexture () const |
| Number of texture values for a point. | |
| virtual float | mixedTexValue (const std::vector< float > &pos, const Referential *orgRef, int poly=-1) const |
| Gets a "mixed" texture value at a given space / time location. | |
| virtual float | mixedTexValue (const std::vector< float > &pos, int poly=-1) const |
| Same as above except that coordinates are not transformed but taken in object coordinates system. | |
| virtual std::vector< float > | texValues (const std::vector< float > &pos, const Referential *orgRef, int poly=-1) const |
| Gets the array of texture values at a given location. | |
| virtual std::vector< float > | texValues (const std::vector< float > &pos, int poly=-1) const |
| virtual carto::rc_ptr< carto::Volume< float > > | texValuesSeries (const std::vector< float > &pos, int axis, const Referential *orgRef, int poly=-1) const |
| virtual carto::rc_ptr< carto::Volume< float > > | texValuesSeries (const std::vector< float > &pos, int axis, int poly=-1) const |
| virtual void | getTextureLabels (const std::vector< float > &texvalues, std::vector< std::string > &texlabels, std::string &textype) const |
| virtual bool | loadable () const |
| virtual bool | savable () const |
| virtual bool | reload (const std::string &filename) |
| Re-reads objects from disk. | |
| virtual std::string | objectFullTypeName (void) const |
| Get Object Full Type Name. | |
| bool | allowsOverwriteOnSave () const |
| void | setAllowsOverwriteOnSave (bool x) |
| bool | save (const std::string &filename, bool onlyIfModified) |
| virtual bool | save (const std::string &filename) |
| virtual bool | printTalairachCoord (const Point3df &, const Referential *) const |
| should be replaced by a real referential | |
| void | setHeaderOptions () |
| Set some object properties according to the header (.minf), such as material, palette etc. | |
| virtual void | setProperties (carto::Object options) |
| Same as setHeaderOptions() and used by it, allows passing a dictionary. | |
| virtual void | storeHeaderOptions () |
| Store some object properties into the header (.minf), such as material, palette etc before saving the object. | |
| virtual carto::Object | makeHeaderOptions () const |
| get object properties into a generic object, such as material, palette etc before saving the object | |
| long | loadDate () const |
| Time the object was created, loaded or reloaded. | |
| void | setLoadDate (long t) |
| virtual void | update (const Observable *observable, void *arg) |
| This method is called whenever the observed object is changed. | |
| bool | isCopy () const |
| void | setCopyFlag (bool x=true) |
| virtual std::string | toolTip () const |
| tooltip displayed in 3D views (HTML). | |
| carto::Object | aimsMeshFromGLComponent () |
Public Member Functions inherited from anatomist::Observable | |
| Observable () | |
| Construct an Observable with zero observers. | |
| virtual | ~Observable () |
| does nothing | |
| void | addObserver (Observer *observer) |
| Adds an observer to the set of observers for this object. | |
| void | deleteObserver (Observer *observer) |
| Deletes an observer from the set of observers of this object. | |
| 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 ) | |
| int | countObservers () const |
| Returns the number of observers of this object. | |
| virtual void | notifyObservers (void *arg=0) |
| If this object has changed, as indicated by the hasChanged method, then notify all of its observers. | |
| virtual void | notifyUnregisterObservers () |
| Notifies observable destruction to all observers and unregisters them. | |
| bool | hasChanged () const |
| Tests if this object has changed. | |
| bool | obsHasChanged (int) const |
| only valid during an Observer::update() | |
| bool | obsHasChanged (const std::string &) const |
| only valid during an Observer::update() | |
| void | setChanged () const |
| Indicates that this object has changed. | |
Public Member Functions inherited from carto::SharedObject | |
| SharedObject () | |
| SharedObject (const SharedObject &x) | |
| virtual | ~SharedObject () |
| SharedObject & | operator= (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 &) | |
| RCObject & | operator= (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. | |
| static bool | reload (AObject *object, bool onlyoutdated=false) |
| Reads from disk again. | |
| static int | registerObjectType (const std::string &id) |
| Creates a new object type number and returns it. | |
| static std::string | objectTypeName (int type) |
| static void | setObjectMenu (std::string type, carto::rc_ptr< ObjectMenu > om) |
| static carto::rc_ptr< ObjectMenu > | getObjectMenu (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) | |
Protected Member Functions | |
| const PrimList & | primitives () const |
| PrimList & | primitives () |
| virtual void | cleanup () |
| must be called by objects destructors - Must be explicitly called by each object destructor since it can call virtual functions | |
| virtual void | clearReferentialInheritance () |
| sets the object to get referential from to null, unregister it | |
| AObject *& | _referentialInheritance () |
| provide access to derived classes | |
| virtual void | unregisterObservable (Observable *) |
| Called when an observable is destroyed, only called by Observable: don't use this function directly. | |
| AObject (const AObject &) | |
| copy constructor, protected and used only to reimplement clone() | |
| 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. | |
| void | obsSetChanged (int, bool=true) const |
| int-based change flags (use enums to address them) | |
| void | obsSetChanged (const std::string &, bool=true) const |
| string-based change flags | |
Protected Member Functions inherited from carto::SharedObject | |
| void | disableRefCount () |
Protected Member Functions inherited from carto::WeakObject | |
| WeakObject () | |
| WeakObject (const WeakObject &) | |
| WeakObject & | operator= (const WeakObject &) |
Protected Member Functions inherited from anatomist::Observer | |
| virtual void | cleanupObserver () |
| call this function from inherited classes destructors. | |
| virtual void | registerObservable (Observable *) |
| only called by Observable: don't use this function directly | |
| const std::set< Observable * > & | observed () const |
Protected Attributes | |
| int | _type |
| Should be static in each object class. | |
| 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) | |
| Referential * | _referential |
| Referentiel. | |
| bool | _referenceHasChanged |
| Reference has-changed flag. | |
| AObjectPalette * | _palette |
| Palette. | |
Static Protected Attributes | |
| static std::map< std::string, int > | _objectTypes |
| name-to-type map | |
| static std::map< int, std::string > | _objectTypeNames |
| type-to-name map | |
| static std::map< std::string, carto::rc_ptr< ObjectMenu > > | _objectmenu_map |
| Object Menu Map. | |
Friends | |
| class | StaticInitializers |
| typedef ObjectMenu *(* anatomist::AObject::ObjectMenuRegistrerFunction) (const AObject *objtype, ObjectMenu *menu) |
| typedef std::set<MObject*> anatomist::AObject::ParentList |
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)
| anatomist::AObject::AObject | ( | const std::string & | filename = "" | ) |
Referenced by anatomist::MObject::_eraseObject(), anatomist::MObject::_insertObject(), _referentialInheritance(), AObject(), anatomist::MObject::CanRemove(), clone(), anatomist::MObject::erase(), anatomist::MObject::eraseObject(), fallbackReferentialInheritance(), anatomist::MObject::find(), anatomist::Hierarchy::findMatchingNomenclature(), anatomist::MObject::insert(), material(), anatomist::MObject::MObject(), nearestVertex(), anatomist::MObject::nearestVertex(), objectAt(), objectAt(), anatomist::MObject::objectAt(), referentialInheritance(), reload(), setReferentialInheritance(), anatomist::MObject::setReferentialInheritance(), anatomist::MObject::update(), and anatomist::MObject::updateSubObjectReferential().
|
virtual |
|
protected |
|
protected |
provide access to derived classes
References AObject().
|
static |
|
static |
|
virtual |
Creates or updates object palette according to object values (if needed)
Reimplemented in anatomist::AVolume< T >, and anatomist::AVolumeView< T >.
| carto::Object anatomist::AObject::aimsMeshFromGLComponent | ( | ) |
| bool anatomist::AObject::allowsOverwriteOnSave | ( | ) | 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).
Reimplemented in anatomist::AConnectivityMatrix, anatomist::AGraph, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::ATexSurface, anatomist::ATexture, anatomist::AVolume< T >, anatomist::AVolumeView< T >, anatomist::Bucket, anatomist::CutMesh, anatomist::Fusion3D, anatomist::MObject, and anatomist::PlanarFusion3D.
|
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::AGraph, anatomist::AVolume< T >, anatomist::AVolumeView< T >, anatomist::Bucket, anatomist::Fusion2DMesh, and anatomist::MObject.
|
virtual |
Allows / unallows destruction of object.
(cannot be destroyed if part of some other kind of multi-object)
|
static |
cleanup static global variables (called when quitting anatomist)
|
protectedvirtual |
must be called by objects destructors - Must be explicitly called by each object destructor since it can call virtual functions
Referenced by anatomist::ASurface< 3 >::notifyObservers().
|
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::CutMesh, and anatomist::MObject.
|
protectedvirtual |
sets the object to get referential from to null, unregister it
Reimplemented in anatomist::MObject.
|
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::AGraph, anatomist::ASparseMatrix, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::ATexture, and anatomist::AVolume< T >.
References AObject().
|
virtual |
function called by getOrCreatePalette() - overloadable, need not be called directly
Reimplemented in anatomist::AGraph, anatomist::ATexture, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
References name().
|
inlinevirtual |
Number of texture values for a point.
Reimplemented in anatomist::ATexture, anatomist::AVolume< T >, and anatomist::Fusion2D.
|
virtual |
object to take referential from when no ref is assigned
Reimplemented in anatomist::CutMesh, anatomist::Fusion2D, anatomist::PlanarFusion3D, and anatomist::TesselatedMesh.
References AObject().
|
inline |
File name (if any) for loaded objects.
Definition at line 168 of file Object.h.
References _filename.
Referenced by anatomist::ASurface< D >::clone().
|
inlinevirtual |
Reimplemented in anatomist::AGraphObject, anatomist::ClippedObject, anatomist::CutMesh, anatomist::Fusion2DMesh, anatomist::GLMObject, anatomist::Slice, anatomist::TesselatedMesh, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
Definition at line 235 of file Object.h.
References _material.
Referenced by material(), anatomist::ASurface< D >::setSurface(), and anatomist::ASurface< D >::setSurface().
|
inlinestatic |
Definition at line 469 of file Object.h.
References _objectmenu_map, and type().
|
inlinestatic |
Definition at line 474 of file Object.h.
References _objectmenu_map.
|
virtual |
User normally calls this function.
| Referential * anatomist::AObject::getReferential | ( | ) | const |
|
virtual |
|
inlinevirtual |
OpenGL objects API.
Reimplemented in anatomist::AGLObject, anatomist::AGraph, anatomist::AMTexture, anatomist::Fusion2D, anatomist::Fusion2DMesh, anatomist::GLMObject, anatomist::SliceableObject, anatomist::TransformedObject, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
|
inlinevirtual |
OpenGL objects const API.
Reimplemented in anatomist::AGLObject, anatomist::AGraph, anatomist::AMTexture, anatomist::Fusion2D, anatomist::Fusion2DMesh, anatomist::GLMObject, anatomist::SliceableObject, anatomist::TransformedObject, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
Definition at line 151 of file Object.h.
Referenced by anatomist::TransformedObject::glAPI(), and anatomist::TransformedObject::glAPI().
| bool anatomist::AObject::hasReferenceChanged | ( | ) | const |
|
inlinevirtual |
Textured objects have values associated with a geometric coordinate.
Reimplemented in anatomist::AVolume< T >, anatomist::Fusion2D, and anatomist::Fusion3D.
|
inline |
|
inline |
|
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, anatomist::AVolumeBase, and anatomist::Hierarchy.
|
pure virtual |
Implemented in anatomist::AGraph, anatomist::AInterpoler, anatomist::AMTexture, anatomist::ASparseMatrix, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::ATexSurface, anatomist::ATexture, anatomist::AVolume< T >, anatomist::AVolumeView< T >, anatomist::Bucket, anatomist::ClippedObject, anatomist::CutMesh, anatomist::Fusion2D, anatomist::Fusion2DMesh, anatomist::Fusion3D, anatomist::Hierarchy, anatomist::MObject, anatomist::PlanarFusion3D, anatomist::Slice, anatomist::TesselatedMesh, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
|
pure virtual |
Implemented in anatomist::AGraph, anatomist::AInterpoler, anatomist::AMTexture, anatomist::ASparseMatrix, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::ATexSurface, anatomist::ATexture, anatomist::AVolume< T >, anatomist::AVolumeView< T >, anatomist::Bucket, anatomist::ClippedObject, anatomist::CutMesh, anatomist::Fusion2D, anatomist::Fusion3D, anatomist::Hierarchy, anatomist::MObject, anatomist::PlanarFusion3D, anatomist::Slice, anatomist::TesselatedMesh, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
| bool anatomist::AObject::isCopy | ( | ) | const |
|
virtual |
|
inlinevirtual |
maybe not necessary ?: we can use dynamic_cast instead
Reimplemented in anatomist::MObject.
|
virtual |
|
static |
Static object loader: creates an objects, loads its contents.
|
inlinevirtual |
| long anatomist::AObject::loadDate | ( | ) | const |
Time the object was created, loaded or reloaded.
|
virtual |
get object properties into a generic object, such as material, palette etc before saving the object
Reimplemented in anatomist::ClippedObject, anatomist::CutMesh, and anatomist::Slice.
|
inlinevirtual |
Reimplemented in anatomist::AGraphObject, anatomist::GLMObject, anatomist::TesselatedMesh, anatomist::VolRender, and anatomist::VolRenderShader.
Definition at line 236 of file Object.h.
References AObject(), and GetMaterial().
|
virtual |
Obsolete, deprecated.
Reimplemented in anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::AVolume< T >, anatomist::AVolumeView< T >, anatomist::Bucket, and anatomist::MObject.
|
virtual |
Obsolete, deprecated.
Reimplemented in anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::AVolume< T >, anatomist::AVolumeView< T >, anatomist::Bucket, and anatomist::MObject.
|
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.
References mixedTexValue().
Referenced by mixedTexValue().
|
inlinevirtual |
Same as above except that coordinates are not transformed but taken in object coordinates system.
Reimplemented in anatomist::AVolume< T >, and anatomist::Fusion2D.
Definition at line 542 of file Object.h.
References texValues().
|
inlinevirtual |
Reimplemented in anatomist::MObject.
|
inlinevirtual |
Reimplemented in anatomist::MObject.
|
inline |
Name shown in control window.
Definition at line 166 of file Object.h.
References _name.
Referenced by anatomist::AGraph::createDefaultPalette(), createDefaultPalette(), anatomist::ATexture::createDefaultPalette(), anatomist::VectorField::createDefaultPalette(), anatomist::VolRender::createDefaultPalette(), anatomist::VolRenderShader::createDefaultPalette(), anatomist::MObject::eraseObject(), and anatomist::Hierarchy::findNamedNode().
|
virtual |
Get the nearest vertex to a given position.
Only valid for a mesh-based object, otherwise 0 is returned. vertex and distance should point to a valid int and float, and will be filled with the mesh vertex index, and the distance to this vertex. If the object has children objects, the child with the nearest vertex will be returned. If tol is >=0, this tolerence threshold is used to filter out vertices too far (thus the function may fail and return 0). If polygon is given as a valid pointer to an int, the polygon index of the "nearest polygon" will also be filled. The nearest polygon will contain the nearest vertex, thus a polygon wich center is nearest to the given point can be discarded.
The base implementation will perform an exaustive search, thus is costy. Optimized implementations could make use of a kdtree algorithm, but this default one does not.
If the object is also displayed in a 3D window, OpenGL-based functions may be more efficient than this one.
Reimplemented in anatomist::MObject.
References AObject().
|
virtual |
Same with origin window referential.
References AObject().
|
virtual |
Find the object (sub-object) at given postion with a tolerence.
Reimplemented in anatomist::AGraph, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::ATexture, anatomist::AVolume< T >, anatomist::Bucket, and anatomist::MObject.
References AObject().
|
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 >.
Definition at line 419 of file Object.h.
References _type, and objectTypeName().
Referenced by anatomist::ASurface< D >::optionTree().
|
static |
References type().
Referenced by objectFullTypeName().
|
virtual |
Reimplemented in anatomist::ANormalsMesh, anatomist::ATexture, and anatomist::VectorField.
|
virtual |
Menu tree for new options, see object/optionMatcher.h.
Reimplemented in anatomist::AInterpoler, anatomist::AMTexture, anatomist::ANormalsMesh, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::ASurfMatcher, anatomist::ATexSurface, anatomist::Bucket, anatomist::ClippedObject, anatomist::CutMesh, anatomist::Fusion2D, anatomist::Fusion3D, anatomist::Hierarchy, anatomist::ObjectList, anatomist::ObjectVector, anatomist::PlanarFusion3D, anatomist::Slice, anatomist::TesselatedMesh, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
Referenced by anatomist::ASurface< D >::optionTree().
|
inlinevirtual |
Normally, getOrCreatePalette() should be used instead of this function in most cases.
Reimplemented in anatomist::AGraphObject, anatomist::ClippedObject, anatomist::GLMObject, anatomist::Slice, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
Definition at line 225 of file Object.h.
References _palette.
Referenced by setPalette().
|
inlinevirtual |
Reimplemented in anatomist::AGraphObject, anatomist::ClippedObject, anatomist::GLMObject, anatomist::Slice, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
Definition at line 226 of file Object.h.
References _palette.
|
inline |
|
inline |
List of multi-objects containing this one.
Definition at line 264 of file Object.h.
References _parents.
Referenced by anatomist::Hierarchy::findNamedNode().
|
inline |
| 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
|
protected |
|
protected |
|
inlinevirtual |
should be replaced by a real referential
Reimplemented in anatomist::AVolume< T >.
| AObject * anatomist::AObject::referentialInheritance | ( | ) | const |
if not null, the object referential is inherited from this object
References AObject().
|
static |
Creates a new object type number and returns it.
|
inlinevirtual |
|
virtual |
|
static |
Reads from disk again.
References AObject().
|
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::ASparseMatrix, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::ATexture, anatomist::AVolume< T >, and anatomist::Bucket.
rendering (generally 2D or 3D using OpenGL).
Calls GLComponent API ig glAPI() is not null, otherwise nothing is done and this method should be overloaded.
Reimplemented in anatomist::AConnectivityMatrix, anatomist::AGraph, anatomist::ANormalsMesh, anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::AVolumeView< T >, anatomist::ClippedObject, anatomist::CutMesh, anatomist::Fusion2D, anatomist::Fusion2DMesh, anatomist::Fusion3D, anatomist::GLMObject, anatomist::MObject, anatomist::Slice, anatomist::TesselatedMesh, anatomist::TransformedObject, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
Referenced by anatomist::ASurface< 3 >::glPolygonArray().
|
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::TransformedObject, anatomist::VolRender, and anatomist::VolRenderShader.
|
inlinevirtual |
|
virtual |
| bool anatomist::AObject::save | ( | const std::string & | filename, |
| bool | onlyIfModified ) |
| void anatomist::AObject::setAllowsOverwriteOnSave | ( | bool | x | ) |
| void anatomist::AObject::setCopyFlag | ( | bool | x = true | ) |
|
inlinevirtual |
Scans the object internals and determines its (texture) extrema values.
Reimplemented in anatomist::AVolume< T >, and anatomist::AVolumeView< T >.
| void anatomist::AObject::setFileName | ( | const std::string & | filename | ) |
Referenced by anatomist::ASurface< D >::clone().
|
inlinevirtual |
Scans the object internals and determines its geometry extrema.
Reimplemented in anatomist::AGraph, and anatomist::Bucket.
| void anatomist::AObject::setHeaderOptions | ( | ) |
Set some object properties according to the header (.minf), such as material, palette etc.
Referenced by anatomist::ASurface< D >::setInternalsChanged(), anatomist::ASurface< D >::setSurface(), and anatomist::ASurface< D >::setSurface().
| void anatomist::AObject::setId | ( | int | id | ) |
|
virtual |
Notifies some underlying lower-level objects have changed.
Useful especially after an underlying AIMS object has been modified
Reimplemented in anatomist::ASurface< D >, anatomist::ASurface< 2 >, anatomist::ASurface< 3 >, anatomist::ASurface< 3 >, anatomist::ATexture, anatomist::AVolume< T >, and anatomist::Bucket.
| void anatomist::AObject::setLoadDate | ( | long | t | ) |
|
virtual |
Reimplemented in anatomist::AGraph, anatomist::AGraphObject, anatomist::ClippedObject, anatomist::CutMesh, anatomist::Fusion2DMesh, anatomist::MObject, anatomist::Slice, anatomist::TesselatedMesh, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
Referenced by anatomist::ASurface< D >::setSurface(), and anatomist::ASurface< D >::setSurface().
| void anatomist::AObject::setName | ( | const std::string & | n | ) |
|
inlinestatic |
Definition at line 465 of file Object.h.
References _objectmenu_map, and type().
Referenced by anatomist::ASurface< D >::optionTree().
|
virtual |
Reimplemented in anatomist::AGraph, anatomist::ClippedObject, anatomist::MObject, anatomist::Slice, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
References palette().
|
virtual |
Same as setHeaderOptions() and used by it, allows passing a dictionary.
Reimplemented in anatomist::AGraph, anatomist::ClippedObject, anatomist::CutMesh, and anatomist::Slice.
|
virtual |
|
virtual |
Reimplemented in anatomist::MObject.
References carto::RCObject::ref.
|
virtual |
Reimplemented in anatomist::MObject.
References AObject().
|
inline |
| void anatomist::AObject::setUserModified | ( | bool | state = true | ) |
if the object has been modified by user interaction, and needs saving
|
inline |
|
inlinevirtual |
Reimplemented in anatomist::AGraph, anatomist::AVolume< T >, anatomist::Bucket, anatomist::Fusion2DMesh, and anatomist::VectorField.
|
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.
Referenced by anatomist::ASurface< D >::save().
|
inlinevirtual |
true if 2D rendering uses a textured plane (not a full openGL object)
Reimplemented in anatomist::AVolume< T >, anatomist::AVolumeView< T >, and anatomist::Fusion2D.
|
virtual |
Gets the array of texture values at a given location.
The optional poly argument, added in anatomist 5.2, is a hint of the mesh polygon, when it is known (used for an OpenGL selection from a 3D window). If left to -1, exaustive search is performed using the nearestVertex() method. If a positive value is passed, only the vertices of that polygon will be inspected. An object-specific implementation may ignore this polygon information (like for a volume, for instance).
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 mixedTexValue().
|
virtual |
Reimplemented in anatomist::AVolume< T >, and anatomist::Fusion2D.
|
virtual |
|
virtual |
|
virtual |
tooltip displayed in 3D views (HTML).
The default impementation returns an empty string, and the default tooltip will be displayed (see QAViewToolTip)
|
inline |
Object type identifier.
Should be virtual, each object shouldn't hold its own type
Definition at line 159 of file Object.h.
References _type.
Referenced by getObjectMenu(), anatomist::AConnectivityMatrix::MType(), anatomist::AMTexture::MType(), anatomist::ASurfMatcher::MType(), anatomist::AVolumeView< T >::MType(), anatomist::ClippedObject::MType(), anatomist::CutMesh::MType(), anatomist::PlanarFusion3D::MType(), anatomist::Slice::MType(), anatomist::TesselatedMesh::MType(), objectTypeName(), setObjectMenu(), anatomist::AGraphObject::setShowType(), and setType().
|
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.
References anatomist::Observer::Observable.
|
inlinevirtual |
|
virtual |
|
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.
| observable | the observable object |
Implements anatomist::Observer.
Reimplemented in anatomist::AConnectivityMatrix, anatomist::AInterpoler, anatomist::AMTexture, anatomist::ANormalsMesh, anatomist::ATexSurface, anatomist::ATexture, anatomist::AVolumeView< T >, anatomist::ClippedObject, anatomist::CutMesh, anatomist::Fusion2D, anatomist::Fusion2DMesh, anatomist::Fusion3D, anatomist::GLMObject, anatomist::MObject, anatomist::PlanarFusion3D, anatomist::Slice, anatomist::TesselatedMesh, anatomist::VectorField, anatomist::VolRender, and anatomist::VolRenderShader.
References anatomist::Observer::Observable.
| bool anatomist::AObject::userModified | ( | ) | const |
if the object has been modified by user interaction, and needs saving
|
inline |
|
virtual |
Returns at least 4 sizes. For 3D objects, returns (1, 1, 1, 1)
Reimplemented in anatomist::AGraph, anatomist::AVolume< T >, anatomist::AVolumeView< T >, anatomist::Bucket, anatomist::Fusion2D, anatomist::Fusion2DMesh, anatomist::MObject, anatomist::VectorField, and anatomist::VolRender.
Referenced by anatomist::ASurface< D >::actualTime(), anatomist::ASurface< D >::boundingBox(), anatomist::ASurface< D >::MaxT(), anatomist::ASurface< D >::MinT(), anatomist::ASurface< D >::surfaceOfTime(), and anatomist::ASurface< D >::surfaceOfTime().
|
inline |
|
friend |
Definition at line 531 of file Object.h.
References StaticInitializers.
Referenced by StaticInitializers.
|
protected |
Definition at line 505 of file Object.h.
Referenced by fileName().
|
protected |
Definition at line 508 of file Object.h.
Referenced by InMemory().
|
protected |
Should be a pointer: some objects don't have a material (2D objects)
Definition at line 513 of file Object.h.
Referenced by GetMaterial().
|
protected |
|
staticprotected |
Object Menu Map.
Definition at line 529 of file Object.h.
Referenced by getObjectMenu(), getObjectMenuMap(), and setObjectMenu().
|
staticprotected |
|
staticprotected |
|
mutableprotected |
|
protected |
Definition at line 510 of file Object.h.
Referenced by Parents(), parents(), parents(), RegisterParent(), and UnregisterParent().
|
mutableprotected |
|
protected |
|
protected |
Should be static in each object class.
Definition at line 502 of file Object.h.
Referenced by anatomist::ASurface< 3 >::glNumVertex(), objectFullTypeName(), setType(), and type().
|
protected |
Definition at line 509 of file Object.h.
Referenced by SetVisibility(), and Visible().
|
protected |