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();
188 virtual void PreparePreviewToResultTransfer(
const LabelMappingType& labelMapping);
210 const Image* GetSegmentationInput()
const;
214 const Image* GetReferenceData()
const;
220 void ResetPreviewNode();
224 void ResetPreviewContent();
228 void ResetPreviewContentAtTimeStep(
unsigned int timeStep);
242 void CreateResultSegmentationFromPreview();
244 void OnRoiDataChanged();
245 void OnTimePointChanged();
254 bool EnsureUpToDateUserDefinedActiveLabel();
271 bool m_CreateAllTimeSteps =
false;
274 bool m_KeepActiveAfterAccept =
false;
281 bool m_LazyDynamicPreviews =
false;
283 bool m_IsTimePointChangeAware =
true;
287 bool m_ResetsToEmptyPreview =
false;
291 bool m_UseSpecialPreviewColor =
true;
295 bool m_IsUpdating =
false;
316 LabelTransferMode m_LabelTransferMode = LabelTransferMode::MapLabel;