13 #ifndef mitkBaseData_h
14 #define mitkBaseData_h
16 #include <itkDataObject.h>
77 BaseProperty::ConstPointer
GetConstProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
true)
const override;
89 std::vector<std::string>
GetPropertyKeys(
const std::string &contextName =
"",
bool includeDefaultContext =
false)
const override;
126 void SetProperty(
const std::string &propertyKey,
BaseProperty *property,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
139 void RemoveProperty(
const std::string &propertyKey,
const std::string &contextName =
"",
bool fallBackOnDefaultContext =
false)
override;
154 return m_TimeGeometry.GetPointer();
195 virtual void Expand(
unsigned int timeSteps);
226 if (m_TimeGeometry.IsNull())
228 return m_TimeGeometry->GetGeometryForTimeStep(t);
461 mitk::BaseProperty::Pointer
GetProperty(
const char *propertyKey)
const;
510 unsigned int GetTimeSteps()
const {
return m_TimeGeometry->CountTimeSteps(); }
527 void Graft(
const DataObject *)
override;
549 void PrintSelf(std::ostream &os, itk::Indent indent)
const override;
561 PropertyList::Pointer m_PropertyList;
563 TimeGeometry::Pointer m_TimeGeometry;
Base class 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!).
mitk::BaseGeometry * GetGeometry(int t=0) const
Return the BaseGeometry of the data at time step t as a non-const pointer.
itk::ModifiedTimeType GetMTime() const override
Get the modification time of this data object or its geometry, whichever was modified most recently.
void SetPropertyList(PropertyList *propertyList)
Set the data's property list, replacing the existing one.
virtual bool IsInitialized() const
Check whether the data has been initialized.
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
Get the names of all property contexts.
BaseProperty * GetNonConstProperty(const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override
Get a non-const 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 non-const pointer.
void Graft(const DataObject *) override
Graft data and information from another data object.
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
Remove a property from the property list.
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 the BaseGeometry of a given time step.
void SetProperty(const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
Set a property in the property list.
unsigned int m_SourceOutputIndexDuplicate
virtual void SetClonedTimeGeometry(const TimeGeometry *geometry)
Set a clone of the provided TimeGeometry as the TimeGeometry of the data.
mitk::BaseProperty::Pointer GetProperty(const char *propertyKey) const
Get a property by its key from the PropertyList.
virtual void SetClonedGeometry(const BaseGeometry *aGeometry3D)
Set a clone of the provided geometry as the BaseGeometry of the data.
virtual void Expand(unsigned int timeSteps)
Expand the TimeGeometry to a number of time steps.
virtual void Clear()
Reset the data object by calling ClearData() and InitializeEmpty().
void SetProperty(const char *propertyKey, BaseProperty *property)
Set a property in the PropertyList.
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 a const 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 so that it can be used as an output of a BaseProcess.
const mitk::BaseGeometry * GetUpdatedGeometry(int t=0)
Return the BaseGeometry of the data at time step t after ensuring it is up-to-date.
std::vector< std::string > GetPropertyKeys(const std::string &contextName="", bool includeDefaultContext=false) const override
Get all property keys stored in the property list.
void ExecuteOperation(Operation *operation) override
Execute an operation on this data object.
unsigned int GetTimeSteps() const
Get the number of time steps from the TimeGeometry.
const mitk::TimeGeometry * GetUpdatedTimeGeometry()
Return the TimeGeometry of the data after ensuring it is up-to-date.
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 the object contains data at any time step.
virtual bool IsEmptyTimeStep(unsigned int t) const
Check whether the object contains data at the specified time step.
const mitk::TimeGeometry * GetTimeGeometry() const
Return the TimeGeometry of the data as const pointer.
Abstract base class describing the geometry of a data object.
Abstract base class for properties.
Interface implemented by classes that provide write/read access to property information.
Base class of identifiable objects.
abstract class, that can be used by Undo to undo an operation.
Base class for all operations in the undo/redo framework.
Key-value list holding instances of BaseProperty.
Find image slices visible on a given plane.