Medical Imaging Interaction Toolkit  2022.04.99-194dd5d8
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 
40  static ContourModel::Pointer ProjectContourTo2DSlice(const Image *slice,
41  const ContourModel *contourIn3D);
42 
49  static ContourModel::Pointer BackProjectContourFrom2DSlice(const BaseGeometry *sliceGeometry,
50  const ContourModel *contourIn2D);
51 
58  static void FillContourInSlice(const ContourModel *projectedContour,
59  Image *sliceImage,
60  const Image* workingImage,
61  int paintingPixelValue = 1);
62 
70  static void FillContourInSlice(const ContourModel *projectedContour,
71  TimeStepType contourTimeStep,
72  Image *sliceImage,
73  const Image* workingImage,
74  int paintingPixelValue = 1);
75 
89  static void FillSliceInSlice(vtkSmartPointer<vtkImageData> filledImage,
90  vtkSmartPointer<vtkImageData> resultImage,
91  const Image* image,
92  int paintingPixelValue,
93  double fillForegroundThreshold = 1.0);
94 
98  static ContourModel::Pointer MoveZerothContourTimeStep(const ContourModel *contour, TimeStepType timeStep);
99 
108  static int GetActivePixelValue(const Image* workingImage);
109 
110  protected:
112  ~ContourModelUtils() override;
113  };
114 }
115 
116 #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:45
Image class for storing images.
Definition: mitkImage.h:69
std::vcl_size_t TimeStepType
Helpful methods for working with contours and images.
BaseGeometry Describes the geometry of a data object.