ImFusion SDK 4.3
DataComponentBase Class Referenceabstract

#include <ImFusion/Base/DataComponent.h>

Data components provide a way to generically attach custom information objects. More...

Inherits Configurable.

Inherited by DataComponent< ASCDisplayOptions >, DataComponent< ASCSetDisplayOptions >, DataComponent< AnatomyDataComponent >, DataComponent< ConeBeamDisplayOptions >, DataComponent< ConeBeamMetadata >, DataComponent< DetectorDataComponent >, DataComponent< DetectorPropertiesDataComponent >, DataComponent< SourceDataComponent >, DataComponent< CameraCalibrationDataComponent >, DataComponent< DataSourceComponent >, DataComponent< DatasetLicenseComponent >, DataComponent< ClinicalTrialSubjectDataComponent >, DataComponent< GeneralEquipmentModuleDataComponent >, DataComponent< RTStructureDataComponent >, DataComponent< ReferencedInstancesComponent >, DataComponent< SourceInfoComponent >, DataComponent< DisplayOptions2d >, DataComponent< DisplayOptions3d >, DataComponent< GatingMetadata >, DataComponent< DisplayOptions >, DataComponent< IMURawMetadata >, DataComponent< ImageInfoDataComponent >, DataComponent< ImageTemplateDataComponent >, DataComponent< InstrumentCalibrationDataComponent >, DataComponent< LabelDataComponent >, DataComponent< InversionComponent >, DataComponent< PaddingDoneDataComponent >, DataComponent< PatchesFromImageDataComponent >, DataComponent< ProcessingRecordComponent >, DataComponent< ReferenceImageDataComponent >, DataComponent< TargetTag >, DataComponent< MeshDisplayOptions >, DataComponent< PointsStorageComponent >, DataComponent< PolyDataStreamDisplayOptions >, DataComponent< PolyDataStreamMeshDisplayOptions >, DataComponent< PolyDataStreamPointCloudDisplayOptions >, DataComponent< RGBDDataComponent >, DataComponent< RealWorldMappingDataComponent >, DataComponent< HighResTimestampDataComponent >, DataComponent< JointTrajectoryDataComponent >, DataComponent< ContoursStorageComponent >, DataComponent< StereoCalibrationDataComponent >, DataComponent< TimestampDataComponent >, DataComponent< TrackingInstrumentFiducialsData >, DataComponent< TrackingInstrumentRawData< T > >, DataComponent< TrackingStreamDisplayOptions >, DataComponent< TransformationStashDataComponent >, DataComponent< FrameGeometry3D >, DataComponent< FrameGeometryConvex3D >, DataComponent< FrameGeometryMetadata >, DataComponent< FrameGrabbingConfigComponent >, DataComponent< RawDataComponent >, DataComponent< ScanlineConfiguration3D >, DataComponent< SweepDisplayOptions >, DataComponent< UltrasoundMetadata >, DataComponent< VectorDataComponent >, DataComponent< VitalsDataComponent >, DataComponent< T >, and TemporaryDataComponent.

Detailed Description

Data components provide a way to generically attach custom information objects.

Data and StreamData are the two main classes that hold a list of data components, allowing custom information (for example optional data or configuration settings) to be attached to instances of these classes. Data components are meant to be used for information that is bound to a specific Data instance and that can not be represented by the usual ImFusion data types.

Data components typically inherit from DataComponent and should implement DataComponentBase::id and the Configurable methods, as well as be registered with the DataComponentFactory in order to support generic (de)serialization. Non-serializable data components (e.g. temporary metadata) should simply inherit from TemporaryDataComponent.

The DataComponentBase interface is neither copy-constructible nor assignable. However, it provides clone(), assign() and equals() interfaces. This is by design to make the caveats of the polymorphic behavior of these functions explicit. You can implement these functions manually, but you most likely want to use one of these two specializations instead:

  • DataComponent: if you need serialization, make your data component copy-constructible, assignable, and equality-comparable (implement operator==), and use this specialization. It will automatically forward clone(), assign(), and equals() to the corresponding functions of your class.
  • TemporaryDataComponent: this specialization provides an empty implementation for all virtual functions of DataComponentBase, which effectively disables serialization, copying, assignment, and comparison. Use it, for example, to act as a temporary cache during runtime. As for LegacyDataComponent: this serialization implements clone(), assign(), and equals() through the Configurable interface. While this may be convenient, it is also likely to be slow and inefficient, and it does not necessarily produce bitwise identical results. As the name implies, we discourage using it.
