13 #ifndef QmitkSlicesInterpolator_h
14 #define QmitkSlicesInterpolator_h
34 #include <QRadioButton>
37 #include "vtkProperty.h"
41 #include <QFutureWatcher>
43 #include <QtConcurrentRun>
48 class SliceNavigationController;
90 void Initialize(
mitk::ToolManager *toolManager,
const QList<QmitkRenderWindow*>& windows);
118 void OnToolManagerWorkingDataModified();
123 void OnToolManagerReferenceDataModified();
130 void OnTimeChanged(itk::Object *sender,
const itk::EventObject &);
137 void OnSliceChanged(itk::Object *sender,
const itk::EventObject &);
140 void OnSliceNavigationControllerDeleted(
const itk::Object *sender,
const itk::EventObject &);
145 void OnInterpolationInfoChanged(
const itk::EventObject &);
150 void OnInterpolationAborted(
const itk::EventObject &);
155 void OnSurfaceInterpolationInfoChanged(
const itk::EventObject &);
162 void Show3DInterpolationResult(
bool);
174 void OnLayerChanged();
186 void OnModifyLabelChanged(
const itk::Object *caller,
187 const itk::EventObject & );
194 void OnAddLabelSetConnection();
202 void OnAddLabelSetConnection(
unsigned int layerID);
208 void OnRemoveLabelSetConnection();
216 void MergeContours(
unsigned int timeStep,
unsigned int layerID);
223 void PrepareInputsFor3DInterpolation();
227 void SignalRememberContourPositions(
bool);
228 void SignalShowMarkerNodes(
bool);
232 virtual void setEnabled(
bool);
236 void EnableInterpolation(
bool);
238 void Enable3DInterpolation(
bool);
250 void OnAcceptInterpolationClicked();
255 void OnAcceptAllInterpolationsClicked();
260 void OnAccept3DInterpolationClicked();
267 void OnReinit3DInterpolation();
273 void OnAcceptAllPopupActivated(QAction *action);
278 void OnInterpolationActivated(
bool);
280 void On3DInterpolationActivated(
bool);
282 void OnInterpolationMethodChanged(
int index);
285 void On2DInterpolationEnabled(
bool);
286 void On3DInterpolationEnabled(
bool);
287 void OnInterpolationDisabled(
bool);
288 void OnShowMarkers(
bool);
290 void Run3DInterpolation();
298 void OnSurfaceInterpolationFinished();
300 void StartUpdateInterpolationTimer();
302 void StopUpdateInterpolationTimer();
304 void ChangeSurfaceColor();
316 const std::map<QAction *, mitk::SliceNavigationController *> createActionToSlicer(
const QList<QmitkRenderWindow*>& windows);
344 void UpdateVisibleSuggestion();
346 void SetCurrentContourListID();
350 void HideAllInterpolationControls();
351 void Show2DInterpolationControls(
bool show);
352 void Show3DInterpolationControls(
bool show);
353 void CheckSupportedImageDimension();
354 void WaitForFutures();
356 void ClearSegmentationObservers();
358 mitk::SegmentationInterpolationController::Pointer m_Interpolator;
359 mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;
364 mitk::ToolManager::Pointer m_ToolManager;
367 QHash<mitk::SliceNavigationController *, int> m_ControllerToTimeObserverTag;
368 QHash<mitk::SliceNavigationController *, int> m_ControllerToSliceObserverTag;
369 QHash<mitk::SliceNavigationController *, int> m_ControllerToDeleteObserverTag;
371 std::map<mitk::LabelSetImage *, unsigned long> m_SegmentationObserverTags;
373 unsigned int InterpolationInfoChangedObserverTag;
374 unsigned int SurfaceInterpolationInfoChangedObserverTag;
375 unsigned int InterpolationAbortedObserverTag;
377 QGroupBox *m_GroupBoxEnableExclusiveInterpolationMode;
378 QComboBox *m_CmbInterpolation;
379 QPushButton *m_BtnApply2D;
380 QPushButton *m_BtnApplyForAllSlices2D;
381 QPushButton *m_BtnApply3D;
386 QCheckBox *m_ChkShowPositionNodes;
387 QPushButton *m_BtnReinit3DInterpolation;
396 unsigned int m_LastSliceIndex;
398 QHash<mitk::SliceNavigationController *, mitk::TimePointType> m_TimePoints;
400 bool m_2DInterpolationEnabled;
401 bool m_3DInterpolationEnabled;
403 unsigned int m_numTimesLabelSetConnectionAdded;
407 QFuture<void> m_Future;
408 QFutureWatcher<void> m_Watcher;
410 QFuture<void> m_ModifyFuture;
411 QFutureWatcher<void> m_ModifyWatcher;
415 QFuture<void> m_PlaneFuture;
416 QFutureWatcher<void> m_PlaneWatcher;
421 unsigned int m_PreviousLayerIndex;
422 unsigned int m_CurrentLayerIndex;