13 #ifndef mitkSegChangeOperationApplier_h
14 #define mitkSegChangeOperationApplier_h
84 bool noLabels =
false,
bool noGroupImages =
false,
bool noNames =
false);
127 const GroupIndexSetType& relevantGroupIDs,
bool noLabels =
false,
bool noGroupImages =
false);
167 const GroupIndexSetType& relevantGroupIDs,
bool noLabels =
false,
bool noGroupImages =
false);
#define MITKSEGMENTATION_EXPORT
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
std::vector< LabelValueType > LabelValueVectorType
abstract class, that can be used by Undo to undo an operation.
Base class for all operations in the undo/redo framework.
Executes all operations derived from SegChangeOperationBase.
mitkClassMacroNoParent(SegChangeOperationApplier) static SegChangeOperationApplier *GetInstance()
Return the singleton instance of the applier.
void ExecuteOperation(Operation *op) override
Execute a SegChangeOperationBase-derived operation on its target segmentation.
~SegChangeOperationApplier() override
SegChangeOperationApplier()
Base class for any operation based on a MultiLabelSegmentation instance.
RAII helper that captures state for undoing a group insert operation.
~SegGroupInsertUndoRedoHelper()
void RegisterUndoRedoOperationEvent(const std::string &description)
Capture the current (inserted) state as the redo operation and register the undo/redo pair.
GroupIndexSetType m_RelevantGroupIDs
SegGroupInsertUndoRedoHelper(MultiLabelSegmentation *segmentation, const GroupIndexSetType &relevantGroupIDs, bool noLabels=false, bool noGroupImages=false)
Prepare the undo operation (removal) for the groups that will be inserted.
std::set< MultiLabelSegmentation::GroupIndexType > GroupIndexSetType
SegChangeOperationBase * m_UndoOperation
MultiLabelSegmentation::Pointer m_Segmentation
RAII helper that captures the state of segmentation groups for undo/redo support.
SegChangeOperationBase * m_UndoOperation
GroupIndexSetType m_RelevantGroupIDs
~SegGroupModifyUndoRedoHelper()
SegGroupModifyUndoRedoHelper(MultiLabelSegmentation *segmentation, const GroupIndexSetType &relevantGroupIDs, bool coverAllTimeSteps, TimeStepType timeStep=0, bool noLabels=false, bool noGroupImages=false, bool noNames=false)
Capture the current state of the given groups as the undo operation.
std::set< MultiLabelSegmentation::GroupIndexType > GroupIndexSetType
MultiLabelSegmentation::Pointer m_Segmentation
void RegisterUndoRedoOperationEvent(const std::string &description)
Capture the current (modified) state as the redo operation and register the undo/redo pair.
RAII helper that captures state for undoing a group remove operation.
MultiLabelSegmentation::Pointer m_Segmentation
SegGroupRemoveUndoRedoHelper(MultiLabelSegmentation *segmentation, const GroupIndexSetType &relevantGroupIDs, bool noLabels=false, bool noGroupImages=false)
Capture the current state of the groups that will be removed (for undo).
std::set< MultiLabelSegmentation::GroupIndexType > GroupIndexSetType
SegChangeOperationBase * m_UndoOperation
void RegisterUndoRedoOperationEvent(const std::string &description)
Register the undo (insert) and redo (remove) operations on the undo stack.
~SegGroupRemoveUndoRedoHelper()
GroupIndexSetType m_RelevantGroupIDs
RAII helper that captures state for undoing label property modifications.
MultiLabelSegmentation::LabelValueVectorType m_RelevantLabels
~SegLabelPropModifyUndoRedoHelper()
SegLabelPropModifyUndoRedoHelper(MultiLabelSegmentation *segmentation, const MultiLabelSegmentation::LabelValueVectorType &relevantLabels)
Capture the current properties of the specified labels for undo.
void RegisterUndoRedoOperationEvent(const std::string &description)
Capture the modified label properties as the redo operation and register the pair.
MultiLabelSegmentation::Pointer m_Segmentation
SegChangeOperationBase * m_UndoOperation
Find image slices visible on a given plane.
std::size_t TimeStepType
Type for time step indices (non-negative integers starting from 0).