Medical Imaging Interaction Toolkit  2018.4.99-1640525a
Medical Imaging Interaction Toolkit
mitk::TemporoSpatialStringProperty Class Reference

Property for time and space resolved string values. More...

#include <mitkTemporoSpatialStringProperty.h>

Inheritance diagram for mitk::TemporoSpatialStringProperty:
Collaboration diagram for mitk::TemporoSpatialStringProperty:

Public Types

typedef ::itk::IndexValueType IndexValueType
 
typedef std::string ValueType
 
typedef TemporoSpatialStringProperty Self
 
typedef BaseProperty Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 
- Public Types inherited from mitk::BaseProperty
typedef BaseProperty Self
 
typedef itk::Object Superclass
 
typedef itk::SmartPointer< SelfPointer
 
typedef itk::SmartPointer< const SelfConstPointer
 

Public Member Functions

virtual std::vector< std::string > GetClassHierarchy () const override
 
virtual const char * GetClassName () const
 
Pointer Clone () const
 
ValueType GetValue () const
 
ValueType GetValue (const TimeStepType &timeStep, const IndexValueType &zSlice, bool allowCloseTime=false, bool allowCloseSlice=false) const
 
ValueType GetValueBySlice (const IndexValueType &zSlice, bool allowClose=false) const
 
ValueType GetValueByTimeStep (const TimeStepType &timeStep, bool allowClose=false) const
 
bool HasValue () const
 
bool HasValue (const TimeStepType &timeStep, const IndexValueType &zSlice, bool allowCloseTime=false, bool allowCloseSlice=false) const
 
bool HasValueBySlice (const IndexValueType &zSlice, bool allowClose=false) const
 
bool HasValueByTimeStep (const TimeStepType &timeStep, bool allowClose=false) const
 
std::vector< IndexValueTypeGetAvailableSlices (const TimeStepType &timeStep) const
 
std::vector< TimeStepTypeGetAvailableTimeSteps (const IndexValueType &slice) const
 
std::vector< TimeStepTypeGetAvailableTimeSteps () const
 
std::vector< IndexValueTypeGetAvailableSlices () const
 
void SetValue (const TimeStepType &timeStep, const IndexValueType &zSlice, const ValueType &value)
 
void SetValue (const ValueType &value)
 
std::string GetValueAsString () const override
 
bool IsUniform () const
 
- 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...
 
