Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::BaseData Class Referenceabstract

Base class of all data objects. More...

#include <mitkBaseData.h>

Inheritance diagram for mitk::BaseData:
Collaboration diagram for mitk::BaseData:

Public Member Functions

 mitkClassMacroItkParent (BaseData, itk::DataObject)
 
BaseProperty::ConstPointer GetConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const override
 Get a const property by its key. More...
 
std::vector< std::string > GetPropertyKeys (const std::string &contextName="", bool includeDefaultContext=false) const override
 Get all property keys stored in the property list. More...
 
std::vector< std::string > GetPropertyContextNames () const override
 Get the names of all property contexts. More...
 
BaseProperty * GetNonConstProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) override
 Get a non-const property by its key. More...
 
void SetProperty (const std::string &propertyKey, BaseProperty *property, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Set a property in the property list. More...
 
void RemoveProperty (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=false) override
 Remove a property from the property list. 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 non-const pointer. More...
 
const mitk::TimeGeometry * GetUpdatedTimeGeometry ()
 Return the TimeGeometry of the data after ensuring it is up-to-date. More...
 
virtual void Expand (unsigned int timeSteps)
 Expand the TimeGeometry to a number of time steps. More...
 
const mitk::BaseGeometry * GetUpdatedGeometry (int t=0)
 Return the BaseGeometry of the data at time step t after ensuring it is up-to-date. More...
 
mitk::BaseGeometry * GetGeometry (int t=0) const
 Return the BaseGeometry of the data at time step t as a non-const pointer. More...
 
void UpdateOutputInformation () override
 Update the information for this BaseData 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. More...
 
virtual void Clear ()
 Reset the data object by calling ClearData() and InitializeEmpty(). More...
 
virtual bool IsEmptyTimeStep (unsigned int t) const
 Check whether the object contains data at the specified time step. More...
 
virtual bool IsEmpty () const
 Check whether the object contains data at any time step. 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
 Execute an operation on this data object. More...
 
virtual void SetGeometry (BaseGeometry *aGeometry3D)
 Set the BaseGeometry of the data, which will be referenced (not copied!). 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 the BaseGeometry of the data. More...
 
virtual void SetClonedTimeGeometry (const TimeGeometry *geometry)
 Set a clone of the provided TimeGeometry as the TimeGeometry of the data. More...
 
virtual void SetClonedGeometry (const BaseGeometry *aGeometry3D, unsigned int time)
 Set a clone of the provided geometry as the 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, replacing the existing one. More...
 
mitk::BaseProperty::Pointer GetProperty (const char *propertyKey) const
 Get a property by its key from the PropertyList. More...
 
void SetProperty (const char *propertyKey, BaseProperty *property)
 Set a property in the PropertyList. More...
 
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. More...
 
itk::ModifiedTimeType GetMTime () const override
 Get the modification time of this data object or its geometry, whichever was modified most recently. More...
 
void Graft (const DataObject *) override
 Graft data and information from another data object. More...
 
- Public Member Functions inherited from mitk::OperationActor
 itkTypeMacroNoParent (OperationActor) virtual ~OperationActor()
 
- Public Member Functions inherited from mitk::Identifiable
 Identifiable ()
 Default constructor. Generates a new random UID. More...
 
 Identifiable (const UIDType &uid)
 Construct with a pre-existing UID. More...
 
 Identifiable (const Identifiable &)=delete
 Copy construction is deleted to prevent UID duplication. More...
 
 Identifiable (Identifiable &&) noexcept
 Move constructor. Transfers ownership of the UID. More...
 
virtual ~Identifiable ()
 Virtual destructor. More...
 
Identifiable & operator= (const Identifiable &)=delete
 Copy assignment is deleted to prevent UID duplication. More...
 
Identifiable & operator= (Identifiable &&other) noexcept
 Move assignment operator. Transfers ownership of the UID. More...
 
virtual UIDType GetUID () const
 Get the unique identifier of this object. More...
 
UIDType GetRuntimeUID () const noexcept
 Get a runtime-unique ID for this object instance. More...
 
- Public Member Functions inherited from mitk::IPropertyOwner
 ~IPropertyOwner () override
 
virtual bool PropertyIsOwned (const std::string &propertyKey, const std::string &contextName="", bool fallBackOnDefaultContext=true) const
 Checks if a certain property exists. More...
 
- Public Member Functions inherited from mitk::IPropertyProvider
virtual ~IPropertyProvider ()
 Virtual destructor. More...
 

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
 

Additional Inherited Members

- Public Types inherited from mitk::Identifiable
using UIDType = std::string
 Type alias for unique identifiers. More...
 

Detailed Description

Base class of all data objects.

BaseData is the common base class for all MITK data objects such as images, surfaces, contours, and point sets. It inherits from itk::DataObject and can therefore be included in ITK-style processing pipelines.

It also inherits from OperationActor, enabling it to receive and execute Operation objects (e.g., for undo/redo support), from Identifiable, giving each data object a unique identifier (UID), and from IPropertyOwner, providing a key-value property list for arbitrary metadata storage.

Every BaseData carries a TimeGeometry that describes the spatial and temporal extent of the data. Sub-classes are expected to initialize this geometry appropriately and to implement the pure virtual pipeline region methods.

Remarks
Some derived classes may support the persistence of the Identifiable UID, but this is not a guaranteed feature and also depends on the format the data is stored in, as not all formats support storing of meta information. Please check the documentation of the IFileReader and IFileWriter classes to see if UID persistence is supported. MITK SceneIO supports UID persistence for all BaseData-derived classes.
See also
mitk::Image, mitk::Surface, mitk::PointSet, mitk::SlicedData
mitk::TimeGeometry, mitk::BaseGeometry
mitk::PropertyList, mitk::IPropertyOwner

Definition at line 58 of file mitkBaseData.h.

Constructor & Destructor Documentation

◆ BaseData() [1/2]

mitk::BaseData::BaseData ( )
protected

◆ BaseData() [2/2]

mitk::BaseData::BaseData ( const BaseData &  other)
protected

◆ ~BaseData()

mitk::BaseData::~BaseData ( )
overrideprotected

Member Function Documentation

◆ Clear()

virtual void mitk::BaseData::Clear ( )
virtual

Reset the data object by calling ClearData() and InitializeEmpty().

Warning
Only use in subclasses that have reimplemented ClearData() and InitializeEmpty(). Calling Clear() directly on BaseData will reset the object to a non-initialized, invalid state.
See also
ClearData, InitializeEmpty

Reimplemented in mitk::Image, mitk::ContourModelSet, and mitk::ContourModel.

◆ ClearData()

virtual void mitk::BaseData::ClearData ( )
protectedvirtual

reset to non-initialized state, release memory

Reimplemented in mitk::Surface, mitk::PointSet, and mitk::ContourModel.

◆ CopyInformation()

void mitk::BaseData::CopyInformation ( const itk::DataObject *  data)
override

Copy information from the specified data set.

This method is part of the pipeline execution model. By default, a BaseProcess will copy metadata from the first input to all of its outputs. See ProcessObject::GenerateOutputInformation(). Each subclass of DataObject is responsible for copying whatever metadata it needs from another DataObject. The default implementation copies the TimeGeometry and the PropertyList. If a subclass overrides this method, it should always call its superclass version.

Parameters
[in]dataThe data object from which to copy information. Must be castable to BaseData.
Exceptions
itk::ExceptionObjectif data cannot be cast to BaseData.

◆ ExecuteOperation()

void mitk::BaseData::ExecuteOperation ( Operation *  operation)
overridevirtual

Execute an operation on this data object.

Override this method if the data can be called by an Interactor (StateMachine). Empty by default. Subclasses should implement all necessary operations here, extracting needed information from the operation parameter.

Parameters
[in]operationThe operation to execute.
See also
OperationActor

Implements mitk::OperationActor.

Reimplemented in mitk::Surface, and mitk::PointSet.

◆ Expand()

virtual void mitk::BaseData::Expand ( unsigned int  timeSteps)
virtual

Expand the TimeGeometry to a number of time steps.

The method expands the TimeGeometry to the given number of time steps, filling newly created elements with empty geometries. Sub-classes should override this method to handle the elongation of their data vectors, too.

Note
Shrinking is neither possible nor intended. If timeSteps is less than or equal to the current number of time steps, no action is taken.
Parameters
[in]timeStepsThe desired number of time steps.
See also
TimeGeometry::Expand

Reimplemented in mitk::Surface, mitk::PointSet, mitk::Image, and mitk::ContourModel.

◆ GetConstProperty()

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

Get a const property by its key.

Parameters
[in]propertyKeyThe key identifying the property.
[in]contextNameThe context name for the property lookup. An empty string denotes the default context.
[in]fallBackOnDefaultContextIf true and the property is not found in the specified context, the default context is searched as well.
Returns
A const smart pointer to the property, or nullptr if not found.
See also
IPropertyProvider

Implements mitk::IPropertyProvider.

◆ GetGeometry()

mitk::BaseGeometry* mitk::BaseData::GetGeometry ( int  t = 0) const
inline

Return the BaseGeometry of the data at time step t as a non-const pointer.

Warning
No update will be called. Use GetUpdatedGeometry() if you cannot be sure that the geometry is up-to-date.

Normally used in GenerateOutputInformation of subclasses of BaseProcess.

Parameters
[in]tThe time step for which to retrieve the geometry (default: 0).
Returns
Pointer to the BaseGeometry, or nullptr if the TimeGeometry is not set.
See also
GetUpdatedGeometry, GetTimeGeometry

Definition at line 224 of file mitkBaseData.h.

Referenced by mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates(), and mitk::ImagePixelWriteAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates().

◆ GetMTime()

itk::ModifiedTimeType mitk::BaseData::GetMTime ( ) const
override

Get the modification time of this data object or its geometry, whichever was modified most recently.

Returns
The most recent modification time.

◆ GetNonConstProperty()

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

Get a non-const property by its key.

Parameters
[in]propertyKeyThe key identifying the property.
[in]contextNameThe context name for the property lookup.
[in]fallBackOnDefaultContextIf true, the default context is used as fallback.
Returns
A raw pointer to the property, or nullptr if not found.
See also
IPropertyOwner

Implements mitk::IPropertyOwner.

◆ GetProperty()

mitk::BaseProperty::Pointer mitk::BaseData::GetProperty ( const char *  propertyKey) const

Get a property by its key from the PropertyList.

Parameters
[in]propertyKeyThe key of the property to look up.
Returns
Smart pointer to the property, or nullptr if no property with the given key exists.
See also
SetProperty, GetPropertyList

◆ GetPropertyContextNames()

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

Get the names of all property contexts.

BaseData has no sub-contexts by default, so this returns an empty vector.

Returns
An empty vector (no non-default contexts supported in the base class).
See also
IPropertyProvider

Implements mitk::IPropertyProvider.

◆ GetPropertyKeys()

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

Get all property keys stored in the property list.

Parameters
[in]contextNameThe property context to query. An empty string denotes the default context.
[in]includeDefaultContextIf true, keys from the default context are included even when a non-default context is queried.
Returns
A vector of property key strings.
See also
IPropertyProvider

Implements mitk::IPropertyProvider.

◆ GetPropertyList()

mitk::PropertyList::Pointer mitk::BaseData::GetPropertyList ( ) const

Get the data's property list.

Returns
Smart pointer to the PropertyList.
See also
SetPropertyList, GetProperty, SetProperty

Referenced by mitk::SceneReaderHelpers::ApplyProportionalTimeGeometryProperties().

◆ GetSource()

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.

Returns
A smart pointer to the source BaseDataSource, or nullptr if no source is set.
Note
A SmartPointer is returned (not a WeakPointer) because it is assumed the caller wants to hold a long-term reference to the source.

◆ GetTimeGeometry() [1/2]

mitk::TimeGeometry* mitk::BaseData::GetTimeGeometry ( )
inline

Return the TimeGeometry of the data as non-const pointer.

Warning
No update will be called. Use GetUpdatedTimeGeometry() if you cannot be sure that the geometry is up-to-date.

Normally used in GenerateOutputInformation of subclasses of BaseProcess.

Returns
Non-const pointer to the TimeGeometry.
See also
GetUpdatedTimeGeometry, GetGeometry

Definition at line 168 of file mitkBaseData.h.

◆ GetTimeGeometry() [2/2]

const mitk::TimeGeometry* mitk::BaseData::GetTimeGeometry ( ) const
inline

Return the TimeGeometry of the data as const pointer.

Warning
No update will be called. Use GetUpdatedTimeGeometry() if you cannot be sure that the geometry is up-to-date.

Normally used in GenerateOutputInformation of subclasses of BaseProcess.

Returns
Const pointer to the TimeGeometry, or nullptr if not set.
See also
GetUpdatedTimeGeometry, GetGeometry

Definition at line 152 of file mitkBaseData.h.

Referenced by mitk::SceneReaderHelpers::ApplyProportionalTimeGeometryProperties().

◆ GetTimeSteps()

unsigned int mitk::BaseData::GetTimeSteps ( ) const
inline

Get the number of time steps from the TimeGeometry.

As the base data does not have a data vector of its own, the number of time steps is defined by the TimeGeometry. Sub-classes may provide a more efficient implementation based on their data vector length.

Returns
The number of time steps.

Definition at line 510 of file mitkBaseData.h.

Referenced by mitk::ImagePixelReadAccessor< TPixel, VDimension >::GetPixelByWorldCoordinates().

◆ GetUpdatedGeometry()

const mitk::BaseGeometry* mitk::BaseData::GetUpdatedGeometry ( int  t = 0)

Return the BaseGeometry of the data at time step t after ensuring it is up-to-date.

Unlike GetGeometry(), this method sets the requested region to the largest possible region and calls UpdateOutputInformation() before returning the geometry, ensuring the geometry is current.

Parameters
[in]tThe time step for which to retrieve the geometry (default: 0).
Returns
Const pointer to the up-to-date BaseGeometry at the given time step, or nullptr if no geometry exists.
See also
GetGeometry, GetUpdatedTimeGeometry

◆ GetUpdatedTimeGeometry()

const mitk::TimeGeometry* mitk::BaseData::GetUpdatedTimeGeometry ( )

Return the TimeGeometry of the data after ensuring it is up-to-date.

Unlike GetTimeGeometry(), this method sets the requested region to the largest possible region and calls UpdateOutputInformation() before returning the TimeGeometry, ensuring the geometry is current.

Returns
Const pointer to the up-to-date TimeGeometry.
See also
GetTimeGeometry

◆ Graft()

void mitk::BaseData::Graft ( const DataObject *  )
override

Graft data and information from another data object.

Exceptions
itk::ExceptionObjectAlways throws in the base class. Subclasses must provide their own implementation.
See also
itk::ProcessObject::Graft

◆ InitializeEmpty()

virtual void mitk::BaseData::InitializeEmpty ( )
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::Surface, mitk::PointSet, mitk::ContourModelSet, and mitk::ContourModel.

Definition at line 548 of file mitkBaseData.h.

◆ InitializeTimeGeometry()

virtual void mitk::BaseData::InitializeTimeGeometry ( unsigned int  timeSteps = 1)
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.

◆ IsEmpty()

virtual bool mitk::BaseData::IsEmpty ( ) const
virtual

Check whether the object contains data at any time step.

Iterates over all time steps and returns true only if every time step is empty (or the object is not initialized).

Warning
Returns IsInitialized()==false by default for compatibility reasons. Override in sub-classes that support distinction between empty/non-empty state.
Returns
True if the data object is empty at all time steps.
See also
IsEmptyTimeStep

Reimplemented in mitk::MAPRegistrationWrapper, mitk::ContourModelSet, mitk::ContourModel, mitk::IntensityQuantifier, mitk::AbstractGlobalImageFeature, and mitk::AbstractClassifier.

◆ IsEmptyTimeStep()

virtual bool mitk::BaseData::IsEmptyTimeStep ( unsigned int  t) const
virtual

Check whether the object contains data at the specified time step.

For example, a set of points may be empty at a given time step.

Warning
Returns IsInitialized()==false by default for compatibility reasons. Override in sub-classes that support distinction between empty/non-empty state.
Parameters
[in]tThe time step to check.
Returns
True if the data is empty at time step t.

Reimplemented in mitk::MAPRegistrationWrapper, mitk::Surface, mitk::PointSet, and mitk::ContourModel.

◆ IsInitialized()

virtual bool mitk::BaseData::IsInitialized ( ) const
virtual

Check whether the data has been initialized.

A data object is considered initialized when at least the geometry and other header data have been set.

Warning
Set to true by default for compatibility reasons. Set m_Initialized=false in constructors of sub-classes that support distinction between initialized and uninitialized state.
Returns
True if the data object has been initialized.

◆ mitkClassMacroItkParent()

mitk::BaseData::mitkClassMacroItkParent ( BaseData  ,
itk::DataObject   
)

◆ PrintSelf()

void mitk::BaseData::PrintSelf ( std::ostream &  os,
itk::Indent  indent 
) const
overrideprotected

◆ RemoveProperty()

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

Remove a property from the property list.

Parameters
[in]propertyKeyThe key of the property to remove. Must not be empty.
[in]contextNameThe context name. An empty string denotes the default context.
[in]fallBackOnDefaultContextIf true, the property is removed from the default context when the specified context is unknown.
Exceptions
mitk::Exceptionif the property key is empty or if a non-default context is specified without fallback.
See also
IPropertyOwner

Implements mitk::IPropertyOwner.

◆ RequestedRegionIsOutsideOfTheBufferedRegion()

bool mitk::BaseData::RequestedRegionIsOutsideOfTheBufferedRegion ( )
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.

Returns
True if the requested region is outside the buffered region.

Implemented in mitk::SegmentationTaskList, mitk::ROI, mitk::PlanarFigure, mitk::RegEvaluationObject, mitk::MAPRegistrationWrapper, mitk::ImageStatisticsContainer, mitk::VtkWidgetRendering, mitk::Surface, mitk::SlicedData, mitk::PointSet, mitk::PlaneGeometryData, mitk::GeometryData, mitk::CrosshairData, mitk::BaseDataTestImplementation, mitk::ContourModelSet, mitk::ContourModel, mitk::IntensityQuantifier, mitk::AbstractGlobalImageFeature, mitk::AbstractClassifier, and mitk::ExampleDataStructure.

◆ SetClonedGeometry() [1/2]

virtual void mitk::BaseData::SetClonedGeometry ( const BaseGeometry *  aGeometry3D)
virtual

Set a clone of the provided geometry as the BaseGeometry of the data.

Assumes the data object has only 1 time step (i.e., is a 3D object) and creates a new TimeGeometry. If a TimeGeometry has already been set, it will be replaced.

Parameters
[in]aGeometry3DThe geometry to clone.
See also
SetGeometry

◆ SetClonedGeometry() [2/2]

virtual void mitk::BaseData::SetClonedGeometry ( const BaseGeometry *  aGeometry3D,
unsigned int  time 
)
virtual

Set a clone of the provided geometry as the BaseGeometry of a given time step.

Parameters
[in]aGeometry3DThe geometry to clone.
[in]timeThe time step at which to set the cloned geometry.
Precondition
The TimeGeometry must already be set.
See also
SetGeometry

◆ SetClonedTimeGeometry()

virtual void mitk::BaseData::SetClonedTimeGeometry ( const TimeGeometry *  geometry)
virtual

Set a clone of the provided TimeGeometry as the TimeGeometry of the data.

Parameters
[in]geometryThe TimeGeometry to clone.
See also
SetTimeGeometry

◆ SetGeometry()

virtual void mitk::BaseData::SetGeometry ( BaseGeometry *  aGeometry3D)
virtual

Set the BaseGeometry of the data, which will be referenced (not copied!).

Assumes the data object has only 1 time step (i.e., is a 3D object) and creates a new ProportionalTimeGeometry wrapping the given BaseGeometry. If a TimeGeometry has already been set, it will be replaced.

Warning
This method will normally be called internally by sub-classes of BaseData during initialization.
Parameters
[in]aGeometry3DThe geometry to reference. If nullptr, an empty TimeGeometry is created.
See also
SetClonedGeometry, SetTimeGeometry

Reimplemented in mitk::PlaneGeometryData, mitk::SlicedData, and mitk::Image.

◆ SetOrigin()

virtual void mitk::BaseData::SetOrigin ( const Point3D &  origin)
virtual

Convenience method for setting the origin of the BaseGeometry instances of all time steps.

Warning
Sub-geometries contained in the BaseGeometry will not be changed. For example, if the BaseGeometry is a SlicedGeometry3D, the origin will not be propagated to the contained slices. The sub-class SlicedData handles this for the case that the SlicedGeometry3D is evenly spaced.
Parameters
[in]originThe new origin in world coordinates.
See also
SlicedData::SetOrigin

Reimplemented in mitk::SlicedData.

◆ SetProperty() [1/2]

void mitk::BaseData::SetProperty ( const char *  propertyKey,
BaseProperty *  property 
)

Set a property in the PropertyList.

Parameters
[in]propertyKeyThe key under which to store the property.
[in]propertyThe property value to store.
See also
GetProperty, GetPropertyList

◆ SetProperty() [2/2]

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

Set a property in the property list.

Parameters
[in]propertyKeyThe key identifying the property. Must not be empty.
[in]propertyThe property to set.
[in]contextNameThe context name. An empty string denotes the default context.
[in]fallBackOnDefaultContextIf true, the property is stored in the default context when the specified context is unknown.
Exceptions
mitk::Exceptionif the property key is empty or if a non-default context is specified without fallback.
See also
IPropertyOwner

Implements mitk::IPropertyOwner.

◆ SetPropertyList()

void mitk::BaseData::SetPropertyList ( PropertyList *  propertyList)

Set the data's property list, replacing the existing one.

Parameters
[in]propertyListThe new property list.
See also
GetPropertyList

◆ SetRequestedRegion()

void mitk::BaseData::SetRequestedRegion ( const itk::DataObject *  data)
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.

Parameters
[in]dataThe data object whose requested region will be matched.

Implemented in mitk::ROI, mitk::PlanarFigure, mitk::RegEvaluationObject, mitk::Surface, mitk::SlicedData, mitk::PointSet, mitk::PlaneGeometryData, mitk::GeometryData, mitk::CrosshairData, mitk::ContourModel, mitk::SegmentationTaskList, mitk::MAPRegistrationWrapper, mitk::ImageStatisticsContainer, mitk::VtkWidgetRendering, mitk::BaseDataTestImplementation, mitk::ContourModelSet, mitk::IntensityQuantifier, mitk::AbstractGlobalImageFeature, mitk::AbstractClassifier, and mitk::ExampleDataStructure.

◆ SetRequestedRegionToLargestPossibleRegion()

void mitk::BaseData::SetRequestedRegionToLargestPossibleRegion ( )
overridepure virtual

◆ SetTimeGeometry()

virtual void mitk::BaseData::SetTimeGeometry ( TimeGeometry *  geometry)
virtual

Set the TimeGeometry of the data, which will be referenced (not copied!).

Warning
This method will normally be called internally by sub-classes of BaseData during initialization.
Parameters
[in]geometryThe TimeGeometry to reference.
See also
SetClonedTimeGeometry

◆ UpdateOutputInformation()

void mitk::BaseData::UpdateOutputInformation ( )
override

Update the information for this BaseData 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 metadata 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 metadata like spacing, origin, etc. The default implementation calls the source's UpdateOutputInformation() and then updates the TimeGeometry bounding box.

Note
Implementations in derived classes must ensure that the geometry is updated by calling GetTimeGeometry()->UpdateInformation() after calling its source's BaseProcess::UpdateOutputInformation().

◆ VerifyRequestedRegion()

bool mitk::BaseData::VerifyRequestedRegion ( )
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. Used by PropagateRequestedRegion(), which throws an InvalidRequestedRegionError exception if the requested region is not within the LargestPossibleRegion.

Returns
True if the requested region is within the largest possible region.

Implemented in mitk::SegmentationTaskList, mitk::ROI, mitk::PlanarFigure, mitk::RegEvaluationObject, mitk::MAPRegistrationWrapper, mitk::ImageStatisticsContainer, mitk::BoundingObjectGroup, mitk::VtkWidgetRendering, mitk::Surface, mitk::SlicedData, mitk::PointSet, mitk::PlaneGeometryData, mitk::GeometryData, mitk::CrosshairData, mitk::BaseDataTestImplementation, mitk::ContourModelSet, mitk::ContourModel, mitk::IntensityQuantifier, mitk::AbstractGlobalImageFeature, mitk::AbstractClassifier, and mitk::ExampleDataStructure.

Member Data Documentation

◆ m_Initialized

bool mitk::BaseData::m_Initialized
protected

Definition at line 555 of file mitkBaseData.h.

◆ m_LastRequestedRegionWasOutsideOfTheBufferedRegion

bool mitk::BaseData::m_LastRequestedRegionWasOutsideOfTheBufferedRegion
protected

Definition at line 551 of file mitkBaseData.h.

◆ m_SourceOutputIndexDuplicate

unsigned int mitk::BaseData::m_SourceOutputIndexDuplicate
mutableprotected

Definition at line 553 of file mitkBaseData.h.


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