Slicer 5.4
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
itkLevelTracingImageFilter.h
Go to the documentation of this file.
1#ifndef itkLevelTracingImageFilter_h
2#define itkLevelTracingImageFilter_h
3
4#include "itkImage.h"
5#include "itkImageToImageFilter.h"
6#include "itkSimpleDataObjectDecorator.h"
7#include "itkChainCodePath.h"
8
9namespace itk
10{
11
29template <class TInputImage, class TOutputImage>
30class LevelTracingImageFilter:public ImageToImageFilter<TInputImage,TOutputImage>
31{
32public:
35 typedef ImageToImageFilter<TInputImage,TOutputImage> Superclass;
36 typedef SmartPointer<Self> Pointer;
37 typedef SmartPointer<const Self> ConstPointer;
38
41
44 ImageToImageFilter);
45
47 itkStaticConstMacro(ImageDimension, unsigned int,
48 TInputImage::ImageDimension);
49
50 typedef TInputImage InputImageType;
51 typedef typename InputImageType::Pointer InputImagePointer;
52 typedef typename InputImageType::ConstPointer InputImageConstPointer;
53 typedef typename InputImageType::RegionType InputImageRegionType;
54 typedef typename InputImageType::PixelType InputImagePixelType;
55 typedef typename InputImageType::IndexType IndexType;
56 typedef typename InputImageType::SizeType SizeType;
57
58 typedef TOutputImage OutputImageType;
59 typedef typename OutputImageType::Pointer OutputImagePointer;
60 typedef typename OutputImageType::RegionType OutputImageRegionType;
61 typedef typename OutputImageType::PixelType OutputImagePixelType;
62
63 typedef ChainCodePath<ImageDimension> ChainCodePathType;
64 typedef typename ChainCodePathType::Pointer ChainCodePathPointer;
65
66 typedef typename ChainCodePathType::OffsetType OffsetType;
67
69 typedef typename DataObject::Pointer DataObjectPointer;
70
72 itkStaticConstMacro(InputImageDimension, unsigned int,
73 TInputImage::ImageDimension);
74 itkStaticConstMacro(OutputImageDimension, unsigned int,
75 TOutputImage::ImageDimension);
76
77 void PrintSelf ( std::ostream& os, Indent indent ) const override;
78
82
84 itkGetMacro(MovedSeed, bool);
85
89
91 ChainCodePathType *GetPathOutput() { return static_cast<ChainCodePathType*>(this->ProcessObject::GetOutput(1)); }
92
93protected:
95 ~LevelTracingImageFilter() override = default;
96
99
101 void EnlargeOutputRequestedRegion(DataObject *output) override;
102
103 void GenerateData() override;
104
105 using Superclass::MakeOutput;
106 DataObjectPointer MakeOutput(unsigned int output);
107
109 struct DispatchBase {};
110 template<signed int VDimension>
112
114 virtual void Trace( const Dispatch<2> & );
115 virtual void Trace( const DispatchBase &);
116
117private:
118 LevelTracingImageFilter(const Self&) = delete;
119 void operator=(const Self&) = delete;
120
121 IndexType m_Seed;
124 bool m_MovedSeed;
125
126};
127
128
129//#ifdef ITK_USE_CONCEPT_CHECKING
142//#endif
143
144} // end namespace itk
145
146#ifndef ITK_MANUAL_INSTANTIATION
147#include "itkLevelTracingImageFilter.txx"
148#endif
149
150#endif
Trace a level curve/surface given a seed point on the level curve/surface.
DataObjectPointer MakeOutput(unsigned int output)
InputImageType::Pointer InputImagePointer
InputImageType::RegionType InputImageRegionType
itkGetMacro(Seed, IndexType)
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
void EnlargeOutputRequestedRegion(DataObject *output) override
Override since the filter produces the entire dataset.
void PrintSelf(std::ostream &os, Indent indent) const override
void GenerateData() override
InputImageType::PixelType InputImagePixelType
SmartPointer< const Self > ConstPointer
InputImageType::ConstPointer InputImageConstPointer
ChainCodePathType * GetPathOutput()
Get the output as a ChainCodePath. This output is only generated in the 2D case.
itkGetMacro(MovedSeed, bool)
Did we move the seed point to put in on a boundary?
~LevelTracingImageFilter() override=default
void GenerateInputRequestedRegion() override
Override since the filter needs all the data for the algorithm.
ChainCodePathType::Pointer ChainCodePathPointer
itkTypeMacro(LevelTracingImageFilter, ImageToImageFilter)
virtual void Trace(const DispatchBase &)
OutputImageType::RegionType OutputImageRegionType
itkSetMacro(Seed, IndexType)
Set/Get the seed.
ChainCodePathType::OffsetType OffsetType
OutputImageType::Pointer OutputImagePointer
virtual void Trace(const Dispatch< 2 > &)
ChainCodePath< ImageDimension > ChainCodePathType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
OutputImageType::PixelType OutputImagePixelType
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension)
Simplified inverse ITK transforms.
To control overloaded versions of ComputeThreshold.