ImFusion SDK 4.3
ParameterBase Class Referenceabstract

#include <ImFusion/Core/ParameterBase.h>

Shared base interface of Parameter and SubProperty so that Configurable can maintain a collection of those. More...

Inherited by Parameter< double >, Parameter< GlMesh::RenderMode3d >, Parameter< GlMesh::MaterialMode >, Parameter< bool >, Parameter< ImageDisplayMode >, Parameter< GlPointCloud::MaterialMode >, Parameter< GraphRenderMode >, Parameter< RegistrationType >, Parameter< RegistrationMethod >, Parameter< RegistrationMode >, Parameter< std::optional< std::vector< std::string > > >, Parameter< SelectionMode >, Parameter< DeformationModel >, Parameter< CorrespondenceDirection >, Parameter< int >, Parameter< std::vector< std::string > >, Parameter< AlignmentMethod >, Parameter< std::string >, Parameter< size_t >, Parameter< std::optional< double > >, Parameter< Mode >, Parameter< vec2i >, Parameter< MotionMode >, Parameter< std::vector< bool > >, Parameter< float >, Parameter< RenderMode3d >, Parameter< std::optional< std::string > >, Parameter< IntensityMode >, Parameter< GeometryPreset >, Parameter< MotionPreset >, Parameter< Projection >, Parameter< PixelType >, Parameter< std::optional< Random::Generator::Seed > >, Parameter< std::vector< int > >, Parameter< vec3 >, Parameter< CropFanMode >, Parameter< mat4 >, Parameter< Curvature >, Parameter< std::vector< vec2 > >, Parameter< std::optional< std::vector< float > > >, Parameter< AdditionalWeights >, Parameter< ParameterMode >, Parameter< DRRMode >, Parameter< vec2 >, Parameter< BeadDetectionMode >, Parameter< Initialization >, Parameter< MemoryOption >, Parameter< ImFusion::Filesystem::Path >, Parameter< MatrixSerializationFormat >, Parameter< ProjectionCoordinateSpace >, Parameter< TransformationReference >, Parameter< InitializationMode >, Parameter< ComputationPhase >, Parameter< std::vector< vec3 > >, Parameter< mat3 >, Parameter< vec5 >, Parameter< vec4 >, Parameter< std::optional< int > >, Parameter< ImageProcessing::Axis >, Parameter< CombinationMode >, Parameter< vec3i >, Parameter< uint64_t >, Parameter< PreAlignment >, Parameter< NearestNeighborDirection >, Parameter< MovingInput >, Parameter< PointCloudInterpretation >, Parameter< Adjustment >, Parameter< GradientType >, Parameter< std::vector< double > >, Parameter< DescriptorType >, Parameter< Transformation >, Parameter< WeightType >, Parameter< Log::Level >, Parameter< Dicom::AnonymizationProfile >, Parameter< unsigned int >, Parameter< Method >, Parameter< DistanceType >, Parameter< std::optional< size_t > >, Parameter< Graph::Dimension >, Parameter< Graph::Type >, Parameter< ScalingMode >, Parameter< PolyDataType >, Parameter< Similarity >, Parameter< unsigned char >, Parameter< ShapeType >, Parameter< GlColormap::Preset >, Parameter< ColorMode >, Parameter< uint16_t >, Parameter< RenderMode >, Parameter< Material::Mode >, Parameter< std::optional< vec4 > >, Parameter< PickingMode >, Parameter< IndicatorType >, Parameter< IndicatorVisibility >, Parameter< ColorOptions >, Parameter< Norm >, Parameter< CalibrationType >, Parameter< StreamInfo >, Parameter< CalibrationMethod >, Parameter< GatingType >, Parameter< InpaintingMethod >, Parameter< ReductionMode >, Parameter< InterpolationMode >, Parameter< ResamplingMode >, Parameter< ImageUndistortion::InterpolationMode >, Parameter< Quantization >, Parameter< std::vector< unsigned char > >, Parameter< ThresholdingMode >, Parameter< HandEyeCalibrationAlgorithm::CalibrationType >, Parameter< HandEyeCalibrationAlgorithm::StreamInfo >, Parameter< std::optional< vec3 > >, Parameter< PaddingMode >, Parameter< ML::ParamUnit >, Parameter< ParamUnit >, Parameter< std::vector< float > >, Parameter< std::vector< vec3f > >, Parameter< ExtractionMode >, Parameter< ClusterMergingMode >, Parameter< ModelType >, Parameter< ModelPreset >, Parameter< std::optional< uint8_t > >, Parameter< vec2f >, Parameter< std::optional< vec2 > >, Parameter< RecombineMode >, Parameter< Data::Modality >, Parameter< MeshCreatorAlgorithm::Primitive >, Parameter< RenderMode2d >, Parameter< uint8_t >, Parameter< ColorSource >, Parameter< WeightMode >, Parameter< OperationMode >, Parameter< Distance >, Parameter< unsigned long long >, Parameter< GlPolyRigidDeformation::Mode >, Parameter< ConsoleType >, Parameter< std::size_t >, Parameter< OutputType >, Parameter< ReferenceFrame >, Parameter< Axis >, Parameter< RobotStreamType >, Parameter< InterpolationMethod >, Parameter< std::vector< std::size_t > >, Parameter< SmoothingMode >, Parameter< SortingStrategy >, Parameter< VolumeBasedMeshCurvatureAlgorithm::MeshColorData >, Parameter< AssociationMode >, Parameter< Device >, Parameter< TrackingStreamDisplayOptions::TrackingHistory >, Parameter< GlTrackingSequence::IndicatorType >, Parameter< TrackingStreamDisplayOptions::MatrixConvention >, Parameter< ScanOrientation >, Parameter< std::vector< mat4 > >, Parameter< TrackingHistory >, Parameter< MatrixConvention >, Parameter< FanMode >, Parameter< GeometryType >, Parameter< std::optional< vec3i > >, Parameter< Frames >, Parameter< SliceReferenceSpline >, Parameter< FrameGeometryType >, Parameter< SweepDisplayOptions::RenderMode3d >, Parameter< WeightingMode >, Parameter< MeshColorData >, SubProperty< std::unique_ptr< ImFusion::CT::ReconstructionAlgorithm > >, SubProperty< std::unique_ptr< ImFusion::CT::GeometryGenerator > >, SubProperty< ImFusion::ASCRegistrationMethods::ModifyBehavior::PerStructureBoolean >, SubProperty< ImFusion::CT::SourceDataComponent >, SubProperty< ImFusion::CT::DetectorDataComponent >, SubProperty< ImFusion::CT::RelativeTransformationConfig >, SubProperty< ImFusion::MotionModel >, SubProperty< ImFusion::CT::FullGeometryRepresentationWrapper >, SubProperty< std::unique_ptr< ImFusion::CT::ConeBeamGeometry > >, SubProperty< std::unique_ptr< ImFusion::CT::detail::TrivialConfigurable > >, SubProperty< ImFusion::CT::RelativeTransformationSetupWrapper >, SubProperty< ImFusion::MarkerConfiguration >, SubProperty< std::optional< ImFusion::DeformableIcp::RansacProperties > >, SubProperty< ImFusion::DescriptorsRegistrationAlgorithm::GlobalRegistrationConfig >, SubProperty< ImFusion::GlGraph::DisplayOptions::FeatureCircleOptions >, SubProperty< ImFusion::GlGraph::DisplayOptions::GeneralOptions >, SubProperty< ImFusion::GlGraph::DisplayOptions::FeatureColorMapOptions >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions::Material >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions::Clipping >, SubProperty< ImFusion::GlMeshRendererIntersection::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererContours::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererNormals::DisplayOptions >, SubProperty< std::optional< ImFusion::US::ScanlineConfiguration3D > >, SubProperty< std::optional< ImFusion::US::FrameGeometryConvex3D > >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::LandmarkWeightingConfig >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::SegmentationWeightingConfig >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::AdvancedConfig >, SubPropertyList< ImFusion::AnatomyPlugin::StyleSheet >, SubPropertyList< ImFusion::AnatomyPlugin::StyleSheet::StyleRule >, Parameter< T >, SubProperty< T >, and SubPropertyList< T >.

