35 #ifndef ANA_GRAPH_GRAPH_H 36 #define ANA_GRAPH_GRAPH_H 63 AGraph(
Graph *dataGraph,
const std::string & filename,
65 const Point3d& labelDimension );
66 AGraph(
Graph *dataGraph,
const std::string & filename,
71 const Point3d& labelDimension );
81 virtual size_t size()
const;
87 virtual void insert(
AObject* obj, std::string syntacticAtt );
89 std::string syntacticAtt =
"fold" );
100 virtual bool boundingBox( std::vector<float> & bmin,
101 std::vector<float> & bmax )
const;
103 std::vector<float> & bmax )
const 109 virtual AObject*
objectAt(
const std::vector<float> & pos,
float tol = 0 );
118 virtual bool save(
const std::string & filename );
143 const std::string & newatt,
bool removeOld =
false,
144 bool dorels =
false );
154 virtual std::vector<float>
voxelSize()
const;
155 virtual void setVoxelSize(
const std::vector<float> & vs );
178 float my,
float mz,
float Mx,
float My,
float Mz );
183 typedef std::set<carto::shared_ptr<AObject> >
datatype;
186 friend class ::QGraphProperties;
188 void initialize(
const std::string & filename,
bool init,
#define DECLARE_GENERIC_OBJECT_TYPE(T)
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...
void updateAfterAimsChange()
to be called when there has been a structural modif on the AIMS graph
ViewState holds information about how a view wants to see an object.
Anatomist graph object: a list that manages destruction of its sub-elements.
virtual bool render(PrimList &, const ViewState &)
rendering (generally 2D or 3D using OpenGL).
ColorMode colorMode() const
BucketMap< Void > * mask(const BucketMap< Void > &src, const BucketMap< Void > &m, bool intersect=true)
virtual size_t size() const
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).
Base Anatomist object (abstract)
Multi-object generic iterator.
virtual void insert(AObject *)
std::list< carto::rc_ptr< GLItem > > PrimList
std::string labelProperty(bool allowDefault=true) const
property used to store the current label.
Multi-object : base abstract class for objects that contain others.
void copyAttributes(const std::string &oldatt, const std::string &newatt, bool removeOld=false, bool dorels=false)
Graph * graph() const
low-level data acces
virtual void update(const Observable *observable, void *arg)
This class is an Observer of each of the AObject it groups.
const carto::rc_ptr< std::map< std::string, std::vector< int > > > objAttColors() const
void setColorPropertyMask(int, bool update=true)
bitwise combination of 1: nodes, 2: relations
virtual carto::GenericObject * attributed()
virtual const AObjectPalette * glPalette(unsigned tex=0) const
void setLabelProperty(const std::string &prop)
std::string name() const
Name shown in control window.
void setColorMode(ColorMode, bool update=true)
Attributed objects wrapper.
int colorPropertyMask() const
bool Is3DObject()
Can be display in 3D windows.
std::set< std::string > mappableEdgeProperties() const
virtual void erase(iterator &)
This class has to be rewritten, it's really really a shame.......
virtual bool boundingBox2D(std::vector< float > &bmin, std::vector< float > &bmax) const
Bounding box in 2D views mode.
Point3dl labelsVolumeDimension() const
std::set< std::string > mappableVertexProperties() const
virtual bool shouldRemoveChildrenWithMe() const
tells whether children objects should be removed from views when this MObject is removed from a view...
virtual void fillVol(AimsData< AObject *> &vol, int t, float mx, float my, float mz, float Mx, float My, float Mz)
Fills a volume of labels for a given time.
static bool(* specialColorFunc)(AGraph *ag, AGraphObject *go, Material &mat)
Used to map special colors on graph objects while changing the graph material.
virtual void setVoxelSize(const std::vector< float > &vs)
virtual bool savable() const
virtual void setGeomExtrema()
Scans the object internals and determines its geometry extrema.
void setGraph(carto::rc_ptr< Graph >)
static AObject * LoadGraph(const std::string &filename, carto::Object options=carto::none())
virtual void SetMaterial(const Material &mat)
virtual AObject * objectAt(const std::vector< float > &pos, float tol=0)
Find the object (sub-object) at given postion with a tolerence.
bool Is2DObject()
Can be display in 2D windows.
AimsData< AObject * > & volumeOfLabels(int t=0)
virtual GLComponent * glAPI()
std::set< carto::shared_ptr< AObject > > datatype
Data storage type, to be redefined by children classes.
void setLabelsVolumeDimension(unsigned dx, unsigned dy, unsigned dz)
virtual const_iterator find(const AObject *) const
Base class for all OpenGL objects in Anatomist (with OpenGL display lists)
virtual int MType() const
Precise type of multi-object.
void loadSubObjects(int mask)
virtual std::vector< float > voxelSize() const
Returns at least 4 sizes. For 3D objects, returns (1, 1, 1, 1)
AGraph(Graph *dataGraph, const std::string &filename, bool init, const Point3d &labelDimension)
std::string colorProperty() const
property mapped with colormap
virtual void setPalette(const AObjectPalette &pal)
virtual void setProperties(carto::Object options)
Same as setHeaderOptions() and used by it, allows passing a dictionary.
void setColorProperty(const std::string &, bool update=true)
virtual bool save(const std::string &filename)
virtual void createDefaultPalette(const std::string &name)
function called by getOrCreatePalette() - overloadable, need not be called directly ...
void saveSubObjects(bool filenamechanged=false)