Note
Data components are supposed to act as generic storage for custom information. When subclassing DataComponentBase, you should not implement any heavy evaluation logic since this is the domain of Algorithms or other classes accessing the DataComponents.
See also
DataComponentFactory, DataComponentList, Data, StreamData, LazyInstantiatedDataComponent

Public Member Functions

virtual std::string id () const =0
 Returns a unique string identifier for this type of data component.
 
virtual std::unique_ptr< DataComponentBaseclone () const =0
 Creates a clone of this data component.
 
virtual bool assign (const DataComponentBase &other)=0
 Assigns the content of other to this data component.
 
virtual bool equals (const DataComponentBase &other) const =0
 Compares this data component to other for equality.
 
- Public Member Functions inherited from Configurable
virtual void configure (const Properties *p)
 Configure this object instance by de-serializing the given Properties.
 
virtual void configuration (Properties *p) const
 Serialize the current object configuration into the given Properties object.
 
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
 
Configurableoperator= (const Configurable &)
 
Configurableoperator= (Configurable &&) noexcept
 

Protected Member Functions

 DataComponentBase (const DataComponentBase &)=default
 
DataComponentBaseoperator= (const DataComponentBase &other)=default
 

Additional Inherited Members

- Public Attributes inherited from Configurable
Signal signalParametersChanged
 Emitted whenever one of the registered Parameters' or SubPropertys' signalValueChanged signal was emitted.
 
- Protected Attributes inherited from Configurable
std::vector< Paramm_params
 List of all registered Parameter and SubProperty instances.
 

Member Function Documentation

◆ id()

virtual std::string id ( ) const
pure virtual

Returns a unique string identifier for this type of data component.

Note
To avoid conflicts make sure to include potential plugin names into this ID. Due to the modular architecture of the ImFusion library, uniqueness of IDs cannot be checked at compile time. However, DataComponentFactory will check the uniqueness of the ID during registration.

Implemented in AnatomyDataComponent, ASCDisplayOptions, ASCSetDisplayOptions, CameraCalibrationDataComponent, ConeBeamDisplayOptions, ConeBeamMetadata, DetectorDataComponent, DetectorPropertiesDataComponent, SourceDataComponent, DatasetLicenseComponent, DataSourceComponent, ClinicalTrialSubjectDataComponent, GeneralEquipmentModuleDataComponent, ReferencedInstancesComponent, RTStructureDataComponent, SourceInfoComponent, DisplayOptions2d, DisplayOptions3d, GatingMetadata, GlGraph::DisplayOptions, GlTrackingSequence::DisplayOptions, ImageInfoDataComponent, ImageTemplateDataComponent, IMURawMetadata, InstrumentCalibrationDataComponent, LabelDataComponent, MeshDisplayOptions, InversionComponent, PaddingDoneDataComponent, PatchesFromImageDataComponent, ProcessingRecordComponent, ReferenceImageDataComponent, TargetTag, OctreeDataComponent, PointsStorageComponent, PolyDataStreamDisplayOptions, PolyDataStreamMeshDisplayOptions, PolyDataStreamPointCloudDisplayOptions, RealWorldMappingDataComponent, RGBDDataComponent, HighResTimestampDataComponent, JointTrajectoryDataComponent, ContoursStorageComponent, StereoCalibrationDataComponent, TemporaryDataComponent, TimestampDataComponent, TrackingInstrumentFiducialsData, TrackingInstrumentRawData< T >, TrackingStreamDisplayOptions, TransformationStashDataComponent, FrameGeometry3D, FrameGeometryConvex3D, FrameGeometryMetadata, FrameGrabbingConfigComponent, RawDataComponent, ScanlineConfiguration3D, SweepDisplayOptions, UltrasoundMetadata, VectorDataComponent, and VitalsDataComponent.

◆ clone()

virtual std::unique_ptr< DataComponentBase > clone ( ) const
pure virtual

Creates a clone of this data component.