Detailed Description

Shared base interface of Parameter and SubProperty so that Configurable can maintain a collection of those.

Public Member Functions

 ParameterBase (const std::string &name)
 
virtual void configure (const Properties *p)=0
 Configure this parameter/sub property by de-serializing the given Properties.
 
virtual void configuration (Properties *p) const =0
 Serialize the current parameter/sub property state into the given Properties object.
 
const Configurableparent () const
 Return the parent Configurable instance that this parameter is registered with.
 
virtual const std::stringname () const
 Returns parameter name, can only be set during construction.
 
void setAttribute (const std::string &key, const std::string &value)
 Add the given attribute key-value pair to the set of parameter attributes.
 
void removeAttribute (const std::string &key)
 Remove the attribute with the given key.
 
const std::map< std::string, std::string > & attributes () const
 Get the attribute map.
 
void setLabel (const std::string &label)
 Sets an optional label for the Parameter if displayed in the UI.
 
void addDeprecatedName (const std::string &deprecatedName)
 Adds an optional alternative parameter name that should be used for param lookup for during configure() in case de-serialization from m_name was not successful.
 
const std::vector< std::string > & deprecatedNames () const
 Returns the list of deprecated parameter names that should be used for param lookup (see addDeprecatedName()).
 

Public Attributes

