13 #ifndef mitkSegWithPreviewTool_h
14 #define mitkSegWithPreviewTool_h
44 void Activated()
override;
45 void Deactivated()
override;
47 void ConfirmSegmentation();
49 itkSetMacro(CreateAllTimeSteps,
bool);
50 itkGetMacro(CreateAllTimeSteps,
bool);
51 itkBooleanMacro(CreateAllTimeSteps);
53 itkSetMacro(KeepActiveAfterAccept,
bool);
54 itkGetMacro(KeepActiveAfterAccept,
bool);
55 itkBooleanMacro(KeepActiveAfterAccept);
57 itkSetMacro(IsTimePointChangeAware,
bool);
58 itkGetMacro(IsTimePointChangeAware,
bool);
59 itkBooleanMacro(IsTimePointChangeAware);
61 itkSetMacro(ResetsToEmptyPreview,
bool);
62 itkGetMacro(ResetsToEmptyPreview,
bool);
63 itkBooleanMacro(ResetsToEmptyPreview);
65 itkSetMacro(UseSpecialPreviewColor,
bool);
66 itkGetMacro(UseSpecialPreviewColor,
bool);
67 itkBooleanMacro(UseSpecialPreviewColor);
69 itkSetMacro(RequestDeactivationConfirmation,
bool);
70 itkGetMacro(RequestDeactivationConfirmation,
bool);
71 itkBooleanMacro(RequestDeactivationConfirmation);
91 void SetLabelTransferScope(LabelTransferScope labelTransferScope);
92 itkGetMacro(LabelTransferScope, LabelTransferScope);
109 void SetLabelTransferMode(LabelTransferMode labelTransferMode);
110 itkGetMacro(LabelTransferMode, LabelTransferMode);
112 bool CanHandle(
const BaseData* referenceData,
const BaseData* workingData)
const override;
121 void UpdatePreview(
bool ignoreLazyPreviewSetting =
false);
124 bool IsUpdating()
const;
131 std::string GetCurrentSegmentationName();
137 virtual DataNode* GetTargetSegmentationNode()
const;
144 DataNode* GetPreviewSegmentationNode();
154 const char* GetGroup()
const override;
163 void EnsureTargetSegmentationNodeInDataStorage()
const;
170 virtual void InitiateToolByInput();
175 virtual void UpdatePrepare();
180 virtual void UpdateCleanUp();
185 virtual void ConfirmCleanUp();
197 virtual void PreparePreviewToResultTransfer(
const LabelMappingType& labelMapping);
219 const Image* GetSegmentationInput()
const;
223 const Image* GetReferenceData()
const;
229 void ResetPreviewNode();
233 void ResetPreviewContent();
237 void ResetPreviewContentAtTimeStep(
unsigned int timeStep);
248 bool ConfirmBeforeDeactivation()
override;
253 void CreateResultSegmentationFromPreview();
255 void OnRoiDataChanged();
256 void OnTimePointChanged();
265 bool EnsureUpToDateUserDefinedActiveLabel();
282 bool m_CreateAllTimeSteps =
false;
285 bool m_KeepActiveAfterAccept =
false;
292 bool m_LazyDynamicPreviews =
false;
294 bool m_IsTimePointChangeAware =
true;
298 bool m_ResetsToEmptyPreview =
false;
302 bool m_UseSpecialPreviewColor =
true;
306 bool m_IsUpdating =
false;
327 LabelTransferMode m_LabelTransferMode = LabelTransferMode::MapLabel;
329 bool m_IsPreviewGenerated =
false;
334 bool m_RequestDeactivationConfirmation =
false;