112 BaseProperty::ConstPointer
GetConstProperty(
const std::string& propertyKey,
const std::string& contextName =
"",
bool fallBackOnDefaultContext =
true)
const override;
134 std::vector<std::string>
GetPropertyKeys(
const std::string& contextName =
"",
bool includeDefaultContext =
false)
const override;
185 void SetProperty(
const std::string& propertyKey,
BaseProperty* property,
const std::string& contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
211 void RemoveProperty(
const std::string& propertyKey,
const std::string& contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
317 PropertyList::Pointer m_DefaultProperties;
322 itkFactorylessNewMacro(Self)
339 size_t GetNumberOfElements() const;
356 const
Element& GetElement(
unsigned int id) const;
380 void SetRequestedRegionToLargestPossibleRegion() override;
387 bool RequestedRegionIsOutsideOfTheBufferedRegion() override;
394 bool VerifyRequestedRegion() override;
401 void SetRequestedRegion(const
itk::DataObject* data) override;
Base class of all data objects.
Abstract base class for properties.
Interface implemented by classes that provide write/read access to property information.
Key-value list holding instances of BaseProperty.
Encapsulates a single (possibly time-resolved) ROI.
void SetDefaultProperties(PropertyList *properties)
Set the default property list.
Element & operator=(Element other)
Copy-and-swap assignment operator.
Point3D GetMin(TimeStepType t=0) const
Get the minimum corner point of the axis-aligned bounding box.
bool HasTimeStep(TimeStepType t) const
Check if the ROI is defined for a certain time step.
std::vector< std::string > GetPropertyContextNames() const override
Get all property context names (stringified time steps).
void SetProperty(const std::string &propertyKey, BaseProperty *property, TimeStepType t, bool fallBackOnDefaultContext=false)
Set a property at a specific time step.
void SetID(unsigned int id)
Set the unique ID of this ROI element.
void SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
Set a property for a given context.
Element(const Element &other)
Copy constructor. Deep-copies all properties.
PropertyList * GetProperties(TimeStepType t=0) const
Get properties for a certain time step or nullptr if absent.
Element()
Default constructor. Initializes the element with ID 0.
void RemoveProperty(const std::string &propertyKey, TimeStepType t, bool fallBackOnDefaultContext=false)
Remove a property at a specific time step.
BaseProperty * GetNonConstProperty(const std::string &propertyKey, TimeStepType t, bool fallBackOnDefaultContext=true)
Get a mutable property by key and time step.
std::vector< TimeStepType > GetTimeSteps() const
Get all valid time steps that have a minimum point and a maximum point.
std::vector< std::string > GetPropertyKeys(TimeStepType t, bool includeDefaultContext=false) const
Get all property keys for a given time step.
std::map< TimeStepType, Point3D > PointsType
Map from time steps to 3D points (used for min/max corners).
void SetProperties(PropertyList *properties, TimeStepType t=0)
Set the property list for a specific time step.
void SetMin(const Point3D &min, TimeStepType t=0)
Set the minimum corner point of the axis-aligned bounding box.
void SetMax(const Point3D &max, TimeStepType t=0)
Set the maximum corner point of the axis-aligned bounding box.
std::vector< std::string > GetPropertyKeys(const std::string &contextName="", bool includeDefaultContext=false) const override
Get all property keys for a given context.
PropertyList * GetDefaultProperties() const
Get the default (time-step-independent) property list.
BaseProperty * GetNonConstProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override
Get a mutable property by key and optional context.
bool HasTimeSteps() const
Check if the ROI can be considered time-resolved.
BaseProperty::ConstPointer GetConstProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override
Get a const property by key and optional context.
Point3D GetMax(TimeStepType t=0) const
Get the maximum corner point of the axis-aligned bounding box.
Element(unsigned int id)
Construct an element with the given unique ID.
void RemoveProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
Remove a property from a given context.
BaseProperty::ConstPointer GetConstProperty(const std::string &propertyKey, TimeStepType t, bool fallBackOnDefaultContext=true) const
Get a const property by key and time step.
std::map< TimeStepType, PropertyList::Pointer > PropertyListsType
Map from time steps to property lists.
unsigned int GetID() const
Get the unique ID of this ROI element.
A collection of region of interests (ROIs).
std::map< unsigned int, Element > ElementsType
Map type associating element IDs to their Element objects.
mitkClassMacro(ROI, BaseData) static Pointer New()
ElementsType::const_iterator ConstIterator
Const iterator over ROI elements.
ElementsType::iterator Iterator
Mutable iterator over ROI elements.
#define mitkCloneMacro(classname)
Find image slices visible on a given plane.
void from_json(const nlohmann::json &, GenericLookupTable< T > &)
Deserialize a GenericLookupTable from JSON.
std::size_t TimeStepType
Type for time step indices (non-negative integers starting from 0).
void to_json(nlohmann::json &j, const GenericLookupTable< T > &t)
Serialize a GenericLookupTable to JSON.