Signal signalValueChanged
 Signal gets emitted when the underlying value of the Parameter/SubProperty has changed (either through setValue() or configure()).
 

Protected Member Functions

void setParentFromCopy (const ParameterBase &other)
 Helper function to be called from a copy/move ctor in order to correctly set the parent relation ship to the new parent Configurable.
 

Protected Attributes

Configurablem_parent = nullptr
 
const std::string m_name
 
std::vector< std::stringm_deprecatedNames
 
std::map< std::string, std::stringm_attributes
 

Member Function Documentation

◆ configure()

virtual void configure ( const Properties * p)
pure virtual

Configure this parameter/sub property by de-serializing the given Properties.

Implemented in Parameter< T >, Parameter< AdditionalWeights >, Parameter< Adjustment >, Parameter< AlignmentMethod >, Parameter< AssociationMode >, Parameter< Axis >, Parameter< BeadDetectionMode >, Parameter< bool >, Parameter< CalibrationMethod >, Parameter< CalibrationType >, Parameter< ClusterMergingMode >, Parameter< ColorMode >, Parameter< ColorOptions >, Parameter< ColorSource >, Parameter< CombinationMode >, Parameter< ComputationPhase >, Parameter< ConsoleType >, Parameter< CorrespondenceDirection >, Parameter< CropFanMode >, Parameter< Curvature >, Parameter< Data::Modality >, Parameter< DeformationModel >, Parameter< DescriptorType >, Parameter< Device >, Parameter< Dicom::AnonymizationProfile >, Parameter< Distance >, Parameter< DistanceType >, Parameter< double >, Parameter< DRRMode >, Parameter< ExtractionMode >, Parameter< FanMode >, Parameter< float >, Parameter< FrameGeometryType >, Parameter< Frames >, Parameter< GatingType >, Parameter< GeometryPreset >, Parameter< GeometryType >, Parameter< GlColormap::Preset >, Parameter< GlMesh::MaterialMode >, Parameter< GlMesh::RenderMode3d >, Parameter< GlPointCloud::MaterialMode >, Parameter< GlPolyRigidDeformation::Mode >, Parameter< GlTrackingSequence::IndicatorType >, Parameter< GradientType >, Parameter< Graph::Dimension >, Parameter< Graph::Type >, Parameter< GraphRenderMode >, Parameter< HandEyeCalibrationAlgorithm::CalibrationType >, Parameter< HandEyeCalibrationAlgorithm::StreamInfo >, Parameter< ImageDisplayMode >, Parameter< ImageProcessing::Axis >, Parameter< ImageUndistortion::InterpolationMode >, Parameter< ImFusion::Filesystem::Path >, Parameter< IndicatorType >, Parameter< IndicatorVisibility >, Parameter< Initialization >, Parameter< InitializationMode >, Parameter< InpaintingMethod >, Parameter< int >, Parameter< IntensityMode >, Parameter< InterpolationMethod >, Parameter< InterpolationMode >, Parameter< Log::Level >, Parameter< mat3 >, Parameter< mat4 >, Parameter< Material::Mode >, Parameter< MatrixConvention >, Parameter< MatrixSerializationFormat >, Parameter< MemoryOption >, Parameter< MeshColorData >, Parameter< MeshCreatorAlgorithm::Primitive >, Parameter< Method >, Parameter< ML::ParamUnit >, Parameter< Mode >, Parameter< ModelPreset >, Parameter< ModelType >, Parameter< MotionMode >, Parameter< MotionPreset >, Parameter< MovingInput >, Parameter< NearestNeighborDirection >, Parameter< Norm >, Parameter< OperationMode >, Parameter< OutputType >, Parameter< PaddingMode >, Parameter< ParameterMode >, Parameter< ParamUnit >, Parameter< PickingMode >, Parameter< PixelType >, Parameter< PointCloudInterpretation >, Parameter< PolyDataType >, Parameter< PreAlignment >, Parameter< Projection >, Parameter< ProjectionCoordinateSpace >, Parameter< Quantization >, Parameter< RecombineMode >, Parameter< ReductionMode >, Parameter< ReferenceFrame >, Parameter< RegistrationMethod >, Parameter< RegistrationMode >, Parameter< RegistrationType >, Parameter< RenderMode >, Parameter< RenderMode2d >, Parameter< RenderMode3d >, Parameter< ResamplingMode >, Parameter< RobotStreamType >, Parameter< ScalingMode >, Parameter< ScanOrientation >, Parameter< SelectionMode >, Parameter< ShapeType >, Parameter< Similarity >, Parameter< size_t >, Parameter< SliceReferenceSpline >, Parameter< SmoothingMode >, Parameter< SortingStrategy >, Parameter< std::optional< double > >, Parameter< std::optional< int > >, Parameter< std::optional< Random::Generator::Seed > >, Parameter< std::optional< size_t > >, Parameter< std::optional< std::string > >, Parameter< std::optional< std::vector< float > > >, Parameter< std::optional< std::vector< std::string > > >, Parameter< std::optional< uint8_t > >, Parameter< std::optional< vec2 > >, Parameter< std::optional< vec3 > >, Parameter< std::optional< vec3i > >, Parameter< std::optional< vec4 > >, Parameter< std::size_t >, Parameter< std::string >, Parameter< std::vector< bool > >, Parameter< std::vector< double > >, Parameter< std::vector< float > >, Parameter< std::vector< int > >, Parameter< std::vector< mat4 > >, Parameter< std::vector< std::size_t > >, Parameter< std::vector< std::string > >, Parameter< std::vector< unsigned char > >, Parameter< std::vector< vec2 > >, Parameter< std::vector< vec3 > >, Parameter< std::vector< vec3f > >, Parameter< StreamInfo >, Parameter< SweepDisplayOptions::RenderMode3d >, Parameter< ThresholdingMode >, Parameter< TrackingHistory >, Parameter< TrackingStreamDisplayOptions::MatrixConvention >, Parameter< TrackingStreamDisplayOptions::TrackingHistory >, Parameter< Transformation >, Parameter< TransformationReference >, Parameter< uint16_t >, Parameter< uint64_t >, Parameter< uint8_t >, Parameter< unsigned char >, Parameter< unsigned int >, Parameter< unsigned long long >, Parameter< vec2 >, Parameter< vec2f >, Parameter< vec2i >, Parameter< vec3 >, Parameter< vec3i >, Parameter< vec4 >, Parameter< vec5 >, Parameter< VolumeBasedMeshCurvatureAlgorithm::MeshColorData >, Parameter< WeightingMode >, Parameter< WeightMode >, Parameter< WeightType >, SubProperty< T >, SubProperty< ImFusion::ASCRegistrationMethods::ModifyBehavior::PerStructureBoolean >, SubProperty< ImFusion::CT::DetectorDataComponent >, SubProperty< ImFusion::CT::FullGeometryRepresentationWrapper >, SubProperty< ImFusion::CT::RelativeTransformationConfig >, SubProperty< ImFusion::CT::RelativeTransformationSetupWrapper >, SubProperty< ImFusion::CT::SourceDataComponent >, SubProperty< ImFusion::DescriptorsRegistrationAlgorithm::GlobalRegistrationConfig >, SubProperty< ImFusion::GlGraph::DisplayOptions::FeatureCircleOptions >, SubProperty< ImFusion::GlGraph::DisplayOptions::FeatureColorMapOptions >, SubProperty< ImFusion::GlGraph::DisplayOptions::GeneralOptions >, SubProperty< ImFusion::GlMeshRendererContours::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererIntersection::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererNormals::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions::Clipping >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions::Material >, SubProperty< ImFusion::MarkerConfiguration >, SubProperty< ImFusion::MotionModel >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::AdvancedConfig >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::LandmarkWeightingConfig >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::SegmentationWeightingConfig >, SubProperty< std::optional< ImFusion::DeformableIcp::RansacProperties > >, SubProperty< std::optional< ImFusion::US::FrameGeometryConvex3D > >, SubProperty< std::optional< ImFusion::US::ScanlineConfiguration3D > >, SubProperty< std::unique_ptr< ImFusion::CT::ConeBeamGeometry > >, SubProperty< std::unique_ptr< ImFusion::CT::detail::TrivialConfigurable > >, SubProperty< std::unique_ptr< ImFusion::CT::GeometryGenerator > >, SubProperty< std::unique_ptr< ImFusion::CT::ReconstructionAlgorithm > >, SubPropertyList< T >, SubPropertyList< ImFusion::AnatomyPlugin::StyleSheet >, and SubPropertyList< ImFusion::AnatomyPlugin::StyleSheet::StyleRule >.

