Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::SegmentationTaskList Class Reference

A list of segmentation tasks. More...

#include <mitkSegmentationTaskList.h>

Inheritance diagram for mitk::SegmentationTaskList:
Collaboration diagram for mitk::SegmentationTaskList:

Classes

class  Task
 

Public Member Functions

 mitkClassMacro (SegmentationTaskList, BaseData) static Pointer New()
 
Pointer Clone () const
 
bool HasName (size_t index) const
 
std::string GetName (size_t index) const
 
void SetDefaultName (const std::string &value)
 
bool HasDescription (size_t index) const
 
std::string GetDescription (size_t index) const
 
void SetDefaultDescription (const std::string &value)
 
bool HasImage (size_t index) const
 
fs::path GetImage (size_t index) const
 
void SetDefaultImage (const fs::path &value)
 
bool HasSegmentation (size_t index) const
 
fs::path GetSegmentation (size_t index) const
 
void SetDefaultSegmentation (const fs::path &value)
 
bool HasLabelName (size_t index) const
 
std::string GetLabelName (size_t index) const
 
void SetDefaultLabelName (const std::string &value)
 
bool HasLabelNameSuggestions (size_t index) const
 
fs::path GetLabelNameSuggestions (size_t index) const
 
void SetDefaultLabelNameSuggestions (const fs::path &value)
 
bool HasPreset (size_t index) const
 
fs::path GetPreset (size_t index) const
 
void SetDefaultPreset (const fs::path &value)
 
bool HasResult (size_t index) const
 
fs::path GetResult (size_t index) const
 
void SetDefaultResult (const fs::path &value)
 
bool HasDynamic (size_t index) const
 
bool GetDynamic (size_t index) const
 
void SetDefaultDynamic (const bool &value)
 
bool HasForm (size_t index) const
 
Task::Form GetForm (size_t index) const
 
void SetDefaultForm (const Task::Form &value)
 
bool HasScene (size_t index) const
 
Task::Scene GetScene (size_t index) const
 
void SetDefaultScene (const Task::Scene &value)
 
size_t GetNumberOfTasks () const
 Returns the number of tasks in the list. More...
 
size_t AddTask (const Task &subtask)
 Adds a task to the list. More...
 
const Task * GetTask (size_t index) const
 Returns a const pointer to the task at the given index. More...
 
Task * GetTask (size_t index)
 Returns a mutable pointer to the task at the given index. More...
 
const Task & GetDefaults () const
 Returns the default task settings. More...
 
void SetDefaults (const Task &defaults)
 Sets the default task settings applied to tasks lacking explicit values. More...
 
bool IsDone () const
 Returns whether all tasks in the list are done. More...
 
bool IsDone (size_t index) const
 Returns whether the task at the given index is done. More...
 
fs::path GetInputLocation () const
 Returns the file path from which this task list was loaded. More...
 
fs::path GetBasePath () const
 Returns the base directory for resolving relative paths. More...
 
fs::path GetAbsolutePath (const fs::path &path) const
 Resolves a possibly relative path against the base path. More...
 
fs::path GetInterimPath (const fs::path &path) const
 Returns the interim (temporary) result path for the given path. More...
 
void SaveTask (size_t index, const BaseData *segmentation, bool saveAsInterimResult=false)
 Saves the segmentation result for the task at the given index. More...
 
std::vector< Task >::const_iterator begin () const
 Returns a const iterator to the first task. More...
 
std::vector< Task >::const_iterator end () const
 Returns a const iterator past the last task. More...
 
std::vector< Task >::iterator begin ()
 Returns an iterator to the first task. More...
 
std::vector< Task >::iterator end ()
 Returns an iterator past the last task. More...
 
void SetRequestedRegionToLargestPossibleRegion () override
 Set the RequestedRegion to the LargestPossibleRegion. More...
 
bool RequestedRegionIsOutsideOfTheBufferedRegion () override
 Determine whether the RequestedRegion is outside of the BufferedRegion. More...
 
bool VerifyRequestedRegion () override
 Verify that the RequestedRegion is within the LargestPossibleRegion. More...
 
void SetRequestedRegion (const itk::DataObject *) override
 Set the requested region from this data object to match the requested region of the data object passed in as a parameter. More...
 
- Public Member Functions inherited from mitk::BaseData
 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 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 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

 mitkCloneMacro (Self) SegmentationTaskList()
 
 SegmentationTaskList (const Self &other)
 
 ~SegmentationTaskList () override
 
- Protected Member Functions inherited from mitk::BaseData
 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)
 

Additional Inherited Members

