Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
mitkLiveWireTool2D.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkLiveWireTool2D_h
14 #define mitkLiveWireTool2D_h
15 
18 
19 namespace mitk
20 {
45  {
46  public:
48  itkFactorylessNewMacro(Self);
49 
50  us::ModuleResource GetCursorIconResource() const override;
51  us::ModuleResource GetIconResource() const override;
52  const char *GetName() const override;
53  const char **GetXPM() const override;
54 
55  protected:
57  ~LiveWireTool2D() override;
58 
59  void ConnectActionsAndFunctions() override;
60 
61  void UpdateLiveWireContour();
62  void OnTimePointChanged() override;
63 
64  mitk::Point3D PrepareInitContour(const mitk::Point3D& clickedPoint) override;
65  virtual void FinalizePreviewContour(const Point3D& clickedPoint) override;
66  virtual void InitializePreviewContour(const Point3D& clickedPoint) override;
67  virtual void UpdatePreviewContour(const Point3D& clickedPoint) override;
68 
69  private:
70 
72  void OnMouseMoveNoDynamicCosts(StateMachineAction *, InteractionEvent *interactionEvent);
73 
75  void FinishTool() override;
76 
77  template <typename TPixel, unsigned int VImageDimension>
78  void FindHighestGradientMagnitudeByITK(itk::Image<TPixel, VImageDimension> *inputImage,
79  itk::Index<3> &index,
80  itk::Index<3> &returnIndex);
81 
83 
85 
86  bool m_CreateAndUseDynamicCosts;
87  };
88 }
89 
90 #endif
mitk::InteractionEvent
Definition: mitkInteractionEvent.h:26
mitk::DataInteractor::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkDataInteractor.h:56
mitkEditableContourTool.h
mitk::EditableContourTool
Definition: mitkEditableContourTool.h:27
mitk
Find image slices visible on a given plane.
Definition: RenderingTests.dox:1
mitk::EventStateMachine
‍**
Definition: mitkEventStateMachine.h:111
mitk::LiveWireTool2D
A 2D segmentation tool based on a LiveWire approach.
Definition: mitkLiveWireTool2D.h:44
mitk::Point< ScalarType, 3 >
MITKSEGMENTATION_EXPORT
#define MITKSEGMENTATION_EXPORT
Definition: MitkSegmentationExports.h:15
us::ModuleResource
Definition: usModuleResource.h:55
mitk::StateMachineAction
Represents an action, that is executed after a certain event (in statemachine-mechanism) TODO: implem...
Definition: mitkStateMachineAction.h:30
mitk::BaseDataSource::Pointer
itk::SmartPointer< Self > Pointer
Definition: mitkBaseDataSource.h:74
mitkClassMacro
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:36
mitkContourModelLiveWireInteractor.h