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

RAII helper that captures state for undoing label property modifications. More...

#include <mitkSegChangeOperationApplier.h>

Collaboration diagram for mitk::SegLabelPropModifyUndoRedoHelper:

Public Member Functions

 SegLabelPropModifyUndoRedoHelper (MultiLabelSegmentation *segmentation, const MultiLabelSegmentation::LabelValueVectorType &relevantLabels)
 Capture the current properties of the specified labels for undo. More...
 
 ~SegLabelPropModifyUndoRedoHelper ()
 
void RegisterUndoRedoOperationEvent (const std::string &description)
 Capture the modified label properties as the redo operation and register the pair. More...
 

Protected Attributes

MultiLabelSegmentation::Pointer m_Segmentation
 
MultiLabelSegmentation::LabelValueVectorType m_RelevantLabels
 
SegChangeOperationBase * m_UndoOperation
 

Detailed Description

RAII helper that captures state for undoing label property modifications.

On construction, the current label properties are captured as the undo operation. After the label properties are modified, call RegisterUndoRedoOperationEvent() to capture the new state and register both on the undo stack.

See also
SegLabelPropModifyOperation
SegChangeOperationApplier

Definition at line 193 of file mitkSegChangeOperationApplier.h.

Constructor & Destructor Documentation

◆ SegLabelPropModifyUndoRedoHelper()

mitk::SegLabelPropModifyUndoRedoHelper::SegLabelPropModifyUndoRedoHelper ( MultiLabelSegmentation *  segmentation,
const MultiLabelSegmentation::LabelValueVectorType &  relevantLabels 
)

Capture the current properties of the specified labels for undo.

Parameters
segmentationThe segmentation to operate on.
relevantLabelsThe label values whose properties will be modified.

◆ ~SegLabelPropModifyUndoRedoHelper()

mitk::SegLabelPropModifyUndoRedoHelper::~SegLabelPropModifyUndoRedoHelper ( )

Member Function Documentation

◆ RegisterUndoRedoOperationEvent()

void mitk::SegLabelPropModifyUndoRedoHelper::RegisterUndoRedoOperationEvent ( const std::string &  description)

Capture the modified label properties as the redo operation and register the pair.

Parameters
descriptionA human-readable description of the operation for the undo stack.

Member Data Documentation

◆ m_RelevantLabels

MultiLabelSegmentation::LabelValueVectorType mitk::SegLabelPropModifyUndoRedoHelper::m_RelevantLabels
protected

Definition at line 213 of file mitkSegChangeOperationApplier.h.

◆ m_Segmentation

MultiLabelSegmentation::Pointer mitk::SegLabelPropModifyUndoRedoHelper::m_Segmentation
protected

Definition at line 212 of file mitkSegChangeOperationApplier.h.

◆ m_UndoOperation

SegChangeOperationBase* mitk::SegLabelPropModifyUndoRedoHelper::m_UndoOperation
protected

Definition at line 216 of file mitkSegChangeOperationApplier.h.


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