Medical Imaging Interaction Toolkit  2016.11.0
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,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef mitkFeedbackContourTool_h_Included
18 #define mitkFeedbackContourTool_h_Included
19 
20 #include "mitkCommon.h"
21 #include "mitkContourModelUtils.h"
22 #include "mitkContourUtils.h" //TODO remove legacy support
23 #include "mitkImage.h"
24 #include "mitkSegTool2D.h"
26 
27 #include "mitkDataNode.h"
28 
29 #include "mitkImageCast.h"
30 
31 namespace mitk
32 {
54  {
55  public:
57 
58  protected:
59  FeedbackContourTool(); // purposely hidden
60  FeedbackContourTool(const char *); // purposely hidden
61  virtual ~FeedbackContourTool();
62 
63  ContourModel *GetFeedbackContour();
64  void SetFeedbackContour(ContourModel::Pointer);
65 
66  void SetFeedbackContourVisible(bool);
67 
69  void SetFeedbackContourColor(float r, float g, float b);
70  void SetFeedbackContourColorDefault();
71 
72  void Deactivated() override;
73 
74  void Activated() override;
75 
82  ContourModel::Pointer ProjectContourTo2DSlice(Image *slice,
83  ContourModel *contourIn3D,
84  bool correctionForIpSegmentation = false,
85  bool constrainToInside = true);
86 
93  ContourModel::Pointer BackProjectContourFrom2DSlice(const BaseGeometry *sliceGeometry,
94  ContourModel *contourIn2D,
95  bool correctionForIpSegmentation = false);
96 
100  void FillContourInSlice(ContourModel *projectedContour, Image *sliceImage, int paintingPixelValue = 1);
101 
105  void FillContourInSlice(ContourModel *projectedContour,
106  unsigned int timeStep,
107  Image *sliceImage,
108  int paintingPixelValue = 1);
109 
113  };
114 
115 } // namespace
116 
117 #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:44
Image class for storing images.
Definition: mitkImage.h:76
Base class for tools that use a contour for feedback.
Abstract base class for segmentation tools.
Definition: mitkSegTool2D.h:58
BaseGeometry Describes the geometry of a data object.