13 #ifndef mitkTemporoSpatialStringProperty_h
14 #define mitkTemporoSpatialStringProperty_h
16 #include <itkConfigure.h>
29 #pragma warning(disable : 4522)
44 itkFactorylessNewMacro(Self);
57 bool allowCloseTime =
false,
58 bool allowCloseSlice =
false)
const;
65 bool allowCloseTime =
false,
66 bool allowCloseSlice =
false)
const;
93 using BaseProperty::operator=;
108 bool allowCloseTime =
false,
109 bool allowCloseSlice =
false)
const;
115 itk::LightObject::Pointer InternalClone()
const override;
117 bool IsEqual(
const BaseProperty &property)
const override;
121 namespace PropertyPersistenceSerialization
127 namespace PropertyPersistenceDeserialization
Abstract base class for properties.
Property for time and space resolved string values.
TemporoSpatialStringProperty(const std::string &s)
TemporoSpatialStringProperty(const TemporoSpatialStringProperty &)
std::vector< IndexValueType > GetAvailableSlices(const TimeStepType &timeStep) const
::itk::IndexValueType IndexValueType
std::string GetValueAsString() const override
void SetValue(const ValueType &value)
std::map< IndexValueType, std::string > SliceMapType
std::vector< TimeStepType > GetAvailableTimeSteps(const IndexValueType &slice) const
void SetValue(const TimeStepType &timeStep, const IndexValueType &zSlice, const ValueType &value)
bool HasValueByTimeStep(const TimeStepType &timeStep, bool allowClose=false) const
ValueType GetValueBySlice(const IndexValueType &zSlice, bool allowClose=false) const
mitkClassMacro(TemporoSpatialStringProperty, BaseProperty)
mitkNewMacro1Param(TemporoSpatialStringProperty, const char *)
bool HasValue(const TimeStepType &timeStep, const IndexValueType &zSlice, bool allowCloseTime=false, bool allowCloseSlice=false) const
ValueType GetValue(const TimeStepType &timeStep, const IndexValueType &zSlice, bool allowCloseTime=false, bool allowCloseSlice=false) const
ValueType GetValue() const
std::vector< TimeStepType > GetAvailableTimeSteps() const
std::vector< IndexValueType > GetAvailableSlices() const
bool ToJSON(nlohmann::json &j) const override
Serialize property value(s) to JSON.
bool FromJSON(const nlohmann::json &j) override
Deserialize property value(s) from JSON.
mitkNewMacro1Param(TemporoSpatialStringProperty, const std::string &)
std::pair< bool, ValueType > CheckValue(const TimeStepType &timeStep, const IndexValueType &zSlice, bool allowCloseTime=false, bool allowCloseSlice=false) const
TemporoSpatialStringProperty(const char *string=nullptr)
bool HasValueBySlice(const IndexValueType &zSlice, bool allowClose=false) const
ValueType GetValueByTimeStep(const TimeStepType &timeStep, bool allowClose=false) const
std::map< TimeStepType, SliceMapType > TimeMapType
MITKCORE_EXPORT mitk::BaseProperty::Pointer deserializeJSONToTemporoSpatialStringProperty(const std::string &value)
MITKCORE_EXPORT std::string serializeTemporoSpatialStringPropertyToJSON(const mitk::BaseProperty *prop)
Find image slices visible on a given plane.
TemporoSpatialStringProperty::Pointer MITKCORE_EXPORT ExtractTimeStepFromTemporoSpatialStringProperty(const TemporoSpatialStringProperty *tsProperty, TimeStepType ts)