Medical Imaging Interaction Toolkit
2024.12.99-0da743f6
Medical Imaging Interaction Toolkit
|
Base of all data objects. More...
#include <mitkBaseData.h>
Public Types | |
typedef BaseData | Self |
typedef itk::DataObject | Superclass |
typedef itk::SmartPointer< Self > | Pointer |
typedef itk::SmartPointer< const Self > | ConstPointer |
Public Types inherited from mitk::Identifiable | |
using | UIDType = std::string |
Public Member Functions | |
virtual std::vector< std::string > | GetClassHierarchy () const |
virtual const char * | GetClassName () const |
BaseProperty::ConstPointer | GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override |
Get property by its key. More... | |
std::vector< std::string > | GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override |
Query keys of existing properties. More... | |
std::vector< std::string > | GetPropertyContextNames () const override |
Query names of existing contexts. More... | |
BaseProperty * | GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override |
Get property by its key. More... | |
void | SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override |
Add new or change existent property. More... | |
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. More... | |
const mitk::TimeGeometry * | GetTimeGeometry () const |
Return the TimeGeometry of the data as const pointer. More... | |
mitk::TimeGeometry * | GetTimeGeometry () |
Return the TimeGeometry of the data as pointer. More... | |
const mitk::TimeGeometry * | GetUpdatedTimeGeometry () |
Return the TimeGeometry of the data. More... | |
virtual void | Expand (unsigned int timeSteps) |
Expands the TimeGeometry to a number of TimeSteps. More... | |
const mitk::BaseGeometry * | GetUpdatedGeometry (int t=0) |
Return the BaseGeometry of the data at time t. More... | |
mitk::BaseGeometry * | GetGeometry (int t=0) const |
Return the geometry, which is a TimeGeometry, of the data as non-const pointer. More... | |
void | UpdateOutputInformation () override |
Update the information for this BaseData (the geometry in particular) so that it can be used as an output of a BaseProcess. More... | |
void | SetRequestedRegionToLargestPossibleRegion () override=0 |
Set the RequestedRegion to the LargestPossibleRegion. More... | |
bool | RequestedRegionIsOutsideOfTheBufferedRegion () override=0 |
Determine whether the RequestedRegion is outside of the BufferedRegion. More... | |
bool | VerifyRequestedRegion () override=0 |
Verify that the RequestedRegion is within the LargestPossibleRegion. More... | |
void | CopyInformation (const itk::DataObject *data) override |
Copy information from the specified data set. More... | |
virtual bool | IsInitialized () const |
Check whether the data has been initialized, i.e., at least the Geometry and other header data has been set. More... | |
virtual void | Clear () |
Calls ClearData() and InitializeEmpty();. More... | |
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. More... | |
virtual bool | IsEmpty () const |
Check whether object contains data (at least at one point in time), e.g., a set of points may be empty. More... | |
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 passed in as a parameter. More... | |
void | ExecuteOperation (Operation *operation) override |
overwrite if the Data can be called by an Interactor (StateMachine). More... | |
virtual void | SetGeometry (BaseGeometry *aGeometry3D) |
Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry which saves the given BaseGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function. More... | |
virtual void | SetTimeGeometry (TimeGeometry *geometry) |
Set the TimeGeometry of the data, which will be referenced (not copied!). More... | |
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 step ( is a 3D object ) and creates a new TimeGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function. More... | |
virtual void | SetClonedTimeGeometry (const TimeGeometry *geometry) |
Set a clone of the provided TimeGeometry as TimeGeometry of the data. More... | |
virtual void | SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time) |
Set a clone of the provided geometry as BaseGeometry of a given time step. More... | |
mitk::PropertyList::Pointer | GetPropertyList () const |
Get the data's property list. More... | |
void | SetPropertyList (PropertyList *propertyList) |
Set the data's property list. More... | |
mitk::BaseProperty::Pointer | GetProperty (const char *propertyKey) const |
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList, and set it to this, respectively;. More... | |
void | SetProperty (const char *propertyKey, BaseProperty *property) |
virtual void | SetOrigin (const Point3D &origin) |
Convenience method for setting the origin of the BaseGeometry instances of all time steps. More... | |
itk::SmartPointer< mitk::BaseDataSource > | GetSource () const |
Get the process object that generated this data object. More... | |
unsigned int | GetTimeSteps () const |
Get the number of time steps from the TimeGeometry As the base data has not a data vector given by itself, the number of time steps is defined over the time sliced geometry. In sub classes, a better implementation could be over the length of the data vector. More... | |
itk::ModifiedTimeType | GetMTime () const override |
Get the modified time of the last change of the contents this data object or its geometry. More... | |
void | Graft (const DataObject *) override |
Public Member Functions inherited from mitk::OperationActor | |
itkTypeMacroNoParent (OperationActor) virtual ~OperationActor() | |
Public Member Functions inherited from mitk::Identifiable | |
Identifiable () | |
Identifiable (const UIDType &uid) | |
Identifiable (const Identifiable &)=delete | |
Identifiable (Identifiable &&) noexcept | |
virtual | ~Identifiable () |
Identifiable & | operator= (const Identifiable &)=delete |
Identifiable & | operator= (Identifiable &&other) noexcept |
virtual UIDType | GetUID () const |
Get unique ID of an object. More... | |
Public Member Functions inherited from mitk::IPropertyOwner | |
~IPropertyOwner () override | |
Public Member Functions inherited from mitk::IPropertyProvider | |
virtual | ~IPropertyProvider () |
Static Public Member Functions | |
static const char * | GetStaticNameOfClass () |
Protected Member Functions | |
BaseData () | |
BaseData (const BaseData &other) | |
~BaseData () override | |
virtual void | InitializeTimeGeometry (unsigned int timeSteps=1) |
Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes. More... | |
virtual void | ClearData () |
reset to non-initialized state, release memory More... | |
virtual void | InitializeEmpty () |
Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry. More... | |
void | PrintSelf (std::ostream &os, itk::Indent indent) const override |
Protected Member Functions inherited from mitk::Identifiable | |
virtual void | SetUID (const UIDType &uid) |
Protected Attributes | |
bool | m_LastRequestedRegionWasOutsideOfTheBufferedRegion |
unsigned int | m_SourceOutputIndexDuplicate |
bool | m_Initialized |
Base of all data objects.
Base of all data objects, e.g., images, contours, surfaces etc. Inherits from itk::DataObject and thus can be included in a pipeline. Inherits also from OperationActor and can be used as a destination for Undo
Definition at line 42 of file mitkBaseData.h.
typedef itk::SmartPointer<const Self> mitk::BaseData::ConstPointer |
Definition at line 46 of file mitkBaseData.h.
typedef itk::SmartPointer<Self> mitk::BaseData::Pointer |
Definition at line 46 of file mitkBaseData.h.
typedef BaseData mitk::BaseData::Self |
Definition at line 46 of file mitkBaseData.h.
typedef itk::DataObject mitk::BaseData::Superclass |
Definition at line 46 of file mitkBaseData.h.
|
protected |
|
protected |
|
overrideprotected |
|
virtual |
Calls ClearData() and InitializeEmpty();.
Reimplemented in mitk::Image, mitk::ContourModel, and mitk::ContourModelSet.
|
protectedvirtual |
reset to non-initialized state, release memory
Reimplemented in mitk::ContourModel, mitk::PointSet, mitk::UnstructuredGrid, and mitk::Surface.
|
override |
Copy information from the specified data set.
This method is part of the pipeline execution model. By default, a BaseProcess will copy meta-data from the first input to all of its outputs. See ProcessObject::GenerateOutputInformation(). Each subclass of DataObject is responsible for being able to copy whatever meta-data it needs from another DataObject. The default implementation of this method copies the time sliced geometry and the property list of an object. If a subclass overrides this method, it should always call its superclass' version.
|
overridevirtual |
overwrite if the Data can be called by an Interactor (StateMachine).
Empty by default. Overwrite and implement all the necessary operations here and get the necessary information from the parameter operation.
Implements mitk::OperationActor.
Reimplemented in mitk::PointSet, and mitk::Surface.
|
virtual |
Expands the TimeGeometry to a number of TimeSteps.
The method expands the TimeGeometry to the given number of TimeSteps, filling newly created elements with empty geometries. Sub-classes should override this method to handle the elongation of their data vectors, too. Note that a shrinking is neither possible nor intended.
Reimplemented in mitk::UnstructuredGrid, mitk::Surface, mitk::Image, mitk::ContourModel, and mitk::PointSet.
|
inlinevirtual |
Reimplemented in mitk::Image, mitk::PointSet, mitk::VtkWidgetRendering, mitk::SlicedData, mitk::PlaneGeometryData, mitk::Surface, mitk::BaseDataTestImplementation, mitk::GeometryData, and mitk::CrosshairData.
Definition at line 46 of file mitkBaseData.h.
|
virtual |
|
overridevirtual |
Get property by its key.
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | fallBackOnDefaultContext | Optional, default is true. Also search in default context if property was not found in given context. |
Implements mitk::IPropertyProvider.
|
inline |
Return the geometry, which is a TimeGeometry, of the data as non-const pointer.
Normally used in GenerateOutputInformation of subclasses of BaseProcess.
Definition at line 121 of file mitkBaseData.h.
Referenced by mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates(), and mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates().
|
override |
Get the modified time of the last change of the contents this data object or its geometry.
|
overridevirtual |
Get property by its key.
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | fallBackOnDefaultContext | Optional, default is true. Also search in default context if property was not found in given context. |
Implements mitk::IPropertyOwner.
mitk::BaseProperty::Pointer mitk::BaseData::GetProperty | ( | const char * | propertyKey | ) | const |
Get the property (instance of BaseProperty) with key propertyKey from the PropertyList, and set it to this, respectively;.
|
overridevirtual |
|
overridevirtual |
Query keys of existing properties.
[in] | contextName | Optional, default is empty string (default context). Search in specified context. |
[in] | includeDefaultContext | Optional, default is false. Include default context. |
Implements mitk::IPropertyProvider.
mitk::PropertyList::Pointer mitk::BaseData::GetPropertyList | ( | ) | const |
Get the data's property list.
itk::SmartPointer<mitk::BaseDataSource> mitk::BaseData::GetSource | ( | ) | const |
Get the process object that generated this data object.
If there is no process object, then the data object has been disconnected from the pipeline, or the data object was created manually. (Note: we cannot use the GetObjectMacro() defined in itkMacro because the mutual dependency of DataObject and ProcessObject causes compile problems. Also, a forward reference smart pointer is returned, not a smart pointer, because of the circular dependency between the process and data object.)
GetSource() returns a SmartPointer and not a WeakPointer because it is assumed the code calling GetSource() wants to hold a long term reference to the source.
|
inlinestatic |
Definition at line 46 of file mitkBaseData.h.
|
inline |
Return the TimeGeometry of the data as pointer.
Normally used in GenerateOutputInformation of subclasses of BaseProcess.
Definition at line 79 of file mitkBaseData.h.
|
inline |
Return the TimeGeometry of the data as const pointer.
Normally used in GenerateOutputInformation of subclasses of BaseProcess.
Definition at line 66 of file mitkBaseData.h.
|
inline |
Get the number of time steps from the TimeGeometry As the base data has not a data vector given by itself, the number of time steps is defined over the time sliced geometry. In sub classes, a better implementation could be over the length of the data vector.
Definition at line 338 of file mitkBaseData.h.
Referenced by mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates().
const mitk::BaseGeometry* mitk::BaseData::GetUpdatedGeometry | ( | int | t = 0 | ) |
Return the BaseGeometry of the data at time t.
The method does not simply return m_TimeGeometry->GetGeometry(t). Before doing this, it makes sure that the BaseGeometry is up-to-date (by setting the update extent appropriately and calling UpdateOutputInformation).
const mitk::TimeGeometry* mitk::BaseData::GetUpdatedTimeGeometry | ( | ) |
Return the TimeGeometry of the data.
The method does not simply return the value of the m_TimeGeometry member. Before doing this, it makes sure that the TimeGeometry is up-to-date (by setting the update extent to largest possible and calling UpdateOutputInformation).
|
override |
|
inlineprotectedvirtual |
Pure virtual; Must be used in subclasses to get a data object to a valid state. Should at least create one empty object and call Superclass::InitializeTimeGeometry() to ensure an existing valid geometry.
Reimplemented in mitk::ContourModel, mitk::PointSet, mitk::ContourModelSet, mitk::UnstructuredGrid, and mitk::Surface.
Definition at line 368 of file mitkBaseData.h.
|
protectedvirtual |
Initialize the TimeGeometry for a number of time steps. The TimeGeometry is initialized empty and evenly timed. In many cases it will be necessary to overwrite this in sub-classes.
Reimplemented in mitk::PlanarFigure, and mitk::BaseDataTestImplementation.
Referenced by mitk::BaseDataTestImplementation::InitializeTimeGeometry().
|
virtual |
Check whether object contains data (at least at one point in time), e.g., a set of points may be empty.
Reimplemented in mitk::AbstractGlobalImageFeature, mitk::ContourModel, mitk::AbstractClassifier, mitk::IntensityQuantifier, mitk::ContourModelSet, and mitk::MAPRegistrationWrapper.
|
virtual |
Check whether object contains data (at a specified time), e.g., a set of points may be empty.
Reimplemented in mitk::ContourModel, mitk::PointSet, mitk::Surface, and mitk::MAPRegistrationWrapper.
|
virtual |
Check whether the data has been initialized, i.e., at least the Geometry and other header data has been set.
|
overrideprotected |
|
overridevirtual |
Removes a property. If the property does not exist, nothing will be done.
[in] | propertyKey | Key of property. |
[in] | contextName | Optional, default is empty string (default context). Context in which the property is removed. |
[in] | fallBackOnDefaultContext | Optional, default is false. Remove property in default context if given context does not exist. |
Implements mitk::IPropertyOwner.
|
overridepure virtual |
Determine whether the RequestedRegion is outside of the BufferedRegion.
This method returns true if the RequestedRegion is outside the BufferedRegion (true if at least one pixel is outside). This is used by the pipeline mechanism to determine whether a filter needs to re-execute in order to satisfy the current request. If the current RequestedRegion is already inside the BufferedRegion from the previous execution (and the current filter is up to date), then a given filter does not need to re-execute
Implemented in mitk::ContourModel, mitk::AbstractGlobalImageFeature, mitk::PointSet, mitk::PlanarFigure, mitk::ROI, mitk::AbstractClassifier, mitk::Contour, mitk::SegmentationTaskList, mitk::ContourModelSet, mitk::SlicedData, mitk::VtkWidgetRendering, mitk::ContourSet, mitk::PlaneGeometryData, mitk::IntensityQuantifier, mitk::MAPRegistrationWrapper, mitk::RegEvaluationObject, mitk::Surface, mitk::UnstructuredGrid, mitk::ImageStatisticsContainer, mitk::BaseDataTestImplementation, mitk::GeometryData, mitk::ExampleDataStructure, and mitk::CrosshairData.
|
virtual |
Set a clone of the provided Geometry as Geometry of the data. Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function.
|
virtual |
Set a clone of the provided geometry as BaseGeometry of a given time step.
|
virtual |
Set a clone of the provided TimeGeometry as TimeGeometry of the data.
|
virtual |
Set the BaseGeometry of the data, which will be referenced (not copied!). Assumes the data object has only 1 time step ( is a 3D object ) and creates a new TimeGeometry which saves the given BaseGeometry. If an TimeGeometry has already been set for the object, it will be replaced after calling this function.
Reimplemented in mitk::PlaneGeometryData, mitk::Image, and mitk::SlicedData.
|
virtual |
Convenience method for setting the origin of the BaseGeometry instances of all time steps.
Reimplemented in mitk::SlicedData.
void mitk::BaseData::SetProperty | ( | const char * | propertyKey, |
BaseProperty * | property | ||
) |
|
overridevirtual |
Add new or change existent property.
[in] | propertyKey | Key of property. |
[in] | property | The actual property. |
[in] | contextName | Optional, default is empty string (default context). Context in which the property is set. |
[in] | fallBackOnDefaultContext | Optional, default is false. Set property in default context if given context does not exist. |
Implements mitk::IPropertyOwner.
void mitk::BaseData::SetPropertyList | ( | PropertyList * | propertyList | ) |
Set the data's property list.
|
overridepure virtual |
Set the requested region from this data object to match the requested region of the data object passed in as a parameter.
This method is implemented in the concrete subclasses of BaseData.
Implemented in mitk::ContourModel, mitk::PointSet, mitk::PlanarFigure, mitk::ROI, mitk::Contour, mitk::SlicedData, mitk::ContourSet, mitk::PlaneGeometryData, mitk::UnstructuredGrid, mitk::Surface, mitk::GeometryData, mitk::CrosshairData, mitk::AbstractGlobalImageFeature, mitk::AbstractClassifier, mitk::SegmentationTaskList, mitk::VtkWidgetRendering, mitk::ContourModelSet, mitk::MAPRegistrationWrapper, mitk::IntensityQuantifier, mitk::RegEvaluationObject, mitk::ImageStatisticsContainer, mitk::BaseDataTestImplementation, and mitk::ExampleDataStructure.
|
overridepure virtual |
Set the RequestedRegion to the LargestPossibleRegion.
This forces a filter to produce all of the output in one execution (i.e. not streaming) on the next call to Update().
Implemented in mitk::ContourModel, mitk::AbstractGlobalImageFeature, mitk::PointSet, mitk::PlanarFigure, mitk::ROI, mitk::AbstractClassifier, mitk::Contour, mitk::SegmentationTaskList, mitk::ContourModelSet, mitk::SlicedData, mitk::VtkWidgetRendering, mitk::ContourSet, mitk::IntensityQuantifier, mitk::PlaneGeometryData, mitk::MAPRegistrationWrapper, mitk::Surface, mitk::RegEvaluationObject, mitk::BaseDataTestImplementation, mitk::UnstructuredGrid, mitk::ImageStatisticsContainer, mitk::GeometryData, mitk::ExampleDataStructure, and mitk::CrosshairData.
|
virtual |
Set the TimeGeometry of the data, which will be referenced (not copied!).
|
override |
Update the information for this BaseData (the geometry in particular) so that it can be used as an output of a BaseProcess.
This method is used in the pipeline mechanism to propagate information and initialize the meta data associated with a BaseData. Any implementation of this method in a derived class is assumed to call its source's BaseProcess::UpdateOutputInformation() which determines modified times, LargestPossibleRegions, and any extra meta data like spacing, origin, etc. Default implementation simply call's it's source's UpdateOutputInformation().
|
overridepure virtual |
Verify that the RequestedRegion is within the LargestPossibleRegion.
If the RequestedRegion is not within the LargestPossibleRegion, then the filter cannot possibly satisfy the request. This method returns true if the request can be satisfied (even if it will be necessary to process the entire LargestPossibleRegion) and returns false otherwise. This method is used by PropagateRequestedRegion(). PropagateRequestedRegion() throws a InvalidRequestedRegionError exception if the requested region is not within the LargestPossibleRegion.
Implemented in mitk::ContourModel, mitk::AbstractGlobalImageFeature, mitk::PointSet, mitk::PlanarFigure, mitk::ROI, mitk::AbstractClassifier, mitk::Contour, mitk::SegmentationTaskList, mitk::SlicedData, mitk::ContourModelSet, mitk::VtkWidgetRendering, mitk::ContourSet, mitk::PlaneGeometryData, mitk::IntensityQuantifier, mitk::MAPRegistrationWrapper, mitk::RegEvaluationObject, mitk::Surface, mitk::BoundingObjectGroup, mitk::UnstructuredGrid, mitk::ImageStatisticsContainer, mitk::BaseDataTestImplementation, mitk::GeometryData, mitk::ExampleDataStructure, and mitk::CrosshairData.
|
protected |
Definition at line 375 of file mitkBaseData.h.
|
protected |
Definition at line 371 of file mitkBaseData.h.
|
mutableprotected |
Definition at line 373 of file mitkBaseData.h.