![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Base/Data.h>
Virtual base class for representing data from which all concrete data class such as images need to derive. More...
Inheritance diagram for Data:Virtual base class for representing data from which all concrete data class such as images need to derive.
Public Types | |
| 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... | |
Public Member Functions | |
| Data (const std::string &name="") | |
| Data (const Data &other) | |
| Data & | operator= (const Data &other) |
| virtual | ~Data () |
| Mandatory virtual destructor. | |
| virtual Kind | kind () const =0 |
| Return the kind of this data. | |
| 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. | |
| virtual bool | isAnnotationType () const |
| Return whether this data type is visualized through an annotation (e.g. mesh) | |
| virtual Geometry::AlignedBox | bounds () const =0 |
| Returns the axis-aligned bounding box of this data in world space. | |
| 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. | |
Static Public Member Functions | |
| 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 | |
| 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. | |
Protected Member Functions | |
| void | swapWith (Data &other) |
| Swaps the data and emits a matrix and name changed signal for both. | |
Protected Attributes | |
| 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. | |
Image matrix access | |
| virtual Pose::TransformationConvention | matrixConvention () const =0 |
| Defines whether the internally stored matrices in derived classes map from or to the world coordinate system. | |
| 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. | |
| enum Kind |
Kind of data.
| Enumerator | |
|---|---|
| UNKNOWN | Unknown or unspecified. |
| IMAGE | 2D image |
| VOLUME | 3D volume |
| IMAGESET | Set of 2D images. |
| VOLUMESET | Set of 3D volumes, i.e. 3D+t or 4D data. |
| IMAGESTREAM | Stream of 2D images. |
| VOLUMESTREAM | Stream of 3D volumes. |
| POINTSET | Set of points. |
| SURFACE | Surface / mesh data. |
| TRACKINGSTREAM | Stream of tracking data. |
| TRACKINGDATA | Instance of TrackingSequence class. |
| TREE | Instance of Tree class. |
| TENSOR | An arbitrary-dimensional array of floating point data. |
| POLYDATASTREAM | Stream of point clouds or meshes. |
| STEREOIMAGESET | Set of paired stereo images. |
| STEREOIMAGESTREAM | Stream of paired stereo images. |
| VOLUMETRICMESH | Volumetric unstructured grid / tetrahedral mesh. |
| enum Modality |
Image modality of the data.
|
pure virtual |
Return the kind of this data.
Implemented in ASCSet, DataGroup, GenericASC, Graph, Connection, IgtlTrackingOutStream, IgtlTrackingStream, ImageOutStream, ImageStream, Mesh, BoundingBoxSet, DataItem, KeypointSet, TensorSet, PlaybackTrackingStream, PointCloud, PolyDataOutStream, PolyDataStream, FrankaControlStream, RobotStateStream, RobotTrackingStream, ROSTfTrackingStream, ROSTopicImageOutStream, ROSTopicTrackingOutStream, ROSTopicTrackingStream, SharedImageSet, SpineData, StereoSharedImageSet, TensorBase, TrackingOutStream, TrackingSequence, TrackingStream, and Tree.
|
virtual |
Return the modality of this data.
The default implementation will always return NA, sub classes may override this method.
Reimplemented in Graph, ImageStream, RobotStateStream, SharedImageSet, and UltrasoundSweep.
| void setName | ( | const std::string & | name | ) |
|
pure virtual |
Defines whether the internally stored matrices in derived classes map from or to the world coordinate system.
Changes the behavior of the default implementations of matrixToWorld and matrixFromWorld.
Implemented in AnatomicalStructureCollection, ASCSet, DataGroup, Graph, Mesh, BoundingBoxSet, DataItem, KeypointSet, TensorSet, PointCloud, RobotTrackingStream, ROSTfTrackingStream, ROSTopicImageOutStream, ROSTopicImageStream, ROSTopicRGBDStream, ROSTopicTrackingOutStream, ROSTopicTrackingStream, SharedImageSet, StereoSharedImageSet, Stream, TensorBase, TrackedSharedImageSet, TrackingSequence, and Tree.
|
virtual |
Set matrix mapping from the world coordinate system to the data coordinate system.
m might be inverted before it is saved. The default implementation checks matrixConvention and accordingly calls setMatrix with either m or its inverse. Reimplemented in SharedImageSet.
|
virtual |
Set matrix mapping from the data coordinate system to the world coordinate system.
m might be inverted before it is saved. The default implementation checks matrixConvention and accordingly calls setMatrix with either m or its inverse. Reimplemented in SharedImageSet, and SpineData.
|
virtual |
Get matrix mapping from the world coordinate system to the data coordinate system.
Inverse of matrixToWorld.
Reimplemented in SharedImageSet.
|
virtual |
Get matrix mapping from the data coordinate system to the world coordinate system.
Inverse of matrixFromWorld.
Reimplemented in AnatomicalStructureCollection, SharedImageSet, and SpineData.
|
virtual |
Return the transformation matrix.
Reimplemented in RGBDPlayback, SharedImageSet, TrackedSharedImageSet, and TrackingSequence.
|
virtual |
Set the transformation matrix.
m depends on the concrete derived class implementation, with either a matrix mapping to or from the world coordinate system being expected. Only use if convention is explicitly known. Use methods setMatrixFromWorld or setMatrixToWorld to avoid inconsistencies. The default implementation sets m_matrix. Reimplemented in DataGroup, GenericASC, Mesh, DataItem, PointCloud, RGBDPlayback, SharedImageSet, SpineData, TrackedSharedImageSet, and TrackingSequence.
|
virtual |
Return whether this data type is visualized through an annotation (e.g. mesh)
Reimplemented in Mesh, PointCloud, TrackingSequence, and Tree.
|
pure virtual |
Returns the axis-aligned bounding box of this data in world space.
Implemented in AnatomicalStructureCollection, ASCSet, DataGroup, GenericASC, Graph, Mesh, BoundingBoxSet, DataItem, KeypointSet, TensorSet, PointCloud, SharedImageSet, SpineData, StereoSharedImageSet, Stream, TensorBase, TrackedSharedImageSet, TrackingSequence, Tree, and UltrasoundSweep.
|
inlinevirtual |
Human readable description of the data for showing in the info bar.
Reimplemented in ASCSet, GenericASC, ImageStream, BoundingBoxSet, DataItem, KeypointSet, TensorSet, RemoteVideoStream, RGBDPlayback, SharedImageSet, SpineData, StereoImageStream, StereoSharedImageSet, Stream, Tensor< Order >, Tensor< 1 >, TrackingSequence, TrackingStream, VideoCameraStream, and VideoFileStream.
|
protected |
Transformation matrix.
Derived class responsible for defining convention (mapping from or to world coordinate system), see matrix. Derived classes must lock matrix mutex before accessing the matrix.