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);
87 void SetLabelTransferScope(LabelTransferScope labelTransferScope);
88 itkGetMacro(LabelTransferScope, LabelTransferScope);
105 void SetLabelTransferMode(LabelTransferMode labelTransferMode);
106 itkGetMacro(LabelTransferMode, LabelTransferMode);
108 bool CanHandle(
const BaseData* referenceData,
const BaseData* workingData)
const override;
117 void UpdatePreview(
bool ignoreLazyPreviewSetting =
false);
120 bool IsUpdating()
const;
127 std::string GetCurrentSegmentationName();
133 virtual DataNode* GetTargetSegmentationNode()
const;
140 DataNode* GetPreviewSegmentationNode();
150 const char* GetGroup()
const override;
159 void EnsureTargetSegmentationNodeInDataStorage()
const;
166 virtual void InitiateToolByInput();
171 virtual void UpdatePrepare();
176 virtual void UpdateCleanUp();
181 virtual void ConfirmCleanUp();
193 virtual void PreparePreviewToResultTransfer(
const LabelMappingType& labelMapping);
215 const Image* GetSegmentationInput()
const;
219 const Image* GetReferenceData()
const;
225 void ResetPreviewNode();
229 void ResetPreviewContent();
233 void ResetPreviewContentAtTimeStep(
unsigned int timeStep);
247 void CreateResultSegmentationFromPreview();
249 void OnRoiDataChanged();
250 void OnTimePointChanged();
259 bool EnsureUpToDateUserDefinedActiveLabel();
276 bool m_CreateAllTimeSteps =
false;
279 bool m_KeepActiveAfterAccept =
false;
286 bool m_LazyDynamicPreviews =
false;
288 bool m_IsTimePointChangeAware =
true;
292 bool m_ResetsToEmptyPreview =
false;
296 bool m_UseSpecialPreviewColor =
true;
300 bool m_IsUpdating =
false;
321 LabelTransferMode m_LabelTransferMode = LabelTransferMode::MapLabel;