Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
itkImageToPathFilter.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 /*===================================================================
14 
15 This file is based heavily on a corresponding ITK filter.
16 
17 ===================================================================*/
18 #ifndef itkImageToPathFilter_h
19 #define itkImageToPathFilter_h
20 
21 #include <itkImage.h>
22 #include <itkPathSource.h>
23 
24 namespace itk
25 {
33  template <class TInputImage, class TOutputPath>
34  class ITK_EXPORT ImageToPathFilter : public PathSource<TOutputPath>
35  {
36  public:
39  typedef PathSource<TOutputPath> Superclass;
42 
44  itkTypeMacro(ImageToPathFilter, PathSource);
45 
47  typedef TInputImage InputImageType;
48  typedef typename InputImageType::Pointer InputImagePointer;
49  typedef typename InputImageType::ConstPointer InputImageConstPointer;
50  typedef typename InputImageType::RegionType InputImageRegionType;
51  typedef typename InputImageType::PixelType InputImagePixelType;
52 
54  itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
55 
57  using Superclass::SetInput;
58  virtual void SetInput(const InputImageType *image);
59 
61  virtual void SetInput(unsigned int, const TInputImage *image);
62 
64  const InputImageType *GetInput(void);
65 
67  const InputImageType *GetInput(unsigned int idx);
68 
69  protected:
71  ~ImageToPathFilter() override;
72 
73  void PrintSelf(std::ostream &os, Indent indent) const override;
74 
75  private:
76  ImageToPathFilter(const Self &); // purposely not implemented
77  void operator=(const Self &); // purposely not implemented
78  };
79 
80 } // end namespace itk
81 
82 #ifndef ITK_MANUAL_INSTANTIATION
83 #include <itkImageToPathFilter.tpp>
84 #endif
85 
86 #endif
Base class for filters that take an image as input and produce an path as output.
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
const InputImageType * GetInput(unsigned int idx)
Get the image input at a specific index.
const InputImageType * GetInput(void)
Get the first image input.
InputImageType::PixelType InputImagePixelType
SmartPointer< Self > Pointer
void PrintSelf(std::ostream &os, Indent indent) const override
InputImageType::ConstPointer InputImageConstPointer
virtual void SetInput(unsigned int, const TInputImage *image)
Set the image input at a specific index.
virtual void SetInput(const InputImageType *image)
~ImageToPathFilter() override
InputImageType::RegionType InputImageRegionType
InputImageType::Pointer InputImagePointer
SmartPointer< const Self > ConstPointer
PathSource< TOutputPath > Superclass