◆ configuration()

virtual void configuration ( Properties * p) const
pure virtual

Serialize the current parameter/sub property state into the given Properties object.

Implemented in Parameter< T >, Parameter< AdditionalWeights >, Parameter< Adjustment >, Parameter< AlignmentMethod >, Parameter< AssociationMode >, Parameter< Axis >, Parameter< BeadDetectionMode >, Parameter< bool >, Parameter< CalibrationMethod >, Parameter< CalibrationType >, Parameter< ClusterMergingMode >, Parameter< ColorMode >, Parameter< ColorOptions >, Parameter< ColorSource >, Parameter< CombinationMode >, Parameter< ComputationPhase >, Parameter< ConsoleType >, Parameter< CorrespondenceDirection >, Parameter< CropFanMode >, Parameter< Curvature >, Parameter< Data::Modality >, Parameter< DeformationModel >, Parameter< DescriptorType >, Parameter< Device >, Parameter< Dicom::AnonymizationProfile >, Parameter< Distance >, Parameter< DistanceType >, Parameter< double >, Parameter< DRRMode >, Parameter< ExtractionMode >, Parameter< FanMode >, Parameter< float >, Parameter< FrameGeometryType >, Parameter< Frames >, Parameter< GatingType >, Parameter< GeometryPreset >, Parameter< GeometryType >, Parameter< GlColormap::Preset >, Parameter< GlMesh::MaterialMode >, Parameter< GlMesh::RenderMode3d >, Parameter< GlPointCloud::MaterialMode >, Parameter< GlPolyRigidDeformation::Mode >, Parameter< GlTrackingSequence::IndicatorType >, Parameter< GradientType >, Parameter< Graph::Dimension >, Parameter< Graph::Type >, Parameter< GraphRenderMode >, Parameter< HandEyeCalibrationAlgorithm::CalibrationType >, Parameter< HandEyeCalibrationAlgorithm::StreamInfo >, Parameter< ImageDisplayMode >, Parameter< ImageProcessing::Axis >, Parameter< ImageUndistortion::InterpolationMode >, Parameter< ImFusion::Filesystem::Path >, Parameter< IndicatorType >, Parameter< IndicatorVisibility >, Parameter< Initialization >, Parameter< InitializationMode >, Parameter< InpaintingMethod >, Parameter< int >, Parameter< IntensityMode >, Parameter< InterpolationMethod >, Parameter< InterpolationMode >, Parameter< Log::Level >, Parameter< mat3 >, Parameter< mat4 >, Parameter< Material::Mode >, Parameter< MatrixConvention >, Parameter< MatrixSerializationFormat >, Parameter< MemoryOption >, Parameter< MeshColorData >, Parameter< MeshCreatorAlgorithm::Primitive >, Parameter< Method >, Parameter< ML::ParamUnit >, Parameter< Mode >, Parameter< ModelPreset >, Parameter< ModelType >, Parameter< MotionMode >, Parameter< MotionPreset >, Parameter< MovingInput >, Parameter< NearestNeighborDirection >, Parameter< Norm >, Parameter< OperationMode >, Parameter< OutputType >, Parameter< PaddingMode >, Parameter< ParameterMode >, Parameter< ParamUnit >, Parameter< PickingMode >, Parameter< PixelType >, Parameter< PointCloudInterpretation >, Parameter< PolyDataType >, Parameter< PreAlignment >, Parameter< Projection >, Parameter< ProjectionCoordinateSpace >, Parameter< Quantization >, Parameter< RecombineMode >, Parameter< ReductionMode >, Parameter< ReferenceFrame >, Parameter< RegistrationMethod >, Parameter< RegistrationMode >, Parameter< RegistrationType >, Parameter< RenderMode >, Parameter< RenderMode2d >, Parameter< RenderMode3d >, Parameter< ResamplingMode >, Parameter< RobotStreamType >, Parameter< ScalingMode >, Parameter< ScanOrientation >, Parameter< SelectionMode >, Parameter< ShapeType >, Parameter< Similarity >, Parameter< size_t >, Parameter< SliceReferenceSpline >, Parameter< SmoothingMode >, Parameter< SortingStrategy >, Parameter< std::optional< double > >, Parameter< std::optional< int > >, Parameter< std::optional< Random::Generator::Seed > >, Parameter< std::optional< size_t > >, Parameter< std::optional< std::string > >, Parameter< std::optional< std::vector< float > > >, Parameter< std::optional< std::vector< std::string > > >, Parameter< std::optional< uint8_t > >, Parameter< std::optional< vec2 > >, Parameter< std::optional< vec3 > >, Parameter< std::optional< vec3i > >, Parameter< std::optional< vec4 > >, Parameter< std::size_t >, Parameter< std::string >, Parameter< std::vector< bool > >, Parameter< std::vector< double > >, Parameter< std::vector< float > >, Parameter< std::vector< int > >, Parameter< std::vector< mat4 > >, Parameter< std::vector< std::size_t > >, Parameter< std::vector< std::string > >, Parameter< std::vector< unsigned char > >, Parameter< std::vector< vec2 > >, Parameter< std::vector< vec3 > >, Parameter< std::vector< vec3f > >, Parameter< StreamInfo >, Parameter< SweepDisplayOptions::RenderMode3d >, Parameter< ThresholdingMode >, Parameter< TrackingHistory >, Parameter< TrackingStreamDisplayOptions::MatrixConvention >, Parameter< TrackingStreamDisplayOptions::TrackingHistory >, Parameter< Transformation >, Parameter< TransformationReference >, Parameter< uint16_t >, Parameter< uint64_t >, Parameter< uint8_t >, Parameter< unsigned char >, Parameter< unsigned int >, Parameter< unsigned long long >, Parameter< vec2 >, Parameter< vec2f >, Parameter< vec2i >, Parameter< vec3 >, Parameter< vec3i >, Parameter< vec4 >, Parameter< vec5 >, Parameter< VolumeBasedMeshCurvatureAlgorithm::MeshColorData >, Parameter< WeightingMode >, Parameter< WeightMode >, Parameter< WeightType >, SubProperty< T >, SubProperty< ImFusion::ASCRegistrationMethods::ModifyBehavior::PerStructureBoolean >, SubProperty< ImFusion::CT::DetectorDataComponent >, SubProperty< ImFusion::CT::FullGeometryRepresentationWrapper >, SubProperty< ImFusion::CT::RelativeTransformationConfig >, SubProperty< ImFusion::CT::RelativeTransformationSetupWrapper >, SubProperty< ImFusion::CT::SourceDataComponent >, SubProperty< ImFusion::DescriptorsRegistrationAlgorithm::GlobalRegistrationConfig >, SubProperty< ImFusion::GlGraph::DisplayOptions::FeatureCircleOptions >, SubProperty< ImFusion::GlGraph::DisplayOptions::FeatureColorMapOptions >, SubProperty< ImFusion::GlGraph::DisplayOptions::GeneralOptions >, SubProperty< ImFusion::GlMeshRendererContours::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererIntersection::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererNormals::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions::Clipping >, SubProperty< ImFusion::GlMeshRendererSurface::DisplayOptions::Material >, SubProperty< ImFusion::MarkerConfiguration >, SubProperty< ImFusion::MotionModel >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::AdvancedConfig >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::LandmarkWeightingConfig >, SubProperty< ImFusion::US::UltrasoundRegistrationAlgorithm::SegmentationWeightingConfig >, SubProperty< std::optional< ImFusion::DeformableIcp::RansacProperties > >, SubProperty< std::optional< ImFusion::US::FrameGeometryConvex3D > >, SubProperty< std::optional< ImFusion::US::ScanlineConfiguration3D > >, SubProperty< std::unique_ptr< ImFusion::CT::ConeBeamGeometry > >, SubProperty< std::unique_ptr< ImFusion::CT::detail::TrivialConfigurable > >, SubProperty< std::unique_ptr< ImFusion::CT::GeometryGenerator > >, SubProperty< std::unique_ptr< ImFusion::CT::ReconstructionAlgorithm > >, SubPropertyList< T >, SubPropertyList< ImFusion::AnatomyPlugin::StyleSheet >, and SubPropertyList< ImFusion::AnatomyPlugin::StyleSheet::StyleRule >.

