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;
76 void Initialize(
mitk::ToolManager *toolManager,
const QList<QmitkRenderWindow*>& windows);
105 void OnToolManagerWorkingDataModified();
110 void OnToolManagerReferenceDataModified();
117 void OnTimeChanged(itk::Object *sender,
const itk::EventObject &);
124 void OnSliceChanged(itk::Object *sender,
const itk::EventObject &);
127 void OnSliceNavigationControllerDeleted(
const itk::Object *sender,
const itk::EventObject &);
132 void OnInterpolationInfoChanged(
const itk::EventObject &);
137 void OnInterpolationAborted(
const itk::EventObject &);
142 void OnSurfaceInterpolationInfoChanged(
const itk::EventObject &);
149 void Show3DInterpolationResult(
bool);
159 void SignalRememberContourPositions(
bool);
160 void SignalShowMarkerNodes(
bool);
164 virtual void setEnabled(
bool);
168 void EnableInterpolation(
bool);
170 void Enable3DInterpolation(
bool);
182 void OnAcceptInterpolationClicked();
187 void OnAcceptAllInterpolationsClicked();
192 void OnAccept3DInterpolationClicked();
199 void OnReinit3DInterpolation();
205 void OnAcceptAllPopupActivated(QAction *action);
210 void OnInterpolationActivated(
bool);
212 void On3DInterpolationActivated(
bool);
214 void OnInterpolationMethodChanged(
int index);
217 void On2DInterpolationEnabled(
bool);
218 void On3DInterpolationEnabled(
bool);
219 void OnInterpolationDisabled(
bool);
220 void OnShowMarkers(
bool);
222 void Run3DInterpolation();
230 void OnSurfaceInterpolationFinished();
232 void StartUpdateInterpolationTimer();
234 void StopUpdateInterpolationTimer();
236 void ChangeSurfaceColor();
254 bool TranslateAndInterpolateChangedSlice(
const itk::EventObject &e,
269 void UpdateVisibleSuggestion();
271 void SetCurrentContourListID();
275 void HideAllInterpolationControls();
276 void Show2DInterpolationControls(
bool show);
277 void Show3DInterpolationControls(
bool show);
278 void CheckSupportedImageDimension();
279 void WaitForFutures();
282 mitk::SegmentationInterpolationController::Pointer m_Interpolator;
283 mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;
285 mitk::ToolManager::Pointer m_ToolManager;
288 unsigned int m_ControllerToTimeObserverTag;
289 QHash<mitk::SliceNavigationController *, int> m_ControllerToSliceObserverTag;
290 QHash<mitk::SliceNavigationController *, int> m_ControllerToDeleteObserverTag;
292 unsigned int InterpolationInfoChangedObserverTag;
293 unsigned int SurfaceInterpolationInfoChangedObserverTag;
294 unsigned int InterpolationAbortedObserverTag;
296 QGroupBox *m_GroupBoxEnableExclusiveInterpolationMode;
297 QComboBox *m_CmbInterpolation;
298 QPushButton *m_BtnApply2D;
299 QPushButton *m_BtnApplyForAllSlices2D;
300 QPushButton *m_BtnApply3D;
302 QCheckBox *m_ChkShowPositionNodes;
303 QPushButton *m_BtnReinit3DInterpolation;
311 unsigned int m_LastSliceIndex;
315 bool m_2DInterpolationEnabled;
316 bool m_3DInterpolationEnabled;
318 unsigned int m_numTimesLabelSetConnectionAdded;
322 QFuture<void> m_Future;
323 QFutureWatcher<void> m_Watcher;
325 QFuture<void> m_ModifyFuture;
326 QFutureWatcher<void> m_ModifyWatcher;
330 QFuture<void> m_PlaneFuture;
331 QFutureWatcher<void> m_PlaneWatcher;