![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/PointTree.h>
Data structure for trees with nodes containing a 3D point. More...
Inheritance diagram for PointTree:Data structure for trees with nodes containing a 3D point.
Public Member Functions | |
| Node * | addNode (std::unique_ptr< Node > node, Node *parent) override |
| Add node-child. | |
| std::unique_ptr< Tree > | detachNode (Node *node) override |
| Detach a node with all its children, and form a new tree from it. | |
| PointNode * | root () const |
| Get root. | |
| std::vector< PointNode * > | children (PointNode *node) const |
| Get children nodes. | |
| PointNode * | parent (PointNode *node) const |
| Get a parent node. | |
| std::string | typeName () const override |
Public Member Functions inherited from TypedTree< vec3 > | |
| Node * | addNode (std::unique_ptr< Node > node, Node *parent) override |
| Insert typed node below parent. | |
| std::unique_ptr< Tree > | detachNode (Node *node) override |
| Detach a node with all its children, and form a new tree from it. | |
| TypedNode< vec3 > * | root () const |
| Get root. | |
| std::vector< TypedNode< vec3 > * > | children (TypedNode< vec3 > *node) const |
| Get children nodes. | |
| TypedNode< vec3 > * | parent (TypedNode< vec3 > *node) const |
| Get a parent node. | |
| std::string | typeName () const override |
Public Member Functions inherited from Tree | |
| Tree (const Tree &) | |
| Tree & | operator= (const Tree &) |
| void | clear () |
| void | setFilename (const std::string &name) |
| Sets a filename from where this tree can be loaded. | |
| const std::string & | filename () const |
| Returns the filename from where this tree can be loaded or an empty string if it's not on disk. | |
| Kind | kind () const override |
| Return the kind of this data. | |
| Geometry::AlignedBox | bounds () const override |
| Returns the axis-aligned bounding box of this data in world space. | |
| vec3 | center () const |
| Returns the center in object space. | |
| vec3 | extent () const |
| Returns the extent in object space. | |
| const mat4 & | matrixRef () const |
| Pose::TransformationConvention | matrixConvention () const override |
| Matrices of trees map to world coordinate system. | |
| bool | isAnnotationType () const override |
| Return whether this data type is visualized through an annotation (e.g. mesh) | |
| void | configure (const Properties *p) override |
| Configure this object instance by de-serializing the given Properties. | |
| void | configuration (Properties *p) const override |
| Serialize the current object configuration into the given Properties object. | |
| void | addTreeAsNode (Node *node, std::unique_ptr< Tree > tree) |
| Add tree as a child-node to node. | |
| void | removeNode (Node *node) |
| Remove node and all its children. Deletes all affected nodes. | |
| bool | containsNode (Node *node) const |
| Returns true if the tree contains the specified node. | |
| bool | containsNode (Node *parentNode, Node *possibleChildNode) const |
| Check whether parentNode contains possibleChildNode as a child somewhere down the tree. | |
| void | detachNode (Tree &tree, Node *node) |
| Detach a node with all its children, and fill a tree from it. | |
| void | changeRoot (Node *rootNode) |
| Change root of the tree to rootNode. rootNode must be a part of the tree. | |
| Node * | node (int id) const |
| Get node through its id. | |
| Node * | root () const |
| Get root node. | |
| std::vector< Node * > | children (Node *node) const |
| Get child nodes. | |
| Node * | parent (Node *node) const |
| Get parent node. | |
| int | nodeLevel (Node *node) const |
| get level of the node (root being 0, its children 1 and so on) | |
| void | traverse (std::function< void(Node *, int level)> fcn, bool breadthFirst, int maxLevel=-1) |
| Function which traverses the tree using breadth-first approach (if flag breadthFirst is set to true), or depth-first approach (if flag breadthFirst is set to false). | |
| int | size () const |
| Return number of nodes in the tree. | |
| bool | empty () const |
| Check whether tree is empty. | |
Public Member Functions inherited from Data | |
| Data (const std::string &name="") | |
| Data (const Data &other) | |
| Data & | operator= (const Data &other) |
| virtual | ~Data () |
| Mandatory virtual destructor. | |
| virtual Modality | modality () const |
| Return the modality of this data. | |
| const std::string & | name () const |
| Return the name of this data. | |
| void | setName (const std::string &name) |
| Sets the name of this data. | |
| const DataComponentList & | components () const |
| Returns the list of DataComponents for this data. | |
| DataComponentList & | components () |
| virtual std::string | describe () const |
| Human readable description of the data for showing in the info bar. | |
| virtual void | setMatrixFromWorld (const mat4 &m) |
| Set matrix mapping from the world coordinate system to the data coordinate system. | |
| virtual void | setMatrixToWorld (const mat4 &m) |
| Set matrix mapping from the data coordinate system to the world coordinate system. | |
| virtual mat4 | matrixFromWorld () const |
| Get matrix mapping from the world coordinate system to the data coordinate system. | |
| virtual mat4 | matrixToWorld () const |
| Get matrix mapping from the data coordinate system to the world coordinate system. | |
| virtual mat4 | matrix () const |
| Return the transformation matrix. | |
| virtual void | setMatrix (const mat4 &m) |
| Set the transformation matrix. | |
Public Member Functions inherited from Configurable | |
| virtual void | configureDefaults () |
| Retrieve the properties of this object, replaces values with their defaults and sets it again. | |
| void | registerParameter (ParameterBase *param) |
| Register the given Parameter or SubProperty, so that it will be configured during configure()/configuration(). | |
| void | unregisterParameter (const ParameterBase *param) |
| Remove the given Parameter or SubProperty from the list of registered parameters. | |
| Configurable (const Configurable &rhs) | |
| Configurable (Configurable &&rhs) noexcept | |
| Configurable & | operator= (const Configurable &) |
| Configurable & | operator= (Configurable &&) noexcept |
Additional Inherited Members | |
Public Types inherited from Data | |
| enum | Kind { UNKNOWN = 0 , IMAGE = 1 , VOLUME = 2 , IMAGESET = 3 , VOLUMESET = 4 , IMAGESTREAM = 5 , VOLUMESTREAM = 6 , POINTSET = 7 , SURFACE = 8 , TRACKINGSTREAM = 9 , LIVETRACKINGSTREAM = TRACKINGSTREAM , TRACKINGDATA = 10 , TREE = 11 , TENSOR = 12 , POLYDATASTREAM = 13 , STEREOIMAGESET = 14 , STEREOIMAGESTREAM = 15 , VOLUMETRICMESH = 16 } |
| Kind of data. More... | |
| enum | Modality { NA = 0 , XRAY = 1 , CT = 2 , MRI = 3 , ULTRASOUND = 4 , VIDEO = 5 , NM = 6 , OCT = 7 , LABEL = 8 , DISTANCE = 9 } |
| Image modality of the data. More... | |
Static Public Member Functions inherited from Data | |
| static std::string | modalityString (Data::Modality m) |
| Return the name of an image modality. | |
| static Data::Modality | stringToModality (const std::string &s) |
| Returns the modality corresponding to a modality string or NA if nothing matches. | |
Public Attributes inherited from Data | |
| Signal< const Data * > | signalDeleted |
| Signal emitted when this instance is deleted. | |
| Signal< const Data * > | signalMatrixChanged |
| Signal emitted when the transformation of this Data has changed. | |
| Signal< std::string > | signalNameChanged |
| Signal emitted when the name changed. | |
Public Attributes inherited from Configurable | |
| Signal | signalParametersChanged |
Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted. | |
Protected Member Functions inherited from Data | |
| void | swapWith (Data &other) |
| Swaps the data and emits a matrix and name changed signal for both. | |
Protected Attributes inherited from Tree | |
| std::unordered_map< int, std::unique_ptr< Node > > | m_nodes |
| std::string | m_filename |
| int | m_idCounter |
Protected Attributes inherited from Data | |
| mat4 | m_matrix |
| Transformation matrix. | |
| std::recursive_mutex * | m_matrixMutex |
| Used to internally synchronize access to the matrix of data. | |
| DataComponentList | m_dataComponentList |
| The list of DataComponents for this data. | |
Protected Attributes inherited from Configurable | |
| std::vector< Param > | m_params |
| List of all registered Parameter and SubProperty instances. | |
|
inlineoverridevirtual |
Add node-child.
Returns true if node is added successfully, false otherwise (probably due to invalid parent). nullptr parent means that the node should be a root of the tree. If tree already has a root, the node will not be added
Reimplemented from Tree.
|
overridevirtual |
Detach a node with all its children, and form a new tree from it.
Reimplemented from Tree.
|
overridevirtual |
Reimplemented from Tree.