|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Property for storing a std::vector of values. More...
#include <mitkVectorProperty.h>


Public Types | |
| typedef std::vector< DATATYPE > | VectorType |
| The type of the std::vector stored by this property. More... | |
| typedef VectorProperty< DATATYPE > | Self |
| typedef BaseProperty | SuperClass |
| typedef itk::SmartPointer< Self > | Pointer |
| typedef itk::SmartPointer< const Self > | ConstPointer |
Public Member Functions | |
| std::vector< std::string > | GetClassHierarchy () const override |
| const char * | GetNameOfClass () const override |
| Pointer | Clone () const |
| std::string | GetValueAsString () const override |
| Return the property value as a human-readable string. More... | |
| virtual const VectorType & | GetValue () const |
| Get a const reference to the contained vector. More... | |
| virtual void | SetValue (const VectorType ¶meter_vector) |
| Set the content vector. More... | |
| bool | ToJSON (nlohmann::json &j) const override |
| Serialize the vector to JSON as a JSON array. More... | |
| bool | FromJSON (const nlohmann::json &j) override |
| Deserialize the vector from a JSON array. More... | |
Public Member Functions inherited from mitk::BaseProperty | |
| mitkClassMacroItkParent (BaseProperty, itk::Object) | |
| Pointer | Clone () const |
| bool | operator== (const BaseProperty &property) const |
| Compare two properties for equality. More... | |
| BaseProperty & | operator= (const BaseProperty &property) |
| Assign a property value to this instance. More... | |
| bool | AssignProperty (const BaseProperty &property) |
| Assign a property value to this instance and report success. More... | |
Static Public Member Functions | |
| static const char * | GetStaticNameOfClass () |
| Return the static class name including the type-dependent prefix. More... | |
| static Pointer | New () |
Protected Member Functions | |
| VectorProperty ()=default | |
| VectorProperty (const Self &other) | |
| mitkCloneMacro (Self) | |
Protected Member Functions inherited from mitk::BaseProperty | |
| BaseProperty () | |
| BaseProperty (const BaseProperty &other) | |
| ~BaseProperty () override | |
Additional Inherited Members | |
Static Public Attributes inherited from mitk::BaseProperty | |
| static const std::string | VALUE_CANNOT_BE_CONVERTED_TO_STRING |
| Default return value for properties that cannot be converted to a string. More... | |
Property for storing a std::vector of values.
Templated over the data type of the std::vector that is held by this class. Setting and getting of std::vectors is implemented by-value.
The class manually expands most of mitkClassMacro to specifically override GetNameOfClass() and GetStaticNameOfClass() in order to return type-dependent class names (e.g., "DoubleVectorProperty", "IntVectorProperty"). This is essential for serialization.
| DATATYPE | The element type of the stored vector. |
Definition at line 61 of file mitkVectorProperty.h.
| typedef itk::SmartPointer<const Self> mitk::VectorProperty< DATATYPE >::ConstPointer |
Definition at line 74 of file mitkVectorProperty.h.
| typedef itk::SmartPointer<Self> mitk::VectorProperty< DATATYPE >::Pointer |
Definition at line 73 of file mitkVectorProperty.h.
| typedef VectorProperty<DATATYPE> mitk::VectorProperty< DATATYPE >::Self |
Definition at line 71 of file mitkVectorProperty.h.
| typedef BaseProperty mitk::VectorProperty< DATATYPE >::SuperClass |
Definition at line 72 of file mitkVectorProperty.h.
| typedef std::vector<DATATYPE> mitk::VectorProperty< DATATYPE >::VectorType |
The type of the std::vector stored by this property.
Definition at line 65 of file mitkVectorProperty.h.
|
protecteddefault |
|
inlineprotected |
Definition at line 137 of file mitkVectorProperty.h.
| Pointer mitk::VectorProperty< DATATYPE >::Clone | ( | ) | const |
|
overridevirtual |
Deserialize the vector from a JSON array.
| [in] | j | The JSON array to read from. |
true. Implements mitk::BaseProperty.
|
inlineoverride |
Definition at line 75 of file mitkVectorProperty.h.
|
inlineoverride |
Definition at line 92 of file mitkVectorProperty.h.
|
inlinestatic |
Return the static class name including the type-dependent prefix.
This function returns different strings depending on the template parameter, which is required for serialization to work correctly.
Definition at line 85 of file mitkVectorProperty.h.
|
virtual |
Get a const reference to the contained vector.
|
overridevirtual |
Return the property value as a human-readable string.
Since VectorProperty potentially holds many elements, only the first and last few elements appear in the string. Missing central elements are indicated by an ellipsis ("...").
Reimplemented from mitk::BaseProperty.
|
protected |
|
static |
|
virtual |
Set the content vector.
| [in] | parameter_vector | The new vector to store. |
|
overridevirtual |
Serialize the vector to JSON as a JSON array.
| [out] | j | The JSON value to write into. |
true. Implements mitk::BaseProperty.