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

An Operation for applying an edited 2D slice to a group of a MultiLabelSegmentation. More...

#include <mitkSegSliceOperation.h>

Inheritance diagram for mitk::SegSliceOperation:
Collaboration diagram for mitk::SegSliceOperation:

Public Member Functions

 mitkClassMacro (SegSliceOperation, SegChangeOperationBase)
 
 SegSliceOperation (MultiLabelSegmentation *segmentation, MultiLabelSegmentation::GroupIndexType groupID, const Image *slice, const TimeStepType timestep, const PlaneGeometry *planeGeometry)
 Construct a slice operation. More...
 
 ~SegSliceOperation () override=default
 
bool IsValid () const override
 Check if it is a valid operation. More...
 
Image::Pointer GetSlice () const
 Get the slice that is applied in the operation. More...
 
TimeStepType GetTimeStep () const
 Get the time step the operation should be applied on. More...
 
const PlaneGeometry * GetSlicePlaneGeometry () const
 Get the plane where the slice has to be applied in the volume. More...
 
MultiLabelSegmentation::GroupIndexType GetGroupID () const
 Get the group index of the group image that should be modified. More...
 
- 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...
 

Protected Attributes

MultiLabelSegmentation::GroupIndexType m_GroupID
 
TimeStepType m_TimeStep
 
CompressedImageContainer m_CompressedImageContainer
 
PlaneGeometry::ConstPointer m_PlaneGeometry
 
mitk::BaseGeometry::ConstPointer m_GuardReferenceGeometry
 
- 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 applying an edited 2D slice to a group of a MultiLabelSegmentation.

See also
SegChangeOperationApplier

This Operation stores a 2D slice together with its plane geometry, time step, and target group index, enabling undo-redo for slice-based segmentation edits.

Definition at line 31 of file mitkSegSliceOperation.h.

Constructor & Destructor Documentation

◆ SegSliceOperation()

mitk::SegSliceOperation::SegSliceOperation ( MultiLabelSegmentation *  segmentation,
MultiLabelSegmentation::GroupIndexType  groupID,
const Image *  slice,
const TimeStepType  timestep,
const PlaneGeometry *  planeGeometry 
)

Construct a slice operation.

Parameters
segmentationThe target segmentation.
groupIDThe group index of the group image to modify.
sliceThe 2D slice image to apply.
timestepThe time step at which the slice should be applied.
planeGeometryThe plane geometry defining the slice position and orientation in the volume.

◆ ~SegSliceOperation()

mitk::SegSliceOperation::~SegSliceOperation ( )
overridedefault

Member Function Documentation

◆ GetGroupID()

MultiLabelSegmentation::GroupIndexType mitk::SegSliceOperation::GetGroupID ( ) const

Get the group index of the group image that should be modified.

◆ GetSlice()

Image::Pointer mitk::SegSliceOperation::GetSlice ( ) const

Get the slice that is applied in the operation.

◆ GetSlicePlaneGeometry()

const PlaneGeometry* mitk::SegSliceOperation::GetSlicePlaneGeometry ( ) const

Get the plane where the slice has to be applied in the volume.

◆ GetTimeStep()

TimeStepType mitk::SegSliceOperation::GetTimeStep ( ) const

Get the time step the operation should be applied on.

◆ IsValid()

bool mitk::SegSliceOperation::IsValid ( ) const
override

Check if it is a valid operation.

◆ mitkClassMacro()

mitk::SegSliceOperation::mitkClassMacro ( SegSliceOperation  ,
SegChangeOperationBase   
)

Member Data Documentation

◆ m_CompressedImageContainer

CompressedImageContainer mitk::SegSliceOperation::m_CompressedImageContainer
protected

Definition at line 65 of file mitkSegSliceOperation.h.

◆ m_GroupID

MultiLabelSegmentation::GroupIndexType mitk::SegSliceOperation::m_GroupID
protected

Definition at line 63 of file mitkSegSliceOperation.h.

◆ m_GuardReferenceGeometry

mitk::BaseGeometry::ConstPointer mitk::SegSliceOperation::m_GuardReferenceGeometry
protected

Ensures that the reference geometry of the plane geometry is not deleted to soon see bug T12338.

Definition at line 69 of file mitkSegSliceOperation.h.

◆ m_PlaneGeometry

PlaneGeometry::ConstPointer mitk::SegSliceOperation::m_PlaneGeometry
protected

Definition at line 66 of file mitkSegSliceOperation.h.

◆ m_TimeStep

TimeStepType mitk::SegSliceOperation::m_TimeStep
protected

Definition at line 64 of file mitkSegSliceOperation.h.


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