Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkSlicesInterpolator Class Reference

GUI for slices interpolation. More...

#include <QmitkSlicesInterpolator.h>

Inheritance diagram for QmitkSlicesInterpolator:
Collaboration diagram for QmitkSlicesInterpolator:

Public Slots

virtual void setEnabled (bool)
 
void EnableInterpolation (bool)
 
void Enable3DInterpolation (bool)
 Enables or disables 3D surface interpolation. More...
 
void FinishInterpolation (mitk::SliceNavigationController *slicer=nullptr)
 

Signals

void SignalRememberContourPositions (bool)
 
void SignalShowMarkerNodes (bool)
 

Public Member Functions

 QmitkSlicesInterpolator (QWidget *parent=nullptr, const char *name=nullptr)
 
void Initialize (mitk::ToolManager *toolManager, const QList< QmitkRenderWindow * > &windows)
 
void Uninitialize ()
 Releases resources and disconnects from the tool manager and render windows. More...
 
 ~QmitkSlicesInterpolator () override
 
void SetDataStorage (mitk::DataStorage::Pointer storage)
 Sets the data storage used for interpolation feedback nodes. More...
 
mitk::DataStorage * GetDataStorage ()
 Returns the current data storage. More...
 
void SetActiveLabelValue (mitk::MultiLabelSegmentation::LabelValueType labelValue)
 Sets the active label value for which interpolation is performed. More...
 
void OnToolManagerWorkingDataModified ()
 
void OnToolManagerReferenceDataModified ()
 
void OnTimeChanged (itk::Object *sender, const itk::EventObject &)
 Reacts to the time changed event. Public for itk::Command callbacks. More...
 
void OnSliceChanged (itk::Object *sender, const itk::EventObject &)
 Reacts to the slice changed event. Public for itk::Command callbacks. More...
 
void OnSliceNavigationControllerDeleted (const itk::Object *sender, const itk::EventObject &)
 Handles deletion of a SliceNavigationController. Public for itk::Command callbacks. More...
 
void OnInterpolationInfoChanged (const itk::EventObject &)
 
void OnInterpolationAborted (const itk::EventObject &)
 
void OnSurfaceInterpolationInfoChanged (const itk::EventObject &)
 

Protected Types

typedef std::map< QAction *, mitk::SliceNavigationController * > ActionToSliceDimensionMapType
 

Protected Slots

void OnAcceptInterpolationClicked ()
 
void OnAcceptAllInterpolationsClicked ()
 
void OnAccept3DInterpolationClicked ()
 
void OnReinit3DInterpolation ()
 Reinitializes 3D interpolation by re-reading the plane geometries of the segmentation image. More...
 
void OnAcceptAllPopupActivated (QAction *action)
 
void OnInterpolationActivated (bool)
 
void On3DInterpolationActivated (bool)
 Called when 3D interpolation is activated or deactivated. More...
 
void OnInterpolationMethodChanged (int index)
 Called when the interpolation method combo box selection changes. More...
 
void On2DInterpolationEnabled (bool)
 Called when the 2D interpolation radio button is toggled. More...
 
void On3DInterpolationEnabled (bool)
 Called when the 3D interpolation radio button is toggled. More...
 
void OnInterpolationDisabled (bool)
 Called when the "no interpolation" radio button is toggled. More...
 
void OnShowMarkers (bool)
 Called when the "show position markers" checkbox is toggled. More...
 
void Run3DInterpolation ()
 Triggers 3D surface interpolation in a background thread. More...
 
void OnSurfaceInterpolationFinished ()
 Called when the surface interpolation thread completes. More...
 
void StartUpdateInterpolationTimer ()
 Starts the timer that periodically triggers interpolation updates. More...
 
void StopUpdateInterpolationTimer ()
 Stops the interpolation update timer. More...
 
void ChangeSurfaceColor ()
 Updates the surface color to match the active label color. More...
 

Protected Member Functions

const ActionToSliceDimensionMapType CreateActionToSlicer (const QList< QmitkRenderWindow * > &windows)
 
void AcceptAllInterpolations (mitk::SliceNavigationController *slicer)
 
void AcceptAllInterpolationsWithErrorHandling (mitk::SliceNavigationController *slicer)
 
bool TranslateAndInterpolateChangedSlice (const itk::EventObject &e, mitk::SliceNavigationController *sliceNavigationController)
 
bool TranslateAndInterpolateChangedSlice (const mitk::TimeGeometry *timeGeometry)
 
void Interpolate (mitk::PlaneGeometry *plane)
 
void UpdateVisibleSuggestion ()
 
void SetCurrentContourListID ()
 

Protected Attributes

ActionToSliceDimensionMapType m_ActionToSlicerMap
 

Detailed Description

GUI for slices interpolation.

See also
QmitkInteractiveSegmentation
mitk::SegmentationInterpolation