◆ setAttribute()

void setAttribute ( const std::string & key,
const std::string & value )

Add the given attribute key-value pair to the set of parameter attributes.

Set special attributes to a single parameter.

The attributes are specified in the form: <attribute>: <value>, <attribute>: <value>. Whitespace in between the elements (e.g. around the :) is automatically trimmed. Attributes must not contain whitespace. The value can be either a number or a string. Strings must be quoted with single quotes (') and are allowed to contain ,.

The supported attributes depend on the type of the parameter. Currently supported attributes are:

  • General:
    • label (string): text to use for the label when displaying this property in a default PropertiesWidget.
    • useroption ('r', 'w', or 'rw'): if this is set for a parameter of an IoAlgorithm, the parameter will be displayed in the global settings dialog.
    • read-only (bool): if set, the user cannot change the value
    • tooltip (string): tooltip that describes the parameter
    • hidden (bool): if set, the PropertiesWidget will not show a control for this parameter
  • Double, Integer:
    • min (double or int): minimum allowed value
    • max (double or int): maximum allowed value
    • step (double or int): step by which the value is increased
    • prefix (string): prefix displayed before the value (e.g. a unit)
    • suffix (string): suffix displayed after the value (e.g. a unit)
    • withSlider (bool): add a slider in the user interface
  • Double:
  • Enum, EnumString:
    • values (comma separated string, with or without whitespace around comma): String representation of enumerators.
    • keys (comma separated string, with or without whitespace around comma): Integer values assigned to enumerators. If not specified, integer values 0,1,2,3,... are assumed.
  • Path:
    • type: specifies the dialog type and must be one of: OpenDirectory, OpenFile or SaveFile. The default is OpenFile.
    • caption: sets the title of the dialog (the default is a generic caption depending on the type)
    • filter: string of wildcard patterns to filter available files, separated by ;;, e.g.: Text files (*.txt);;XML files (*.xml) (see also QFileDialog)
    • dontUseNativeDialog: when set to true use the Qt dialog instead of the native dialog. The default is false.
  • String:
    • textBox (bool): if set, uses a text box instead of a line edit, making it more user-friendly for long or multi-line text. The default is false.
  • Color:
    • type: specifies the dialog type and must be one of: normal, reduced, in-place.
Note
Setting attributes will not change the value or restrict future values of the parameter in any way, e.g. setting a max value for an integer does not automatically clamp values assigned by setParam. Attributes are pure informational and can be used by other object to actually enforce these restrictions (e.g. PropertiesWidget).
// a double value that is restricted between -1 and 1, and increases in steps of 0.1
p.setParamAttributes("someDouble", "min: -1.0, max: 1.0, step: 0.1");
// an enum value that can have three values\n
p.setParamAttributes("someEnum", "values: 'value1, value2, value3'");

Returns true if the given string could be parsed or false otherwise.

See also
String::join, PropertiesWidget
Properties::setParamAttributes()

◆ removeAttribute()

void removeAttribute ( const std::string & key)

Remove the attribute with the given key.

See also
Properties::setParamAttributes()

◆ setLabel()

void setLabel ( const std::string & label)

Sets an optional label for the Parameter if displayed in the UI.

If not set, the name will be used.

See also
Properties::setParamAttributes()

◆ addDeprecatedName()

void addDeprecatedName ( const std::string & deprecatedName)

Adds an optional alternative parameter name that should be used for param lookup for during configure() in case de-serialization from m_name was not successful.

Will log a warning if param lookup using the deprecated name is successful. This feature is helpful if you must change the parameter name but want to keep existing workspaces functioning.


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