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

An Operation for modifying the properties (e.g. name, color) of labels in a MultiLabelSegmentation. More...

#include <mitkSegLabelPropModifyOperation.h>

Inheritance diagram for mitk::SegLabelPropModifyOperation:
Collaboration diagram for mitk::SegLabelPropModifyOperation:

Public Types

using ModifyLabelsVectorType = MultiLabelSegmentation::ConstLabelVectorType
 

Public Member Functions

 mitkClassMacro (SegLabelPropModifyOperation, SegChangeOperationBase)
 
 SegLabelPropModifyOperation (MultiLabelSegmentation *segmentation, const ModifyLabelsVectorType &modifiedLabel)
 Construct a label property modify operation with the given label data. More...
 
 ~SegLabelPropModifyOperation () override=default
 
const ModifyLabelsVectorType & GetModifiedLabels () const
 Get the vector of modified labels stored in this operation. More...
 
 SegLabelPropModifyOperation (const SegLabelPropModifyOperation &)=delete
 
SegLabelPropModifyOperation & operator= (const SegLabelPropModifyOperation &)=delete
 
- Public Member Functions inherited from mitk::SegChangeOperationBase
 mitkClassMacro (SegChangeOperationBase, Operation)
 
 ~SegChangeOperationBase () override=default
 
bool IsValid () const override
 Check whether the operation is still valid (i.e., the segmentation still exists). More...
 
mitk::MultiLabelSegmentation::Pointer GetSegmentation ()
 Get the target segmentation (mutable). More...
 
const mitk::MultiLabelSegmentation::ConstPointer GetSegmentation () const
 Get the target segmentation (const). More...
 
- Public Member Functions inherited from mitk::Operation
 mitkClassMacroNoParent (Operation) virtual bool IsValid() const
 Check whether this operation is still valid and can be executed. More...
 
virtual ~Operation ()=default
 Virtual destructor. More...
 
OperationType GetOperationType ()
 Get the type identifier of this operation. More...
 

Static Public Member Functions

static SegLabelPropModifyOperation * CreatFromSegmentation (MultiLabelSegmentation *segmentation, const MultiLabelSegmentation::LabelValueVectorType &relevantLabels)
 Factory method that creates a label property modify operation from the current segmentation state. More...
 

Protected Attributes

ModifyLabelsVectorType m_ModifiedLabels
 
- Protected Attributes inherited from mitk::Operation
OperationType m_OperationType
 The type identifier for this operation. More...
 

Additional Inherited Members

- Protected Member Functions inherited from mitk::SegChangeOperationBase
 SegChangeOperationBase (mitk::MultiLabelSegmentation *segmentation, OperationType operationType)
 
 SegChangeOperationBase (SegChangeOperationBase &&)=default
 
SegChangeOperationBase & operator= (const SegChangeOperationBase &)=default
 
SegChangeOperationBase & operator= (SegChangeOperationBase &&)=default
 
- Protected Member Functions inherited from mitk::Operation
 Operation (OperationType operationType)
 Construct an operation with the given type. More...
 
 Operation (const Operation &)=default
 
 Operation (Operation &&)=default
 
Operation & operator= (const Operation &)=default
 
Operation & operator= (Operation &&)=default
 

Detailed Description

An Operation for modifying the properties (e.g. name, color) of labels in a MultiLabelSegmentation.

See also
SegChangeOperationApplier

This Operation can be used to realize undo-redo functionality for changing label properties. If you want to add/remove labels from a segmentation (with or without pixel data), use SegGroupModifyOperation instead.

Definition at line 32 of file mitkSegLabelPropModifyOperation.h.

Member Typedef Documentation

◆ ModifyLabelsVectorType

Constructor & Destructor Documentation

◆ SegLabelPropModifyOperation() [1/2]

mitk::SegLabelPropModifyOperation::SegLabelPropModifyOperation ( MultiLabelSegmentation *  segmentation,
const ModifyLabelsVectorType &  modifiedLabel 
)

Construct a label property modify operation with the given label data.

Parameters
segmentationThe target segmentation.
modifiedLabelThe vector of modified label objects containing new property values.

◆ ~SegLabelPropModifyOperation()

mitk::SegLabelPropModifyOperation::~SegLabelPropModifyOperation ( )
overridedefault

◆ SegLabelPropModifyOperation() [2/2]

mitk::SegLabelPropModifyOperation::SegLabelPropModifyOperation ( const SegLabelPropModifyOperation &  )
delete

Member Function Documentation

◆ CreatFromSegmentation()

static SegLabelPropModifyOperation* mitk::SegLabelPropModifyOperation::CreatFromSegmentation ( MultiLabelSegmentation *  segmentation,
const MultiLabelSegmentation::LabelValueVectorType &  relevantLabels 
)
static

Factory method that creates a label property modify operation from the current segmentation state.

Parameters
segmentationThe segmentation to capture label properties from.
relevantLabelsThe label values whose properties should be captured.

◆ GetModifiedLabels()

const ModifyLabelsVectorType& mitk::SegLabelPropModifyOperation::GetModifiedLabels ( ) const

Get the vector of modified labels stored in this operation.

◆ mitkClassMacro()

mitk::SegLabelPropModifyOperation::mitkClassMacro ( SegLabelPropModifyOperation  ,
SegChangeOperationBase   
)

◆ operator=()

SegLabelPropModifyOperation& mitk::SegLabelPropModifyOperation::operator= ( const SegLabelPropModifyOperation &  )
delete

Member Data Documentation

◆ m_ModifiedLabels

ModifyLabelsVectorType mitk::SegLabelPropModifyOperation::m_ModifiedLabels
protected

Definition at line 63 of file mitkSegLabelPropModifyOperation.h.


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