13 #ifndef QmitkSlicesInterpolator_h
14 #define QmitkSlicesInterpolator_h
33 #include <QRadioButton>
36 #include "vtkProperty.h"
40 #include <QFutureWatcher>
42 #include <QtConcurrentRun>
47 class SliceNavigationController;
48 class TimeNavigationController;
79 void Initialize(
mitk::ToolManager *toolManager,
const QList<QmitkRenderWindow*>& windows);
108 void OnToolManagerWorkingDataModified();
113 void OnToolManagerReferenceDataModified();
120 void OnTimeChanged(itk::Object *sender,
const itk::EventObject &);
127 void OnSliceChanged(itk::Object *sender,
const itk::EventObject &);
130 void OnSliceNavigationControllerDeleted(
const itk::Object *sender,
const itk::EventObject &);
135 void OnInterpolationInfoChanged(
const itk::EventObject &);
140 void OnInterpolationAborted(
const itk::EventObject &);
145 void OnSurfaceInterpolationInfoChanged(
const itk::EventObject &);
152 void Show3DInterpolationResult(
bool);
162 void SignalRememberContourPositions(
bool);
163 void SignalShowMarkerNodes(
bool);
167 virtual void setEnabled(
bool);
171 void EnableInterpolation(
bool);
173 void Enable3DInterpolation(
bool);
185 void OnAcceptInterpolationClicked();
190 void OnAcceptAllInterpolationsClicked();
195 void OnAccept3DInterpolationClicked();
202 void OnReinit3DInterpolation();
208 void OnAcceptAllPopupActivated(QAction *action);
213 void OnInterpolationActivated(
bool);
215 void On3DInterpolationActivated(
bool);
217 void OnInterpolationMethodChanged(
int index);
220 void On2DInterpolationEnabled(
bool);
221 void On3DInterpolationEnabled(
bool);
222 void OnInterpolationDisabled(
bool);
223 void OnShowMarkers(
bool);
225 void Run3DInterpolation();
233 void OnSurfaceInterpolationFinished();
235 void StartUpdateInterpolationTimer();
237 void StopUpdateInterpolationTimer();
239 void ChangeSurfaceColor();
257 bool TranslateAndInterpolateChangedSlice(
const itk::EventObject &e,
272 void UpdateVisibleSuggestion();
274 void SetCurrentContourListID();
278 void HideAllInterpolationControls();
279 void Show2DInterpolationControls(
bool show);
280 void Show3DInterpolationControls(
bool show);
281 void CheckSupportedImageDimension();
282 void WaitForFutures();
285 mitk::SegmentationInterpolationController::Pointer m_Interpolator;
286 mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;
291 mitk::ToolManager::Pointer m_ToolManager;
294 unsigned int m_ControllerToTimeObserverTag;
295 QHash<mitk::SliceNavigationController *, int> m_ControllerToSliceObserverTag;
296 QHash<mitk::SliceNavigationController *, int> m_ControllerToDeleteObserverTag;
298 unsigned int InterpolationInfoChangedObserverTag;
299 unsigned int SurfaceInterpolationInfoChangedObserverTag;
300 unsigned int InterpolationAbortedObserverTag;
302 QGroupBox *m_GroupBoxEnableExclusiveInterpolationMode;
303 QComboBox *m_CmbInterpolation;
304 QPushButton *m_BtnApply2D;
305 QPushButton *m_BtnApplyForAllSlices2D;
306 QPushButton *m_BtnApply3D;
308 QCheckBox *m_ChkShowPositionNodes;
309 QPushButton *m_BtnReinit3DInterpolation;
317 unsigned int m_LastSliceIndex;
321 bool m_2DInterpolationEnabled;
322 bool m_3DInterpolationEnabled;
324 unsigned int m_numTimesLabelSetConnectionAdded;
328 QFuture<void> m_Future;
329 QFutureWatcher<void> m_Watcher;
331 QFuture<void> m_ModifyFuture;
332 QFutureWatcher<void> m_ModifyWatcher;
336 QFuture<void> m_PlaneFuture;
337 QFutureWatcher<void> m_PlaneWatcher;