- Public Types inherited from mitk::Identifiable
using UIDType = std::string
 Type alias for unique identifiers. More...
 
- Protected Attributes inherited from mitk::BaseData
bool m_LastRequestedRegionWasOutsideOfTheBufferedRegion
 
unsigned int m_SourceOutputIndexDuplicate
 
bool m_Initialized
 

Detailed Description

A list of segmentation tasks.

See MITK Segmentation Task Lists for more information.

Definition at line 30 of file mitkSegmentationTaskList.h.

Constructor & Destructor Documentation

◆ SegmentationTaskList()

mitk::SegmentationTaskList::SegmentationTaskList ( const Self &  other)
protected

◆ ~SegmentationTaskList()

mitk::SegmentationTaskList::~SegmentationTaskList ( )
overrideprotected

Member Function Documentation

◆ AddTask()

size_t mitk::SegmentationTaskList::AddTask ( const Task &  subtask)

Adds a task to the list.

Parameters
[in]subtaskThe task to add.
Returns
The index of the newly added task.

◆ begin() [1/2]

std::vector<Task>::iterator mitk::SegmentationTaskList::begin ( )

Returns an iterator to the first task.

◆ begin() [2/2]

std::vector<Task>::const_iterator mitk::SegmentationTaskList::begin ( ) const

Returns a const iterator to the first task.

◆ Clone()

Pointer mitk::SegmentationTaskList::Clone ( ) const

◆ end() [1/2]

std::vector<Task>::iterator mitk::SegmentationTaskList::end ( )

Returns an iterator past the last task.

◆ end() [2/2]

std::vector<Task>::const_iterator mitk::SegmentationTaskList::end ( ) const

Returns a const iterator past the last task.

◆ GetAbsolutePath()

fs::path mitk::SegmentationTaskList::GetAbsolutePath ( const fs::path &  path) const

Resolves a possibly relative path against the base path.

Parameters
[in]pathThe path to resolve.
Returns
The absolute path.

◆ GetBasePath()

fs::path mitk::SegmentationTaskList::GetBasePath ( ) const

Returns the base directory for resolving relative paths.

◆ GetDefaults()

const Task& mitk::SegmentationTaskList::GetDefaults ( ) const

Returns the default task settings.

◆ GetDescription()

std::string mitk::SegmentationTaskList::GetDescription ( size_t  index) const

◆ GetDynamic()

bool mitk::SegmentationTaskList::GetDynamic ( size_t  index) const

◆ GetForm()

Task::Form mitk::SegmentationTaskList::GetForm ( size_t  index) const

◆ GetImage()

fs::path mitk::SegmentationTaskList::GetImage ( size_t  index) const

◆ GetInputLocation()

fs::path mitk::SegmentationTaskList::GetInputLocation ( ) const

Returns the file path from which this task list was loaded.

◆ GetInterimPath()

fs::path mitk::SegmentationTaskList::GetInterimPath ( const fs::path &  path) const

Returns the interim (temporary) result path for the given path.

Parameters
[in]pathThe original result path.
Returns
The interim path.

◆ GetLabelName()

std::string mitk::SegmentationTaskList::GetLabelName ( size_t  index) const

◆ GetLabelNameSuggestions()

fs::path mitk::SegmentationTaskList::GetLabelNameSuggestions ( size_t  index) const

◆ GetName()

std::string mitk::SegmentationTaskList::GetName ( size_t  index) const

◆ GetNumberOfTasks()

size_t mitk::SegmentationTaskList::GetNumberOfTasks ( ) const

Returns the number of tasks in the list.

◆ GetPreset()

fs::path mitk::SegmentationTaskList::GetPreset ( size_t  index) const

◆ GetResult()

fs::path mitk::SegmentationTaskList::GetResult ( size_t  index) const

◆ GetScene()

Task::Scene mitk::SegmentationTaskList::GetScene ( size_t  index) const

◆ GetSegmentation()

fs::path mitk::SegmentationTaskList::GetSegmentation ( size_t  index) const

◆ GetTask() [1/2]

Task* mitk::SegmentationTaskList::GetTask ( size_t  index)

Returns a mutable pointer to the task at the given index.

Parameters
[in]indexThe task index.
Returns
Pointer to the task, or nullptr if index is out of range.

◆ GetTask() [2/2]

const Task* mitk::SegmentationTaskList::GetTask ( size_t  index) const

Returns a const pointer to the task at the given index.

Parameters
[in]indexThe task index.
Returns
Pointer to the task, or nullptr if index is out of range.

◆ HasDescription()

