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