Medical Imaging Interaction Toolkit  2018.04.99-46eee069
Medical Imaging Interaction Toolkit
mitkContourModelUtils.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 mitkContourModelUtils_h
14 #define mitkContourModelUtils_h
15 
16 #include <mitkContourModel.h>
17 #include <mitkImage.h>
18 #include <vtkSmartPointer.h>
19 
21 
22 namespace mitk
23 {
29  class MITKCONTOURMODEL_EXPORT ContourModelUtils : public itk::Object
30  {
31  public:
33 
43  static ContourModel::Pointer ProjectContourTo2DSlice(Image *slice,
44  ContourModel *contourIn3D,
45  bool correctionForIpSegmentation,
46  bool constrainToInside);
47 
56  static ContourModel::Pointer BackProjectContourFrom2DSlice(const BaseGeometry *sliceGeometry,
57  ContourModel *contourIn2D,
58  bool correctionForIpSegmentation = false);
59 
63  static void FillContourInSlice(ContourModel *projectedContour,
64  Image *sliceImage,
65  mitk::Image::Pointer workingImage,
66  int paintingPixelValue = 1);
67 
71  static void FillContourInSlice(ContourModel *projectedContour,
72  unsigned int timeStep,
73  Image *sliceImage,
74  mitk::Image::Pointer workingImage,
75  int paintingPixelValue = 1);
76 
80  static void FillSliceInSlice(vtkSmartPointer<vtkImageData> filledImage,
81  vtkSmartPointer<vtkImageData> resultImage,
83  int paintingPixelValue);
84 
88  static ContourModel::Pointer MoveZerothContourTimeStep(const ContourModel *contour, unsigned int timeStep);
89 
98  static int GetActivePixelValue(mitk::Image* workingImage);
99 
100  protected:
102  ~ContourModelUtils() override;
103  };
104 }
105 
106 #endif
ContourModel is a structure of linked vertices defining a contour in 3D space. The vertices are store...
#define MITKCONTOURMODEL_EXPORT
DataCollection - Class to facilitate loading/accessing structured data.
#define mitkClassMacroItkParent(className, SuperClassName)
Definition: mitkCommon.h:49
Image class for storing images.
Definition: mitkImage.h:73
Helpful methods for working with contours and images.
BaseGeometry Describes the geometry of a data object.