Implemented in DataComponent< T >, DataComponent< AnatomyDataComponent >, DataComponent< ASCDisplayOptions >, DataComponent< ASCSetDisplayOptions >, DataComponent< CameraCalibrationDataComponent >, DataComponent< ClinicalTrialSubjectDataComponent >, DataComponent< ConeBeamDisplayOptions >, DataComponent< ConeBeamMetadata >, DataComponent< ContoursStorageComponent >, DataComponent< DatasetLicenseComponent >, DataComponent< DataSourceComponent >, DataComponent< DetectorDataComponent >, DataComponent< DetectorPropertiesDataComponent >, DataComponent< DisplayOptions >, DataComponent< DisplayOptions2d >, DataComponent< DisplayOptions3d >, DataComponent< FrameGeometry3D >, DataComponent< FrameGeometryConvex3D >, DataComponent< FrameGeometryMetadata >, DataComponent< FrameGrabbingConfigComponent >, DataComponent< GatingMetadata >, DataComponent< GeneralEquipmentModuleDataComponent >, DataComponent< HighResTimestampDataComponent >, DataComponent< ImageInfoDataComponent >, DataComponent< ImageTemplateDataComponent >, DataComponent< IMURawMetadata >, DataComponent< InstrumentCalibrationDataComponent >, DataComponent< InversionComponent >, DataComponent< JointTrajectoryDataComponent >, DataComponent< LabelDataComponent >, DataComponent< MeshDisplayOptions >, DataComponent< PaddingDoneDataComponent >, DataComponent< PatchesFromImageDataComponent >, DataComponent< PointsStorageComponent >, DataComponent< PolyDataStreamDisplayOptions >, DataComponent< PolyDataStreamMeshDisplayOptions >, DataComponent< PolyDataStreamPointCloudDisplayOptions >, DataComponent< ProcessingRecordComponent >, DataComponent< RawDataComponent >, DataComponent< RealWorldMappingDataComponent >, DataComponent< ReferencedInstancesComponent >, DataComponent< ReferenceImageDataComponent >, DataComponent< RGBDDataComponent >, DataComponent< RTStructureDataComponent >, DataComponent< ScanlineConfiguration3D >, DataComponent< SourceDataComponent >, DataComponent< SourceInfoComponent >, DataComponent< StereoCalibrationDataComponent >, DataComponent< SweepDisplayOptions >, DataComponent< TargetTag >, DataComponent< TimestampDataComponent >, DataComponent< TrackingInstrumentFiducialsData >, DataComponent< TrackingInstrumentRawData< T > >, DataComponent< TrackingStreamDisplayOptions >, DataComponent< TransformationStashDataComponent >, DataComponent< UltrasoundMetadata >, DataComponent< VectorDataComponent >, DataComponent< VitalsDataComponent >, OverlayDataComponent, and TemporaryDataComponent.

◆ assign()

virtual bool assign ( const DataComponentBase & other)
pure virtual

Assigns the content of other to this data component.

Parameters
otherSource data component for assignment.

Implemented in DataComponent< T >, DataComponent< AnatomyDataComponent >, DataComponent< ASCDisplayOptions >, DataComponent< ASCSetDisplayOptions >, DataComponent< CameraCalibrationDataComponent >, DataComponent< ClinicalTrialSubjectDataComponent >, DataComponent< ConeBeamDisplayOptions >, DataComponent< ConeBeamMetadata >, DataComponent< ContoursStorageComponent >, DataComponent< DatasetLicenseComponent >, DataComponent< DataSourceComponent >, DataComponent< DetectorDataComponent >, DataComponent< DetectorPropertiesDataComponent >, DataComponent< DisplayOptions >, DataComponent< DisplayOptions2d >, DataComponent< DisplayOptions3d >, DataComponent< FrameGeometry3D >, DataComponent< FrameGeometryConvex3D >, DataComponent< FrameGeometryMetadata >, DataComponent< FrameGrabbingConfigComponent >, DataComponent< GatingMetadata >, DataComponent< GeneralEquipmentModuleDataComponent >, DataComponent< HighResTimestampDataComponent >, DataComponent< ImageInfoDataComponent >, DataComponent< ImageTemplateDataComponent >, DataComponent< IMURawMetadata >, DataComponent< InstrumentCalibrationDataComponent >, DataComponent< InversionComponent >, DataComponent< JointTrajectoryDataComponent >, DataComponent< LabelDataComponent >, DataComponent< MeshDisplayOptions >, DataComponent< PaddingDoneDataComponent >, DataComponent< PatchesFromImageDataComponent >, DataComponent< PointsStorageComponent >, DataComponent< PolyDataStreamDisplayOptions >, DataComponent< PolyDataStreamMeshDisplayOptions >, DataComponent< PolyDataStreamPointCloudDisplayOptions >, DataComponent< ProcessingRecordComponent >, DataComponent< RawDataComponent >, DataComponent< RealWorldMappingDataComponent >, DataComponent< ReferencedInstancesComponent >, DataComponent< ReferenceImageDataComponent >, DataComponent< RGBDDataComponent >, DataComponent< RTStructureDataComponent >, DataComponent< ScanlineConfiguration3D >, DataComponent< SourceDataComponent >, DataComponent< SourceInfoComponent >, DataComponent< StereoCalibrationDataComponent >, DataComponent< SweepDisplayOptions >, DataComponent< TargetTag >, DataComponent< TimestampDataComponent >, DataComponent< TrackingInstrumentFiducialsData >, DataComponent< TrackingInstrumentRawData< T > >, DataComponent< TrackingStreamDisplayOptions >, DataComponent< TransformationStashDataComponent >, DataComponent< UltrasoundMetadata >, DataComponent< VectorDataComponent >, DataComponent< VitalsDataComponent >, OverlayDataComponent, and TemporaryDataComponent.

