Medical Imaging Interaction Toolkit  2018.4.99-07c45cb1
Medical Imaging Interaction Toolkit
mitkFeedbackContourTool.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 mitkFeedbackContourTool_h_Included
14 #define mitkFeedbackContourTool_h_Included
15 
16 #include "mitkCommon.h"
17 #include "mitkContourModelUtils.h"
18 #include "mitkContourUtils.h" //TODO remove legacy support
19 #include "mitkImage.h"
20 #include "mitkSegTool2D.h"
22 
23 #include "mitkDataNode.h"
24 
25 #include "mitkImageCast.h"
26 
27 namespace mitk
28 {
50  {
51  public:
53 
54  protected:
55  FeedbackContourTool(); // purposely hidden
56  FeedbackContourTool(const char *); // purposely hidden
57  ~FeedbackContourTool() override;
58 
59  ContourModel *GetFeedbackContour();
60  void SetFeedbackContour(ContourModel::Pointer);
61 
62  void SetFeedbackContourVisible(bool);
63 
65  void SetFeedbackContourColor(float r, float g, float b);
66  void SetFeedbackContourColorDefault();
67 
68  void Deactivated() override;
69 
70  void Activated() override;
71 
78  ContourModel::Pointer ProjectContourTo2DSlice(Image *slice,
79  ContourModel *contourIn3D,
80  bool correctionForIpSegmentation = false,
81  bool constrainToInside = true);
82 
89  ContourModel::Pointer BackProjectContourFrom2DSlice(const BaseGeometry *sliceGeometry,
90  ContourModel *contourIn2D,
91  bool correctionForIpSegmentation = false);
92 
96  void FillContourInSlice(ContourModel *projectedContour, Image *sliceImage, int paintingPixelValue = 1);
97 
101  void FillContourInSlice(ContourModel *projectedContour,
102  unsigned int timeStep,
103  Image *sliceImage,
104  int paintingPixelValue = 1);
105 
109  };
110 
111 } // namespace
112 
113 #endif
ContourModel::Pointer m_FeedbackContour
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
#define MITKSEGMENTATION_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacro(className, SuperClassName)
Definition: mitkCommon.h:40
Image class for storing images.
Definition: mitkImage.h:72
Base class for tools that use a contour for feedback.
Abstract base class for segmentation tools.
Definition: mitkSegTool2D.h:54
BaseGeometry Describes the geometry of a data object.