13 #ifndef mitkVectorProperty_h
14 #define mitkVectorProperty_h
34 static const char *
prefix() {
return "Invalid"; }
51 template <
typename DATATYPE>
65 std::vector<std::string>
GetClassHierarchy()
const override {
return mitk::GetClassHierarchy<Self>(); }
73 return nameOfClass.c_str();
76 const char *
GetNameOfClass()
const override {
return this->GetStaticNameOfClass(); }
77 itkFactorylessNewMacro(
Self);
104 itk::LightObject::Pointer InternalClone()
const override;
107 bool IsEqual(
const BaseProperty &an_other_property)
const override;
110 bool Assign(
const BaseProperty &an_other_property)
override;
117 #define MITK_DECLARE_VECTOR_PROPERTY(TYPE, PREFIX) \
119 typedef VectorProperty<TYPE> PREFIX##VectorProperty; \
123 struct VectorPropertyDataType<TYPE> \
125 static const char *prefix() { return #PREFIX; } \
129 #define MITK_DEFINE_VECTOR_PROPERTY(TYPE) template class VectorProperty<TYPE>;
Abstract base class for properties.
Providing a std::vector as property.
VectorProperty< DATATYPE > Self
std::vector< DATATYPE > VectorType
virtual void SetValue(const VectorType ¶meter_vector)
sets the content vector
std::string GetValueAsString() const override
static const char * GetStaticNameOfClass()
std::vector< std::string > GetClassHierarchy() const override
itk::SmartPointer< const Self > ConstPointer
itk::SmartPointer< Self > Pointer
const char * GetNameOfClass() const override
bool FromJSON(const nlohmann::json &j) override
Deserialize property value(s) from JSON.
virtual const VectorType & GetValue() const
returns a const reference to the contained vector
bool ToJSON(nlohmann::json &j) const override
Serialize property value(s) to JSON.
#define MITK_DECLARE_VECTOR_PROPERTY(TYPE, PREFIX)
This should be used in .h files.
Find image slices visible on a given plane.
Helper for VectorProperty to determine a good ITK ClassName.
static const char * prefix()