Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitkImageToContourModelFilter.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 mitkImageToContourModelFilter_h
14 #define mitkImageToContourModelFilter_h
15 
16 #include <mitkCommon.h>
17 #include <mitkContourModel.h>
18 #include <mitkContourModelSource.h>
20 #include <mitkImage.h>
21 
22 namespace mitk
23 {
38  {
39  public:
41  itkFactorylessNewMacro(Self);
42  itkCloneMacro(Self);
43 
46 
47  using Superclass::SetInput;
48 
52  virtual void SetInput(const InputType *input);
53 
58  virtual void SetInput(unsigned int idx, const InputType *input);
59 
63  const InputType *GetInput(void);
64 
69  const InputType *GetInput(unsigned int idx);
70 
74  void SetContourValue(float contourValue);
75 
79  float GetContourValue();
80 
81  protected:
83 
85 
86  void GenerateData() override;
87 
88  template <typename TPixel, unsigned int VImageDimension>
89  void Itk2DContourExtraction(const itk::Image<TPixel, VImageDimension> *sliceImage);
90 
91  private:
92  const BaseGeometry *m_SliceGeometry;
93  float m_ContourValue;
94  };
95 }
96 
97 #endif
#define MITKCONTOURMODEL_EXPORT
Abstract base class describing the geometry of a data object.
Base class for all pipeline sources that produce mitk::ContourModel outputs.
Filter that extracts contour lines from a 2D image at a given iso-value.
mitkClassMacro(ImageToContourModelFilter, ContourModelSource)
virtual void SetInput(const InputType *input)
Set the input image from which contours are extracted.
virtual void SetInput(unsigned int idx, const InputType *input)
Set the input image at the given index.
void Itk2DContourExtraction(const itk::Image< TPixel, VImageDimension > *sliceImage)
mitk::Image InputType
The input image type.
const InputType * GetInput(void)
Get the first input image.
void SetContourValue(float contourValue)
Set the iso-value at which contours are extracted.
float GetContourValue()
Get the current iso-value used for contour extraction.
const InputType * GetInput(unsigned int idx)
Get the input image at the given index.
Image class for storing multi-dimensional medical image data.
Definition: mitkImage.h:76
Find image slices visible on a given plane.