13 #ifndef mitkBaseData_h
14 #define mitkBaseData_h
16 #include <itkDataObject.h>
49 BaseProperty::ConstPointer
GetConstProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
true)
const override;
50 std::vector<std::string>
GetPropertyKeys(
const std::string &contextName =
"",
bool includeDefaultContext =
false)
const override;
55 void SetProperty(
const std::string &propertyKey,
BaseProperty *property,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
56 void RemoveProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
68 return m_TimeGeometry.GetPointer();
98 virtual void Expand(
unsigned int timeSteps);
123 if (m_TimeGeometry.IsNull())
125 return m_TimeGeometry->GetGeometryForTimeStep(t);
302 mitk::BaseProperty::Pointer
GetProperty(
const char *propertyKey)
const;
338 unsigned int GetTimeSteps()
const {
return m_TimeGeometry->CountTimeSteps(); }
347 void Graft(
const DataObject *)
override;
369 void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
381 PropertyList::Pointer m_PropertyList;
383 TimeGeometry::Pointer m_TimeGeometry;
Base of all data objects.
mitkClassMacroItkParent(BaseData, itk::DataObject)
virtual void SetGeometry(BaseGeometry *aGeometry3D)
Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has...
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
itk::ModifiedTimeType GetMTime() const override
Get the modified time of the last change of the contents this data object or its geometry.
void SetPropertyList(PropertyList *propertyList)
Set the data's property list.
virtual bool IsInitialized() const
Check whether the data has been initialized, i.e., at least the Geometry and other header data has be...
virtual void InitializeEmpty()
Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least creat...
BaseData(const BaseData &other)
bool m_LastRequestedRegionWasOutsideOfTheBufferedRegion
virtual void SetTimeGeometry(TimeGeometry *geometry)
Set the TimeGeometry of the data, which will be referenced (not copied!).
void SetRequestedRegionToLargestPossibleRegion() override=0
Set the RequestedRegion to the LargestPossibleRegion.
virtual void SetOrigin(const Point3D &origin)
Convenience method for setting the origin of the BaseGeometry instances of all time steps.
void SetRequestedRegion(const itk::DataObject *data) override=0
Set the requested region from this data object to match the requested region of the data object passe...
std::vector< std::string > GetPropertyContextNames() const override
Query names of existing contexts.
BaseProperty * GetNonConstProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override
Get property by its key.
void CopyInformation(const itk::DataObject *data) override
Copy information from the specified data set.
mitk::TimeGeometry * GetTimeGeometry()
Return the TimeGeometry of the data as pointer.
void Graft(const DataObject *) override
bool VerifyRequestedRegion() override=0
Verify that the RequestedRegion is within the LargestPossibleRegion.
void RemoveProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
Removes a property. If the property does not exist, nothing will be done.
itk::SmartPointer< mitk::BaseDataSource > GetSource() const
Get the process object that generated this data object.
mitk::PropertyList::Pointer GetPropertyList() const
Get the data's property list.
virtual void ClearData()
reset to non-initialized state, release memory
virtual void SetClonedGeometry(const BaseGeometry *aGeometry3D, unsigned int time)
Set a clone of the provided geometry as BaseGeometry of a given time step.
void SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
Add new or change existent property.
unsigned int m_SourceOutputIndexDuplicate
virtual void SetClonedTimeGeometry(const TimeGeometry *geometry)
Set a clone of the provided TimeGeometry as TimeGeometry of the data.
mitk::BaseProperty::Pointer GetProperty(const char *propertyKey) const
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList,...
virtual void SetClonedGeometry(const BaseGeometry *aGeometry3D)
Set a clone of the provided Geometry as Geometry of the data. Assumes the data object has only 1 time...
virtual void Expand(unsigned int timeSteps)
Expands the TimeGeometry to a number of TimeSteps.
virtual void Clear()
Calls ClearData() and InitializeEmpty();.
void SetProperty(const char *propertyKey, BaseProperty *property)
void PrintSelf(std::ostream &os, itk::Indent indent) const override
BaseProperty::ConstPointer GetConstProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override
Get property by its key.
bool RequestedRegionIsOutsideOfTheBufferedRegion() override=0
Determine whether the RequestedRegion is outside of the BufferedRegion.
void UpdateOutputInformation() override
Update the information for this BaseData (the geometry in particular) so that it can be used as an ou...
const mitk::BaseGeometry * GetUpdatedGeometry(int t=0)
Return the BaseGeometry of the data at time t.
std::vector< std::string > GetPropertyKeys(const std::string &contextName="", bool includeDefaultContext=false) const override
Query keys of existing properties.
void ExecuteOperation(Operation *operation) override
overwrite if the Data can be called by an Interactor (StateMachine).
unsigned int GetTimeSteps() const
Get the number of time steps from the TimeGeometry As the base data has not a data vector given by it...
const mitk::TimeGeometry * GetUpdatedTimeGeometry()
Return the TimeGeometry of the data.
virtual void InitializeTimeGeometry(unsigned int timeSteps=1)
Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and eve...
virtual bool IsEmpty() const
Check whether object contains data (at least at one point in time), e.g., a set of points may be empt...
virtual bool IsEmptyTimeStep(unsigned int t) const
Check whether object contains data (at a specified time), e.g., a set of points may be empty.
const mitk::TimeGeometry * GetTimeGeometry() const
Return the TimeGeometry of the data as const pointer.
BaseGeometry Describes the geometry of a data object.
Abstract base class for properties.
Base class of identifiable objects.
abstract class, that can be used by Undo to undo an operation.
Base class of all Operation-classes.
Key-value list holding instances of BaseProperty.
Find image slices visible on a given plane.