bool mitk::SegmentationTaskList::HasDescription ( size_t  index) const

◆ HasDynamic()

bool mitk::SegmentationTaskList::HasDynamic ( size_t  index) const

◆ HasForm()

bool mitk::SegmentationTaskList::HasForm ( size_t  index) const

◆ HasImage()

bool mitk::SegmentationTaskList::HasImage ( size_t  index) const

◆ HasLabelName()

bool mitk::SegmentationTaskList::HasLabelName ( size_t  index) const

◆ HasLabelNameSuggestions()

bool mitk::SegmentationTaskList::HasLabelNameSuggestions ( size_t  index) const

◆ HasName()

bool mitk::SegmentationTaskList::HasName ( size_t  index) const

◆ HasPreset()

bool mitk::SegmentationTaskList::HasPreset ( size_t  index) const

◆ HasResult()

bool mitk::SegmentationTaskList::HasResult ( size_t  index) const

◆ HasScene()

bool mitk::SegmentationTaskList::HasScene ( size_t  index) const

◆ HasSegmentation()

bool mitk::SegmentationTaskList::HasSegmentation ( size_t  index) const

◆ IsDone() [1/2]

bool mitk::SegmentationTaskList::IsDone ( ) const

Returns whether all tasks in the list are done.

◆ IsDone() [2/2]

bool mitk::SegmentationTaskList::IsDone ( size_t  index) const

Returns whether the task at the given index is done.

Parameters
[in]indexThe task index.

◆ mitkClassMacro()

mitk::SegmentationTaskList::mitkClassMacro ( SegmentationTaskList  ,
BaseData   
)

◆ mitkCloneMacro()

mitk::SegmentationTaskList::mitkCloneMacro ( Self  )
protected

◆ RequestedRegionIsOutsideOfTheBufferedRegion()

bool mitk::SegmentationTaskList::RequestedRegionIsOutsideOfTheBufferedRegion ( )
overridevirtual

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.

Implements mitk::BaseData.

◆ SaveTask()

void mitk::SegmentationTaskList::SaveTask ( size_t  index,
const BaseData *  segmentation,
bool  saveAsInterimResult = false 
)

Saves the segmentation result for the task at the given index.

Parameters
[in]indexThe task index.
[in]segmentationThe segmentation data to save.
[in]saveAsInterimResultIf true, saves to an interim location instead of the final result path.

◆ SetDefaultDescription()

void mitk::SegmentationTaskList::SetDefaultDescription ( const std::string &  value)

◆ SetDefaultDynamic()

void mitk::SegmentationTaskList::SetDefaultDynamic ( const bool &  value)

◆ SetDefaultForm()

void mitk::SegmentationTaskList::SetDefaultForm ( const Task::Form &  value)

◆ SetDefaultImage()

void mitk::SegmentationTaskList::SetDefaultImage ( const fs::path &  value)

◆ SetDefaultLabelName()

void mitk::SegmentationTaskList::SetDefaultLabelName ( const std::string &  value)

◆ SetDefaultLabelNameSuggestions()

void mitk::SegmentationTaskList::SetDefaultLabelNameSuggestions ( const fs::path &  value)

◆ SetDefaultName()

void mitk::SegmentationTaskList::SetDefaultName ( const std::string &  value)

◆ SetDefaultPreset()

void mitk::SegmentationTaskList::SetDefaultPreset ( const fs::path &  value)

◆ SetDefaultResult()

void mitk::SegmentationTaskList::SetDefaultResult ( const fs::path &  value)

◆ SetDefaults()

void mitk::SegmentationTaskList::SetDefaults ( const Task &  defaults)

Sets the default task settings applied to tasks lacking explicit values.

Parameters
[in]defaultsThe default settings.

◆ SetDefaultScene()

void mitk::SegmentationTaskList::SetDefaultScene ( const Task::Scene &  value)

◆ SetDefaultSegmentation()

void mitk::SegmentationTaskList::SetDefaultSegmentation ( const fs::path &  value)

◆ SetRequestedRegion()

void mitk::SegmentationTaskList::SetRequestedRegion ( const itk::DataObject *  data)
overridevirtual

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.

Implements mitk::BaseData.

◆ SetRequestedRegionToLargestPossibleRegion()

void mitk::SegmentationTaskList::SetRequestedRegionToLargestPossibleRegion ( )
overridevirtual

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().

Implements mitk::BaseData.

◆ VerifyRequestedRegion()

bool mitk::SegmentationTaskList::VerifyRequestedRegion ( )
overridevirtual

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.

Implements mitk::BaseData.


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