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;
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();
331 bool TranslateAndInterpolateChangedSlice(
const itk::EventObject &e,
346 void UpdateVisibleSuggestion();
348 void SetCurrentContourListID();
352 void HideAllInterpolationControls();
353 void Show2DInterpolationControls(
bool show);
354 void Show3DInterpolationControls(
bool show);
355 void CheckSupportedImageDimension();
356 void WaitForFutures();
358 void ClearSegmentationObservers();
360 mitk::SegmentationInterpolationController::Pointer m_Interpolator;
361 mitk::SurfaceInterpolationController::Pointer m_SurfaceInterpolator;
366 mitk::ToolManager::Pointer m_ToolManager;
369 unsigned int m_ControllerToTimeObserverTag;
370 QHash<mitk::SliceNavigationController *, int> m_ControllerToSliceObserverTag;
371 QHash<mitk::SliceNavigationController *, int> m_ControllerToDeleteObserverTag;
373 std::map<mitk::LabelSetImage *, unsigned long> m_SegmentationObserverTags;
375 unsigned int InterpolationInfoChangedObserverTag;
376 unsigned int SurfaceInterpolationInfoChangedObserverTag;
377 unsigned int InterpolationAbortedObserverTag;
379 QGroupBox *m_GroupBoxEnableExclusiveInterpolationMode;
380 QComboBox *m_CmbInterpolation;
381 QPushButton *m_BtnApply2D;
382 QPushButton *m_BtnApplyForAllSlices2D;
383 QPushButton *m_BtnApply3D;
388 QCheckBox *m_ChkShowPositionNodes;
389 QPushButton *m_BtnReinit3DInterpolation;
398 unsigned int m_LastSliceIndex;
402 bool m_2DInterpolationEnabled;
403 bool m_3DInterpolationEnabled;
405 unsigned int m_numTimesLabelSetConnectionAdded;
409 QFuture<void> m_Future;
410 QFutureWatcher<void> m_Watcher;
412 QFuture<void> m_ModifyFuture;
413 QFutureWatcher<void> m_ModifyWatcher;
417 QFuture<void> m_PlaneFuture;
418 QFutureWatcher<void> m_PlaneWatcher;
423 unsigned int m_PreviousLayerIndex;
424 unsigned int m_CurrentLayerIndex;