While mitk::SegmentationInterpolation does the bookkeeping of interpolation (keeping track of which slices contain how much segmentation) and the algorithmic work, QmitkSlicesInterpolator is responsible to watch the GUI, to notice, which slice is currently visible. It triggers generation of interpolation suggestions and also triggers acception of suggestions.

Definition at line 65 of file QmitkSlicesInterpolator.h.

Member Typedef Documentation

◆ ActionToSliceDimensionMapType

Constructor & Destructor Documentation

◆ QmitkSlicesInterpolator()

QmitkSlicesInterpolator::QmitkSlicesInterpolator ( QWidget *  parent = nullptr,
const char *  name = nullptr 
)

◆ ~QmitkSlicesInterpolator()

QmitkSlicesInterpolator::~QmitkSlicesInterpolator ( )
override

Member Function Documentation

◆ AcceptAllInterpolations()

void QmitkSlicesInterpolator::AcceptAllInterpolations ( mitk::SliceNavigationController *  slicer)
protected

◆ AcceptAllInterpolationsWithErrorHandling()

void QmitkSlicesInterpolator::AcceptAllInterpolationsWithErrorHandling ( mitk::SliceNavigationController *  slicer)
protected

Calls AcceptAllInterpolations and reports a failure to the user in an error dialog instead of letting the exception escape into the Qt event loop.

◆ ChangeSurfaceColor

void QmitkSlicesInterpolator::ChangeSurfaceColor ( )
protectedslot

Updates the surface color to match the active label color.

◆ CreateActionToSlicer()

const ActionToSliceDimensionMapType QmitkSlicesInterpolator::CreateActionToSlicer ( const QList< QmitkRenderWindow * > &  windows)
protected

◆ Enable3DInterpolation

void QmitkSlicesInterpolator::Enable3DInterpolation ( bool  )
slot

Enables or disables 3D surface interpolation.

◆ EnableInterpolation

void QmitkSlicesInterpolator::EnableInterpolation ( bool  )
slot

Call this from the outside to enable/disable interpolation

◆ FinishInterpolation

void QmitkSlicesInterpolator::FinishInterpolation ( mitk::SliceNavigationController *  slicer = nullptr)
slot

Call this from the outside to accept all interpolations

◆ GetDataStorage()

mitk::DataStorage* QmitkSlicesInterpolator::GetDataStorage ( )

Returns the current data storage.

◆ Initialize()

void QmitkSlicesInterpolator::Initialize ( mitk::ToolManager *  toolManager,
const QList< QmitkRenderWindow * > &  windows 
)

To be called once before real use.

◆ Interpolate()

void QmitkSlicesInterpolator::Interpolate ( mitk::PlaneGeometry *  plane)
protected

Given a PlaneGeometry, this method figures out which slice of the first working image (of the associated ToolManager) should be interpolated. The actual work is then done by our SegmentationInterpolation object.

◆ On2DInterpolationEnabled

void QmitkSlicesInterpolator::On2DInterpolationEnabled ( bool  )
protectedslot

Called when the 2D interpolation radio button is toggled.

◆ On3DInterpolationActivated

void QmitkSlicesInterpolator::On3DInterpolationActivated ( bool  )
protectedslot

Called when 3D interpolation is activated or deactivated.

◆ On3DInterpolationEnabled

void QmitkSlicesInterpolator::On3DInterpolationEnabled ( bool  )
protectedslot

Called when the 3D interpolation radio button is toggled.

◆ OnAccept3DInterpolationClicked

void QmitkSlicesInterpolator::OnAccept3DInterpolationClicked ( )
protectedslot

◆ OnAcceptAllInterpolationsClicked

void QmitkSlicesInterpolator::OnAcceptAllInterpolationsClicked ( )
protectedslot

◆ OnAcceptAllPopupActivated

void QmitkSlicesInterpolator::OnAcceptAllPopupActivated ( QAction *  action)
protectedslot

◆ OnAcceptInterpolationClicked

void QmitkSlicesInterpolator::OnAcceptInterpolationClicked ( )
protectedslot

Reaction to button clicks.

◆ OnInterpolationAborted()

void QmitkSlicesInterpolator::OnInterpolationAborted ( const itk::EventObject &  )

Just public because it is called by itk::Commands. You should not need to call this.

◆ OnInterpolationActivated

void QmitkSlicesInterpolator::OnInterpolationActivated ( bool  )
protectedslot

Called on activation/deactivation

◆ OnInterpolationDisabled

void QmitkSlicesInterpolator::OnInterpolationDisabled ( bool  )
protectedslot

Called when the "no interpolation" radio button is toggled.

◆ OnInterpolationInfoChanged()

void QmitkSlicesInterpolator::OnInterpolationInfoChanged ( const itk::EventObject &  )

Just public because it is called by itk::Commands. You should not need to call this.

◆ OnInterpolationMethodChanged

void QmitkSlicesInterpolator::OnInterpolationMethodChanged ( int  index)
protectedslot

Called when the interpolation method combo box selection changes.