◆ equals()

virtual bool equals ( const DataComponentBase & other) const
pure virtual

Compares this data component to other for equality.

Parameters
otherOther data component to compare this one to.

Implemented in DataComponent< T >, DataComponent< AnatomyDataComponent >, DataComponent< ASCDisplayOptions >, DataComponent< ASCSetDisplayOptions >, DataComponent< CameraCalibrationDataComponent >, DataComponent< ClinicalTrialSubjectDataComponent >, DataComponent< ConeBeamDisplayOptions >, DataComponent< ConeBeamMetadata >, DataComponent< ContoursStorageComponent >, DataComponent< DatasetLicenseComponent >, DataComponent< DataSourceComponent >, DataComponent< DetectorDataComponent >, DataComponent< DetectorPropertiesDataComponent >, DataComponent< DisplayOptions >, DataComponent< DisplayOptions2d >, DataComponent< DisplayOptions3d >, DataComponent< FrameGeometry3D >, DataComponent< FrameGeometryConvex3D >, DataComponent< FrameGeometryMetadata >, DataComponent< FrameGrabbingConfigComponent >, DataComponent< GatingMetadata >, DataComponent< GeneralEquipmentModuleDataComponent >, DataComponent< HighResTimestampDataComponent >, DataComponent< ImageInfoDataComponent >, DataComponent< ImageTemplateDataComponent >, DataComponent< IMURawMetadata >, DataComponent< InstrumentCalibrationDataComponent >, DataComponent< InversionComponent >, DataComponent< JointTrajectoryDataComponent >, DataComponent< LabelDataComponent >, DataComponent< MeshDisplayOptions >, DataComponent< PaddingDoneDataComponent >, DataComponent< PatchesFromImageDataComponent >, DataComponent< PointsStorageComponent >, DataComponent< PolyDataStreamDisplayOptions >, DataComponent< PolyDataStreamMeshDisplayOptions >, DataComponent< PolyDataStreamPointCloudDisplayOptions >, DataComponent< ProcessingRecordComponent >, DataComponent< RawDataComponent >, DataComponent< RealWorldMappingDataComponent >, DataComponent< ReferencedInstancesComponent >, DataComponent< ReferenceImageDataComponent >, DataComponent< RGBDDataComponent >, DataComponent< RTStructureDataComponent >, DataComponent< ScanlineConfiguration3D >, DataComponent< SourceDataComponent >, DataComponent< SourceInfoComponent >, DataComponent< StereoCalibrationDataComponent >, DataComponent< SweepDisplayOptions >, DataComponent< TargetTag >, DataComponent< TimestampDataComponent >, DataComponent< TrackingInstrumentFiducialsData >, DataComponent< TrackingInstrumentRawData< T > >, DataComponent< TrackingStreamDisplayOptions >, DataComponent< TransformationStashDataComponent >, DataComponent< UltrasoundMetadata >, DataComponent< VectorDataComponent >, DataComponent< VitalsDataComponent >, and TemporaryDataComponent.


The documentation for this class was generated from the following file:
Search Tab / S to search, Esc to close