Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <mitkEnumerationProperty.h>
Public Types | |
typedef EnumerationProperty | Self |
typedef BaseProperty | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
typedef unsigned int | IdType |
typedef std::map< IdType, std::string > | EnumIdsContainerType |
typedef std::map< std::string, IdType > | EnumStringsContainerType |
typedef EnumIdsContainerType::const_iterator | EnumConstIterator |
Public Types inherited from mitk::BaseProperty | |
typedef BaseProperty | Self |
typedef itk::Object | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const override |
virtual const char * | GetClassName () const |
Pointer | Clone () const |
virtual bool | AddEnum (const std::string &name, const IdType &id) |
virtual bool | SetValue (const std::string &name) |
virtual bool | SetValue (const IdType &id) |
virtual IdType | GetValueAsId () const |
virtual std::string | GetValueAsString () const override |
virtual void | Clear () |
virtual EnumIdsContainerType::size_type | Size () const |
virtual EnumConstIterator | Begin () const |
virtual EnumConstIterator | End () const |
virtual std::string | GetEnumString (const IdType &id) const |
virtual IdType | GetEnumId (const std::string &name) const |
virtual bool | IsValidEnumerationValue (const IdType &val) const |
virtual bool | IsValidEnumerationValue (const std::string &val) const |
const EnumIdsContainerType & | GetEnumIds () const |
const EnumStringsContainerType & | GetEnumStrings () const |
EnumIdsContainerType & | GetEnumIds () |
EnumStringsContainerType & | GetEnumStrings () |
Public Member Functions inherited from mitk::BaseProperty | |
Pointer | Clone () const |
bool | operator== (const BaseProperty &property) const |
Subclasses must implement IsEqual(const BaseProperty&) to support comparison. More... | |
BaseProperty & | operator= (const BaseProperty &property) |
Assigns property to this BaseProperty instance. More... | |
bool | AssignProperty (const BaseProperty &property) |
Assigns property to this BaseProperty instance. More... | |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
static Pointer | New () |
Static Public Member Functions inherited from mitk::BaseProperty | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
EnumerationProperty () | |
EnumerationProperty (const EnumerationProperty &) | |
virtual bool | IsEqual (const BaseProperty &property) const override |
virtual bool | Assign (const BaseProperty &property) override |
itk::LightObject::Pointer | InternalClone () const override |
Protected Member Functions inherited from mitk::BaseProperty | |
BaseProperty () | |
BaseProperty (const BaseProperty &other) | |
virtual | ~BaseProperty () |
Additional Inherited Members | |
Static Public Attributes inherited from mitk::BaseProperty | |
static const std::string | VALUE_CANNOT_BE_CONVERTED_TO_STRING |
Default return value if a property which can not be returned as string. More... | |
This class may be used to store properties similar to enumeration values. Each enumeration value is identified via a string representation and a id. Note, that both string representation and id MUST be unique. This is checked when inserting a new enumeration value. Please note that you have to add valid enumeration values before you may use the Get/SetValue methods.
To use the class enumeration property you have 2 choices:
Definition at line 52 of file mitkEnumerationProperty.h.
typedef itk::SmartPointer<const Self> mitk::EnumerationProperty::ConstPointer |
Definition at line 55 of file mitkEnumerationProperty.h.
typedef EnumIdsContainerType::const_iterator mitk::EnumerationProperty::EnumConstIterator |
Type used for iterators over all defined enumeration values.
Definition at line 79 of file mitkEnumerationProperty.h.
typedef std::map<IdType, std::string> mitk::EnumerationProperty::EnumIdsContainerType |
Type used to store a mapping from enumeration id to enumeration string/ description
Definition at line 68 of file mitkEnumerationProperty.h.
typedef std::map<std::string, IdType> mitk::EnumerationProperty::EnumStringsContainerType |
Type used to store a mapping from enumeration string/description to enumeration id
Definition at line 74 of file mitkEnumerationProperty.h.
typedef unsigned int mitk::EnumerationProperty::IdType |
Represents the unique id which is asigned to each enumeration value
Definition at line 62 of file mitkEnumerationProperty.h.
Definition at line 55 of file mitkEnumerationProperty.h.
Definition at line 55 of file mitkEnumerationProperty.h.
Definition at line 55 of file mitkEnumerationProperty.h.
|
protected |
Default constructor. The current value of the enumeration is undefined.
Definition at line 25 of file mitkEnumerationProperty.cpp.
|
protected |
Definition at line 30 of file mitkEnumerationProperty.cpp.
|
virtual |
Adds an enumeration value into the enumeration. The name and id provided must be unique. This is checked while adding the new enumeration value. If it is not unique, false is returned. If addition was successful, true is returned.
name | the unique string representation of the enumeration value |
id | the unique integer representation of the enumeration value |
Reimplemented in mitk::RenderingModeProperty, mitk::PlaneOrientationProperty, mitk::PointSetShapeProperty, mitk::GridRepresentationProperty, mitk::OdfNormalizationMethodProperty, mitk::VtkInterpolationProperty, mitk::VtkRepresentationProperty, mitk::VtkScalarModeProperty, mitk::VtkResliceInterpolationProperty, mitk::ShaderProperty, mitk::GridVolumeMapperProperty, mitk::VtkVolumeRenderingProperty, mitk::OdfScaleByProperty, mitk::RegEvalStyleProperty, mitk::RegEvalWipeStyleProperty, mitk::RegVisColorStyleProperty, mitk::RegVisDirectionProperty, mitk::RegVisStyleProperty, mitk::ConnectomicsRenderingEdgeColorParameterProperty, mitk::ConnectomicsRenderingEdgeFilteringProperty, mitk::ConnectomicsRenderingEdgeRadiusParameterProperty, mitk::ConnectomicsRenderingEdgeThresholdParameterProperty, mitk::ConnectomicsRenderingNodeColorParameterProperty, mitk::ConnectomicsRenderingNodeFilteringProperty, mitk::ConnectomicsRenderingNodeRadiusParameterProperty, mitk::ConnectomicsRenderingNodeThresholdParameterProperty, mitk::ConnectomicsRenderingSchemeProperty, and mitk::PlanarFigureControlPointStyleProperty.
Definition at line 35 of file mitkEnumerationProperty.cpp.
Referenced by mitk::PlaneOrientationProperty::AddEnum().
|
overrideprotectedvirtual |
Override this method in subclasses to implement a meaningful assignment. The property argument is guaranteed to be castable to the type of the implementing subclass.
Implements mitk::BaseProperty.
Definition at line 140 of file mitkEnumerationProperty.cpp.
|
virtual |
Provides access to the set of known enumeration values. The string representation may be accessed via iterator->second, the id may be access via iterator->first
Definition at line 99 of file mitkEnumerationProperty.cpp.
Referenced by QmitkDataManagerView::SurfaceRepresentationMenuAboutToShow().
|
virtual |
Clears all possible enumeration values and the current enumeration value.
Definition at line 87 of file mitkEnumerationProperty.cpp.
Pointer mitk::EnumerationProperty::Clone | ( | ) | const |
|
virtual |
Specifies the end of the range of the known enumeration values.
Definition at line 104 of file mitkEnumerationProperty.cpp.
Referenced by QmitkDataManagerView::SurfaceRepresentationMenuAboutToShow().
|
inlineoverridevirtual |
Reimplemented from mitk::BaseProperty.
Reimplemented in mitk::RenderingModeProperty, mitk::PointSetShapeProperty, mitk::PlaneOrientationProperty, mitk::ShaderProperty, mitk::VtkScalarModeProperty, mitk::VtkVolumeRenderingProperty, mitk::VtkResliceInterpolationProperty, mitk::ModalityProperty, mitk::VtkInterpolationProperty, mitk::VtkRepresentationProperty, and mitk::ResliceMethodProperty.
Definition at line 55 of file mitkEnumerationProperty.h.
|
virtual |
Reimplemented from mitk::BaseProperty.
Reimplemented in mitk::RenderingModeProperty, mitk::PointSetShapeProperty, mitk::PlaneOrientationProperty, mitk::ShaderProperty, mitk::VtkScalarModeProperty, mitk::VtkVolumeRenderingProperty, mitk::VtkResliceInterpolationProperty, mitk::ModalityProperty, mitk::VtkInterpolationProperty, mitk::VtkRepresentationProperty, and mitk::ResliceMethodProperty.
|
virtual |
Returns the integer representation for the given string.
name | the enumeration name for which the integer representation should be determined if the name is invalid, the return value is unspecified. |
Definition at line 121 of file mitkEnumerationProperty.cpp.
const mitk::EnumerationProperty::EnumIdsContainerType & mitk::EnumerationProperty::GetEnumIds | ( | ) | const |
Definition at line 167 of file mitkEnumerationProperty.cpp.
mitk::EnumerationProperty::EnumIdsContainerType & mitk::EnumerationProperty::GetEnumIds | ( | ) |
Definition at line 161 of file mitkEnumerationProperty.cpp.
|
virtual |
Returns the string representation for the given id.
id | the id for which the string representation should be determined if id is invalid, the return value is unspecified. |
Definition at line 109 of file mitkEnumerationProperty.cpp.
const mitk::EnumerationProperty::EnumStringsContainerType & mitk::EnumerationProperty::GetEnumStrings | ( | ) | const |
Definition at line 179 of file mitkEnumerationProperty.cpp.
Referenced by QmitkUGCombinedRepresentationPropertyWidget::SetProperty().
mitk::EnumerationProperty::EnumStringsContainerType & mitk::EnumerationProperty::GetEnumStrings | ( | ) |
Definition at line 173 of file mitkEnumerationProperty.cpp.
|
inlinestatic |
Definition at line 55 of file mitkEnumerationProperty.h.
|
virtual |
Returns the id of the current enumeration value. If it was not yet set, the return value is unspecified
Definition at line 77 of file mitkEnumerationProperty.cpp.
Referenced by QmitkRegEvalSettingsWidget::ConfigureControls(), mitk::PlaneGeometryDataMapper2D::DetermineThickSliceMode(), mitk::MITKRegistrationWrapperMapperBase::GenerateDataForRenderer(), mitk::ImageVtkMapper2D::GenerateDataForRenderer(), mitk::DoseImageVtkMapper2D::GenerateDataForRenderer(), mitk::PlaneOrientationProperty::GetPlaneDecoration(), mitk::GetRelevantRegKernelOfNode(), and QmitkUGCombinedRepresentationPropertyWidget::SetProperty().
|
overridevirtual |
Returns the string representation of the current enumeration value. If it was not yet set, the return value is unspecified
Reimplemented from mitk::BaseProperty.
Definition at line 82 of file mitkEnumerationProperty.cpp.
Referenced by mitk::ConnectomicsNetworkMapper3D::PropertiesChanged(), QmitkDataManagerView::SurfaceRepresentationActionToggled(), QmitkDataManagerView::SurfaceRepresentationMenuAboutToShow(), and mitk::VtkShaderRepository::UpdateShaderProgram().
|
overrideprotected |
Definition at line 185 of file mitkEnumerationProperty.cpp.
|
overrideprotectedvirtual |
Override this method in subclasses to implement a meaningful comparison. The property argument is guaranteed to be castable to the type of the implementing subclass.
Implements mitk::BaseProperty.
Definition at line 133 of file mitkEnumerationProperty.cpp.
|
virtual |
Determines if a given integer representation of an enumeration value is valid or not
val | the integer value to check |
Definition at line 151 of file mitkEnumerationProperty.cpp.
Referenced by mitk::PlaneOrientationProperty::PlaneOrientationProperty(), and QmitkDataManagerView::SurfaceRepresentationActionToggled().
|
virtual |
Determines if a given string representation of an enumeration value is valid or not
val | the string to check |
Definition at line 156 of file mitkEnumerationProperty.cpp.
|
static |
Referenced by mitkEnumerationPropertyTest().
|
virtual |
Sets the current value of the enumeration
name | the string representation of the enumeration value to set |
Definition at line 49 of file mitkEnumerationProperty.cpp.
Referenced by mitk::ConnectomicsRenderingEdgeColorParameterProperty::ConnectomicsRenderingEdgeColorParameterProperty(), mitk::ConnectomicsRenderingEdgeFilteringProperty::ConnectomicsRenderingEdgeFilteringProperty(), mitk::ConnectomicsRenderingEdgeRadiusParameterProperty::ConnectomicsRenderingEdgeRadiusParameterProperty(), mitk::ConnectomicsRenderingEdgeThresholdParameterProperty::ConnectomicsRenderingEdgeThresholdParameterProperty(), mitk::ConnectomicsRenderingNodeColorParameterProperty::ConnectomicsRenderingNodeColorParameterProperty(), mitk::ConnectomicsRenderingNodeFilteringProperty::ConnectomicsRenderingNodeFilteringProperty(), mitk::ConnectomicsRenderingNodeRadiusParameterProperty::ConnectomicsRenderingNodeRadiusParameterProperty(), mitk::ConnectomicsRenderingNodeThresholdParameterProperty::ConnectomicsRenderingNodeThresholdParameterProperty(), mitk::ConnectomicsRenderingSchemeProperty::ConnectomicsRenderingSchemeProperty(), mitk::GridRepresentationProperty::GridRepresentationProperty(), mitk::GridVolumeMapperProperty::GridVolumeMapperProperty(), mitkPointSetVtkMapper2DGlyphTypeTest(), mitk::OdfNormalizationMethodProperty::OdfNormalizationMethodProperty(), mitk::OdfScaleByProperty::OdfScaleByProperty(), mitk::PlanarFigureControlPointStyleProperty::PlanarFigureControlPointStyleProperty(), mitk::PlaneOrientationProperty::PlaneOrientationProperty(), mitk::PointSetShapeProperty::PointSetShapeProperty(), mitk::RegEvalStyleProperty::RegEvalStyleProperty(), mitk::RegEvalWipeStyleProperty::RegEvalWipeStyleProperty(), mitk::RegVisColorStyleProperty::RegVisColorStyleProperty(), mitk::RegVisDirectionProperty::RegVisDirectionProperty(), mitk::RegVisStyleProperty::RegVisStyleProperty(), mitk::RenderingModeProperty::RenderingModeProperty(), mitk::ResliceMethodProperty::ResliceMethodProperty(), mitk::PlaneOrientationProperty::SetPlaneDecorationToNegativeOrientation(), mitk::PlaneOrientationProperty::SetPlaneDecorationToNone(), mitk::PlaneOrientationProperty::SetPlaneDecorationToPositiveOrientation(), QmitkDataManagerView::SurfaceRepresentationActionToggled(), mitk::VtkInterpolationProperty::VtkInterpolationProperty(), mitk::VtkRepresentationProperty::VtkRepresentationProperty(), mitk::VtkResliceInterpolationProperty::VtkResliceInterpolationProperty(), and mitk::VtkVolumeRenderingProperty::VtkVolumeRenderingProperty().
|
virtual |
Sets the current value of the enumeration
id | the integer representation of the enumeration value to set |
Definition at line 63 of file mitkEnumerationProperty.cpp.
|
virtual |
Determines the number of enumeration values which have been added via AddEnum(...).
Definition at line 94 of file mitkEnumerationProperty.cpp.
Referenced by mitk::ModalityProperty::AddEnumerationTypes(), and mitk::OrganTypeProperty::AddEnumerationTypes().