13 #ifndef QmitkSlicesInterpolator_h
14 #define QmitkSlicesInterpolator_h
30 #include <QRadioButton>
33 #include <vtkProperty.h>
37 #include <QFutureWatcher>
39 #include <QtConcurrentRun>
44 class SliceNavigationController;
45 class TimeNavigationController;
129 void Show3DInterpolationResult(
bool);
264 void HideAllInterpolationControls();
265 void Show2DInterpolationControls(
bool show);
266 void Show3DInterpolationControls(
bool show);
267 void CheckSupportedImageDimension();
268 void WaitForFutures();
271 mitk::SegmentationInterpolationController::Pointer m_Interpolator;
272 mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;
274 mitk::ToolManager::Pointer m_ToolManager;
277 unsigned int m_ControllerToTimeObserverTag;
278 QHash<mitk::SliceNavigationController *, int> m_ControllerToSliceObserverTag;
279 QHash<mitk::SliceNavigationController *, int> m_ControllerToDeleteObserverTag;
281 unsigned int InterpolationInfoChangedObserverTag;
282 unsigned int SurfaceInterpolationInfoChangedObserverTag;
283 unsigned int InterpolationAbortedObserverTag;
285 QGroupBox *m_GroupBoxEnableExclusiveInterpolationMode;
286 QComboBox *m_CmbInterpolation;
287 QPushButton *m_BtnApply2D;
288 QPushButton *m_BtnApplyForAllSlices2D;
289 QPushButton *m_BtnApply3D;
291 QCheckBox *m_ChkShowPositionNodes;
292 QPushButton *m_BtnReinit3DInterpolation;
294 mitk::DataNode::Pointer m_FeedbackNode;
295 mitk::DataNode::Pointer m_InterpolatedSurfaceNode;
300 unsigned int m_LastSliceIndex;
304 bool m_2DInterpolationEnabled;
305 bool m_3DInterpolationEnabled;
307 unsigned int m_numTimesLabelSetConnectionAdded;
309 mitk::DataStorage::Pointer m_DataStorage;
311 QFuture<void> m_Future;
312 QFutureWatcher<void> m_Watcher;
314 QFuture<void> m_ModifyFuture;
315 QFutureWatcher<void> m_ModifyWatcher;
319 QFuture<void> m_PlaneFuture;
320 QFutureWatcher<void> m_PlaneWatcher;
#define MITKSEGMENTATIONUI_EXPORT
MITK implementation of the QVTKWidget.
GUI for slices interpolation.
void OnShowMarkers(bool)
Called when the "show position markers" checkbox is toggled.
void Uninitialize()
Releases resources and disconnects from the tool manager and render windows.
void OnAccept3DInterpolationClicked()
ActionToSliceDimensionMapType m_ActionToSlicerMap
void SetCurrentContourListID()
void Interpolate(mitk::PlaneGeometry *plane)
void StopUpdateInterpolationTimer()
Stops the interpolation update timer.
void SetDataStorage(mitk::DataStorage::Pointer storage)
Sets the data storage used for interpolation feedback nodes.
~QmitkSlicesInterpolator() override
void OnInterpolationMethodChanged(int index)
Called when the interpolation method combo box selection changes.
void OnReinit3DInterpolation()
Reinitializes 3D interpolation by re-reading the plane geometries of the segmentation image.
void EnableInterpolation(bool)
void ChangeSurfaceColor()
Updates the surface color to match the active label color.
void OnSliceChanged(itk::Object *sender, const itk::EventObject &)
Reacts to the slice changed event. Public for itk::Command callbacks.
bool TranslateAndInterpolateChangedSlice(const mitk::TimeGeometry *timeGeometry)
const ActionToSliceDimensionMapType CreateActionToSlicer(const QList< QmitkRenderWindow * > &windows)
void OnAcceptAllInterpolationsClicked()
void AcceptAllInterpolationsWithErrorHandling(mitk::SliceNavigationController *slicer)
mitk::DataStorage * GetDataStorage()
Returns the current data storage.
void Run3DInterpolation()
Triggers 3D surface interpolation in a background thread.
void FinishInterpolation(mitk::SliceNavigationController *slicer=nullptr)
void On3DInterpolationActivated(bool)
Called when 3D interpolation is activated or deactivated.
void UpdateVisibleSuggestion()
void On3DInterpolationEnabled(bool)
Called when the 3D interpolation radio button is toggled.
void OnInterpolationActivated(bool)
virtual void setEnabled(bool)
std::map< QAction *, mitk::SliceNavigationController * > ActionToSliceDimensionMapType
void OnSurfaceInterpolationFinished()
Called when the surface interpolation thread completes.
void OnInterpolationAborted(const itk::EventObject &)
void OnAcceptAllPopupActivated(QAction *action)
void SetActiveLabelValue(mitk::MultiLabelSegmentation::LabelValueType labelValue)
Sets the active label value for which interpolation is performed.
void OnToolManagerWorkingDataModified()
void OnSurfaceInterpolationInfoChanged(const itk::EventObject &)
void OnAcceptInterpolationClicked()
QmitkSlicesInterpolator(QWidget *parent=nullptr, const char *name=nullptr)
void Initialize(mitk::ToolManager *toolManager, const QList< QmitkRenderWindow * > &windows)
void SignalShowMarkerNodes(bool)
void SignalRememberContourPositions(bool)
void OnInterpolationDisabled(bool)
Called when the "no interpolation" radio button is toggled.
void OnTimeChanged(itk::Object *sender, const itk::EventObject &)
Reacts to the time changed event. Public for itk::Command callbacks.
void Enable3DInterpolation(bool)
Enables or disables 3D surface interpolation.
void On2DInterpolationEnabled(bool)
Called when the 2D interpolation radio button is toggled.
void OnInterpolationInfoChanged(const itk::EventObject &)
void StartUpdateInterpolationTimer()
Starts the timer that periodically triggers interpolation updates.
void OnToolManagerReferenceDataModified()
void OnSliceNavigationControllerDeleted(const itk::Object *sender, const itk::EventObject &)
Handles deletion of a SliceNavigationController. Public for itk::Command callbacks.
bool TranslateAndInterpolateChangedSlice(const itk::EventObject &e, mitk::SliceNavigationController *sliceNavigationController)
void AcceptAllInterpolations(mitk::SliceNavigationController *slicer)
Central node class of the MITK data tree, associating a data object with properties and mappers.
Abstract data management class that organizes DataNode objects in a directed acyclic graph.
unsigned short PixelType
Pixel type used for label values (unsigned short).
MultiLabelSegmentation class for handling labels and layers in a segmentation session.
mitk::Label::PixelType LabelValueType
Describes the geometry of a plane object.
Controls the selection of the slice the associated BaseRenderer will display.
Find image slices visible on a given plane.
mitk::ScalarType TimePointType
Type for time point values in milliseconds (ms).