◆ OnReinit3DInterpolation

void QmitkSlicesInterpolator::OnReinit3DInterpolation ( )
protectedslot

Reinitializes 3D interpolation by re-reading the plane geometries of the segmentation image.

◆ OnShowMarkers

void QmitkSlicesInterpolator::OnShowMarkers ( bool  )
protectedslot

Called when the "show position markers" checkbox is toggled.

◆ OnSliceChanged()

void QmitkSlicesInterpolator::OnSliceChanged ( itk::Object *  sender,
const itk::EventObject &   
)

Reacts to the slice changed event. Public for itk::Command callbacks.

◆ OnSliceNavigationControllerDeleted()

void QmitkSlicesInterpolator::OnSliceNavigationControllerDeleted ( const itk::Object *  sender,
const itk::EventObject &   
)

Handles deletion of a SliceNavigationController. Public for itk::Command callbacks.

◆ OnSurfaceInterpolationFinished

void QmitkSlicesInterpolator::OnSurfaceInterpolationFinished ( )
protectedslot

Called when the surface interpolation thread completes.

Retrieves the interpolated surface data, renders it in the active color label, and stores the surface information in the feedback node.

◆ OnSurfaceInterpolationInfoChanged()

void QmitkSlicesInterpolator::OnSurfaceInterpolationInfoChanged ( const itk::EventObject &  )

Just public because it is called by itk::Commands. You should not need to call this.

◆ OnTimeChanged()

void QmitkSlicesInterpolator::OnTimeChanged ( itk::Object *  sender,
const itk::EventObject &   
)

Reacts to the time changed event. Public for itk::Command callbacks.

◆ OnToolManagerReferenceDataModified()

void QmitkSlicesInterpolator::OnToolManagerReferenceDataModified ( )

Just public because it is called by itk::Commands. You should not need to call this.

◆ OnToolManagerWorkingDataModified()

void QmitkSlicesInterpolator::OnToolManagerWorkingDataModified ( )

Just public because it is called by itk::Commands. You should not need to call this.

◆ Run3DInterpolation

void QmitkSlicesInterpolator::Run3DInterpolation ( )
protectedslot

Triggers 3D surface interpolation in a background thread.

◆ SetActiveLabelValue()

void QmitkSlicesInterpolator::SetActiveLabelValue ( mitk::MultiLabelSegmentation::LabelValueType  labelValue)

Sets the active label value for which interpolation is performed.

◆ SetCurrentContourListID()

void QmitkSlicesInterpolator::SetCurrentContourListID ( )
protected

◆ SetDataStorage()

void QmitkSlicesInterpolator::SetDataStorage ( mitk::DataStorage::Pointer  storage)

Sets the data storage used for interpolation feedback nodes.

◆ setEnabled

virtual void QmitkSlicesInterpolator::setEnabled ( bool  )
virtualslot

◆ SignalRememberContourPositions

void QmitkSlicesInterpolator::SignalRememberContourPositions ( bool  )
signal

◆ SignalShowMarkerNodes

void QmitkSlicesInterpolator::SignalShowMarkerNodes ( bool  )
signal

◆ StartUpdateInterpolationTimer

void QmitkSlicesInterpolator::StartUpdateInterpolationTimer ( )
protectedslot

Starts the timer that periodically triggers interpolation updates.

◆ StopUpdateInterpolationTimer

void QmitkSlicesInterpolator::StopUpdateInterpolationTimer ( )
protectedslot

Stops the interpolation update timer.

◆ TranslateAndInterpolateChangedSlice() [1/2]

bool QmitkSlicesInterpolator::TranslateAndInterpolateChangedSlice ( const itk::EventObject &  e,
mitk::SliceNavigationController *  sliceNavigationController 
)
protected

Retrieves the currently selected PlaneGeometry from a SlicedGeometry3D that is generated by a SliceNavigationController and calls Interpolate to further process this PlaneGeometry into an interpolation.

Parameters
eis a actually a mitk::SliceNavigationController::GeometrySliceEvent, sent by a SliceNavigationController
sliceNavigationControllerthe SliceNavigationController

◆ TranslateAndInterpolateChangedSlice() [2/2]

bool QmitkSlicesInterpolator::TranslateAndInterpolateChangedSlice ( const mitk::TimeGeometry *  timeGeometry)
protected

◆ Uninitialize()

void QmitkSlicesInterpolator::Uninitialize ( )

Releases resources and disconnects from the tool manager and render windows.

◆ UpdateVisibleSuggestion()

void QmitkSlicesInterpolator::UpdateVisibleSuggestion ( )
protected

Called internally to update the interpolation suggestion. Finds out about the focused render window and requests an interpolation.

Member Data Documentation

◆ m_ActionToSlicerMap

ActionToSliceDimensionMapType QmitkSlicesInterpolator::m_ActionToSlicerMap
protected

Definition at line 225 of file QmitkSlicesInterpolator.h.


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