BasePropertyoperator= (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 Pointer New (const char *_arg)
 
static Pointer New (const std::string &_arg)
 
- Static Public Member Functions inherited from mitk::BaseProperty
static const char * GetStaticNameOfClass ()
 

Protected Types

typedef std::map< IndexValueType, std::string > SliceMapType
 
typedef std::map< TimeStepType, SliceMapTypeTimeMapType
 

Protected Member Functions

 TemporoSpatialStringProperty (const char *string=nullptr)
 
 TemporoSpatialStringProperty (const std::string &s)
 
 TemporoSpatialStringProperty (const TemporoSpatialStringProperty &)
 
std::pair< bool, ValueTypeCheckValue (const TimeStepType &timeStep, const IndexValueType &zSlice, bool allowCloseTime=false, bool allowCloseSlice=false) const
 
- Protected Member Functions inherited from mitk::BaseProperty
 BaseProperty ()
 
 BaseProperty (const BaseProperty &other)
 
 ~BaseProperty () override
 

Protected Attributes

TimeMapType m_Values
 

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...
 

Detailed Description

Property for time and space resolved string values.

Definition at line 36 of file mitkTemporoSpatialStringProperty.h.

Member Typedef Documentation

◆ ConstPointer

◆ IndexValueType

Definition at line 39 of file mitkTemporoSpatialStringProperty.h.

◆ Pointer

◆ Self

◆ SliceMapType

typedef std::map<IndexValueType, std::string> mitk::TemporoSpatialStringProperty::SliceMapType
protected

Definition at line 93 of file mitkTemporoSpatialStringProperty.h.

◆ Superclass

◆ TimeMapType

◆ ValueType

Constructor & Destructor Documentation

◆ TemporoSpatialStringProperty() [1/3]

mitk::TemporoSpatialStringProperty::TemporoSpatialStringProperty ( const char *  string = nullptr)
protected

Definition at line 22 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

◆ TemporoSpatialStringProperty() [2/3]

mitk::TemporoSpatialStringProperty::TemporoSpatialStringProperty ( const std::string &  s)
protected

Definition at line 32 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

◆ TemporoSpatialStringProperty() [3/3]

mitk::TemporoSpatialStringProperty::TemporoSpatialStringProperty ( const TemporoSpatialStringProperty other)
protected

Definition at line 39 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

Member Function Documentation

◆ CheckValue()

std::pair< bool, mitk::TemporoSpatialStringProperty::ValueType > mitk::TemporoSpatialStringProperty::CheckValue ( const TimeStepType timeStep,
const IndexValueType zSlice,
bool  allowCloseTime = false,
bool  allowCloseSlice = false 
) const
protected

Definition at line 97 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

Referenced by GetValue(), and HasValue().

◆ Clone()

Pointer mitk::TemporoSpatialStringProperty::Clone ( ) const

◆ GetAvailableSlices() [1/2]

std::vector< mitk::TemporoSpatialStringProperty::IndexValueType > mitk::TemporoSpatialStringProperty::GetAvailableSlices ( const TimeStepType timeStep) const

return all slices stored for the specified timestep.

Definition at line 197 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

Referenced by CondenseTimePointValuesOfProperty(), and mitk::TemporalJoinImagesFilter::GenerateOutputInformation().

◆ GetAvailableSlices() [2/2]

std::vector< mitk::TemporoSpatialStringProperty::IndexValueType > mitk::TemporoSpatialStringProperty::GetAvailableSlices ( ) const

return all slices stored in the property. not all time steps may contain all slices.

Definition at line 182 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

◆ GetAvailableTimeSteps() [1/2]

std::vector< mitk::TimeStepType > mitk::TemporoSpatialStringProperty::GetAvailableTimeSteps ( const IndexValueType slice) const

return all time steps stored for the specified slice.

Definition at line 228 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

Referenced by CondenseTimePointValuesOfProperty().

◆ GetAvailableTimeSteps() [2/2]

std::vector< mitk::TimeStepType > mitk::TemporoSpatialStringProperty::GetAvailableTimeSteps ( ) const

return all time steps stored in the property.

Definition at line 216 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

◆ GetClassHierarchy()

virtual std::vector<std::string> mitk::TemporoSpatialStringProperty::GetClassHierarchy ( ) const
inlineoverridevirtual

Reimplemented from mitk::BaseProperty.

Definition at line 42 of file mitkTemporoSpatialStringProperty.h.

◆ GetClassName()

virtual const char* mitk::TemporoSpatialStringProperty::GetClassName ( ) const
virtual

Reimplemented from mitk::BaseProperty.

◆ GetStaticNameOfClass()

static const char* mitk::TemporoSpatialStringProperty::GetStaticNameOfClass ( )
inlinestatic

Definition at line 42 of file mitkTemporoSpatialStringProperty.h.

◆ GetValue() [1/2]

mitk::TemporoSpatialStringProperty::ValueType mitk::TemporoSpatialStringProperty::GetValue ( ) const

Returns the value of the first time point in the first slice. If now value is set it returns an empty string.

Definition at line 83 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

Referenced by CondenseTimePointValuesOfProperty(), mitk::DICOMSegmentationIO::DoRead(), GetValueAsString(), GetValueBySlice(), GetValueByTimeStep(), IsUniform(), and mitk::CustomTagParser::ParseDicomProperty().

◆ GetValue() [2/2]

mitk::TemporoSpatialStringProperty::ValueType mitk::TemporoSpatialStringProperty::GetValue ( const TimeStepType timeStep,
const IndexValueType zSlice,
bool  allowCloseTime = false,
bool  allowCloseSlice = false 
) const

Returns the value of the passed time step and slice. If it does not exist and allowedClosed is true it will look for the closest value. If nothing could be found an empty string will be returned.

Definition at line 139 of file mitkTemporoSpatialStringProperty.cpp.

References CheckValue().

◆ GetValueAsString()

std::string mitk::TemporoSpatialStringProperty::GetValueAsString ( ) const
overridevirtual

Reimplemented from mitk::BaseProperty.

Definition at line 55 of file mitkTemporoSpatialStringProperty.cpp.

References GetValue().

Referenced by mitk::DICOMSegmentationIO::DoRead().

◆ GetValueBySlice()

mitk::TemporoSpatialStringProperty::ValueType mitk::TemporoSpatialStringProperty::GetValueBySlice ( const IndexValueType zSlice,
bool  allowClose = false 
) const

Definition at line 147 of file mitkTemporoSpatialStringProperty.cpp.

References GetValue().

◆ GetValueByTimeStep()

mitk::TemporoSpatialStringProperty::ValueType mitk::TemporoSpatialStringProperty::GetValueByTimeStep ( const TimeStepType timeStep,
bool  allowClose = false 
) const

Definition at line 153 of file mitkTemporoSpatialStringProperty.cpp.

References GetValue().

◆ HasValue() [1/2]

bool mitk::TemporoSpatialStringProperty::HasValue ( ) const

Definition at line 159 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

Referenced by HasValueBySlice(), and HasValueByTimeStep().

◆ HasValue() [2/2]

bool mitk::TemporoSpatialStringProperty::HasValue ( const TimeStepType timeStep,
const IndexValueType zSlice,
bool  allowCloseTime = false,
bool  allowCloseSlice = false 
) const

Definition at line 164 of file mitkTemporoSpatialStringProperty.cpp.

References CheckValue().

◆ HasValueBySlice()

bool mitk::TemporoSpatialStringProperty::HasValueBySlice ( const IndexValueType zSlice,
bool  allowClose = false 
) const

Definition at line 172 of file mitkTemporoSpatialStringProperty.cpp.

References HasValue().

◆ HasValueByTimeStep()

bool mitk::TemporoSpatialStringProperty::HasValueByTimeStep ( const TimeStepType timeStep,
bool  allowClose = false 
) const

Definition at line 177 of file mitkTemporoSpatialStringProperty.cpp.

References HasValue().

◆ IsUniform()

bool mitk::TemporoSpatialStringProperty::IsUniform ( ) const

Inidicates of all values (all time steps, all slices) are the same, or if at least one value stored in the property is different. If IsUniform==true one can i.a. use GetValueAsString() without the loss of information to retrieve the stored value.

Definition at line 60 of file mitkTemporoSpatialStringProperty.cpp.

References GetValue(), and m_Values.

◆ New() [1/3]

◆ New() [2/3]

static Pointer mitk::TemporoSpatialStringProperty::New ( const char *  _arg)
inlinestatic

Definition at line 47 of file mitkTemporoSpatialStringProperty.h.

◆ New() [3/3]

static Pointer mitk::TemporoSpatialStringProperty::New ( const std::string &  _arg)
inlinestatic

Definition at line 48 of file mitkTemporoSpatialStringProperty.h.

◆ SetValue() [1/2]

void mitk::TemporoSpatialStringProperty::SetValue ( const TimeStepType timeStep,
const IndexValueType zSlice,
const ValueType value 
)

Definition at line 243 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values.

Referenced by SetValue().

◆ SetValue() [2/2]

void mitk::TemporoSpatialStringProperty::SetValue ( const ValueType value)

Definition at line 262 of file mitkTemporoSpatialStringProperty.cpp.

References m_Values, and SetValue().

Member Data Documentation

◆ m_Values

TimeMapType mitk::TemporoSpatialStringProperty::m_Values
protected

The documentation for this class was generated from the following files: