Medical Imaging Interaction Toolkit  2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
mitk::ROI::Element Class Reference

Encapsulates a single (possibly time-resolved) ROI. More...

#include <mitkROI.h>

Inheritance diagram for mitk::ROI::Element:
Collaboration diagram for mitk::ROI::Element:

Public Types

using PointsType = std::map< TimeStepType, Point3D >
 
using PropertyListsType = std::map< TimeStepType, PropertyList::Pointer >
 

Public Member Functions

 Element ()
 
 Element (unsigned int id)
 
 ~Element ()=default
 
BaseProperty::ConstPointer GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override
 Get a const property. More...
 
BaseProperty::ConstPointer GetConstProperty (const std::string &propertyKey, TimeStepType t, bool fallBackOnDefaultContext=true) const
 
std::vector< std::string > GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override
 Get all property keys. More...
 
std::vector< std::string > GetPropertyKeys (TimeStepType t, bool includeDefaultContext=false) const
 
std::vector< std::string > GetPropertyContextNames () const override
 Get all property context names (stringified time steps). More...
 
BasePropertyGetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override
 Get a property. More...
 
BasePropertyGetNonConstProperty (const std::string &propertyKey, TimeStepType t, bool fallBackOnDefaultContext=true)
 
void SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Set a property. More...
 
void SetProperty (const std::string &propertyKey, BaseProperty *property, TimeStepType t, bool fallBackOnDefaultContext=false)
 
void RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Remove a property. More...
 
void RemoveProperty (const std::string &propertyKey, TimeStepType t, bool fallBackOnDefaultContext=false)
 
unsigned int GetID () const
 
void SetID (unsigned int id)
 
bool HasTimeStep (TimeStepType t) const
 Check if the ROI is defined for a certain time step. More...
 
bool HasTimeSteps () const
 Check if the ROI can be considered time-resolved. More...
 
std::vector< TimeStepTypeGetTimeSteps () const
 Get all valid time steps that have a minimum point and a maximum point. More...
 
Point3D GetMin (TimeStepType t=0) const
 
void SetMin (const Point3D &min, TimeStepType t=0)
 
Point3D GetMax (TimeStepType t=0) const
 
void SetMax (const Point3D &max, TimeStepType t=0)
 
PropertyListGetDefaultProperties () const
 
void SetDefaultProperties (PropertyList *properties)
 
PropertyListGetProperties (TimeStepType t=0) const
 Get properties for a certain time step or nullptr if absent. More...
 
void SetProperties (PropertyList *properties, TimeStepType t=0)
 
- Public Member Functions inherited from mitk::IPropertyOwner
 ~IPropertyOwner () override
 
- Public Member Functions inherited from mitk::IPropertyProvider
virtual ~IPropertyProvider ()
 

Detailed Description

Encapsulates a single (possibly time-resolved) ROI.

See also
ROI

Definition at line 65 of file mitkROI.h.

Member Typedef Documentation

◆ PointsType

Definition at line 68 of file mitkROI.h.

◆ PropertyListsType

Constructor & Destructor Documentation

◆ Element() [1/2]

mitk::ROI::Element::Element ( )

◆ Element() [2/2]

mitk::ROI::Element::Element ( unsigned int  id)
explicit

◆ ~Element()

mitk::ROI::Element::~Element ( )
default

Member Function Documentation

◆ GetConstProperty() [1/2]

BaseProperty::ConstPointer mitk::ROI::Element::GetConstProperty ( const std::string &  propertyKey,
const std::string &  contextName = "",
bool  fallBackOnDefaultContext = true 
) const
overridevirtual

Get a const property.

Note
A time step can be specified as context. Use std::to_string() to convert a time step to a context name. An empty context name addresses the default properties.

Implements mitk::IPropertyProvider.

Referenced by mitk::ROIMapperHelper::GetConstProperty().

◆ GetConstProperty() [2/2]

BaseProperty::ConstPointer mitk::ROI::Element::GetConstProperty ( const std::string &  propertyKey,
TimeStepType  t,
bool  fallBackOnDefaultContext = true 
) const

◆ GetDefaultProperties()

PropertyList* mitk::ROI::Element::GetDefaultProperties ( ) const

◆ GetID()

unsigned int mitk::ROI::Element::GetID ( ) const

◆ GetMax()

Point3D mitk::ROI::Element::GetMax ( TimeStepType  t = 0) const

◆ GetMin()

Point3D mitk::ROI::Element::GetMin ( TimeStepType  t = 0) const

◆ GetNonConstProperty() [1/2]

BaseProperty* mitk::ROI::Element::GetNonConstProperty ( const std::string &  propertyKey,
const std::string &  contextName = "",
bool  fallBackOnDefaultContext = true 
)
overridevirtual

Get a property.

Note
A time step can be specified as context. Use std::to_string() to convert a time step to a context name. An empty context name addresses the default properties.

Implements mitk::IPropertyOwner.

◆ GetNonConstProperty() [2/2]

BaseProperty* mitk::ROI::Element::GetNonConstProperty ( const std::string &  propertyKey,
TimeStepType  t,
bool  fallBackOnDefaultContext = true 
)

◆ GetProperties()

PropertyList* mitk::ROI::Element::GetProperties ( TimeStepType  t = 0) const

Get properties for a certain time step or nullptr if absent.

◆ GetPropertyContextNames()

std::vector<std::string> mitk::ROI::Element::GetPropertyContextNames ( ) const
overridevirtual

Get all property context names (stringified time steps).

Implements mitk::IPropertyProvider.

◆ GetPropertyKeys() [1/2]

std::vector<std::string> mitk::ROI::Element::GetPropertyKeys ( const std::string &  contextName = "",
bool  includeDefaultContext = false 
) const
overridevirtual

Get all property keys.

Note
A time step can be specified as context. Use std::to_string() to convert a time step to a context name. An empty context name addresses the default properties.

Implements mitk::IPropertyProvider.

◆ GetPropertyKeys() [2/2]

std::vector<std::string> mitk::ROI::Element::GetPropertyKeys ( TimeStepType  t,
bool  includeDefaultContext = false 
) const

◆ GetTimeSteps()

std::vector<TimeStepType> mitk::ROI::Element::GetTimeSteps ( ) const

Get all valid time steps that have a minimum point and a maximum point.

◆ HasTimeStep()

bool mitk::ROI::Element::HasTimeStep ( TimeStepType  t) const

Check if the ROI is defined for a certain time step.

◆ HasTimeSteps()

bool mitk::ROI::Element::HasTimeSteps ( ) const

Check if the ROI can be considered time-resolved.

◆ RemoveProperty() [1/2]

void mitk::ROI::Element::RemoveProperty ( const std::string &  propertyKey,
const std::string &  contextName = "",
bool  fallBackOnDefaultContext = false 
)
overridevirtual

Remove a property.

Note
A time step can be specified as context. Use std::to_string() to convert a time step to a context name. An empty context name addresses the default properties.

Implements mitk::IPropertyOwner.

◆ RemoveProperty() [2/2]

void mitk::ROI::Element::RemoveProperty ( const std::string &  propertyKey,
TimeStepType  t,
bool  fallBackOnDefaultContext = false 
)

◆ SetDefaultProperties()

void mitk::ROI::Element::SetDefaultProperties ( PropertyList properties)

◆ SetID()

void mitk::ROI::Element::SetID ( unsigned int  id)

◆ SetMax()

void mitk::ROI::Element::SetMax ( const Point3D max,
TimeStepType  t = 0 
)

◆ SetMin()

void mitk::ROI::Element::SetMin ( const Point3D min,
TimeStepType  t = 0 
)

◆ SetProperties()

void mitk::ROI::Element::SetProperties ( PropertyList properties,
TimeStepType  t = 0 
)

◆ SetProperty() [1/2]

void mitk::ROI::Element::SetProperty ( const std::string &  propertyKey,
BaseProperty property,
const std::string &  contextName = "",
bool  fallBackOnDefaultContext = false 
)
overridevirtual

Set a property.

Note
A time step can be specified as context. Use std::to_string() to convert a time step to a context name. An empty context name addresses the default properties.

Implements mitk::IPropertyOwner.

◆ SetProperty() [2/2]

void mitk::ROI::Element::SetProperty ( const std::string &  propertyKey,
BaseProperty property,
TimeStepType  t,
bool  fallBackOnDefaultContext = false 
)

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