Slicer 5.9
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
28
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
46 itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
47
48 typedef TInputImage InputImageType;
49 typedef typename InputImageType::Pointer InputImagePointer;
50 typedef typename InputImageType::ConstPointer InputImageConstPointer;
51 typedef typename InputImageType::RegionType InputImageRegionType;
52 typedef typename InputImageType::PixelType InputImagePixelType;
53 typedef typename InputImageType::IndexType IndexType;
54 typedef typename InputImageType::SizeType SizeType;
55
56 typedef TOutputImage OutputImageType;
57 typedef typename OutputImageType::Pointer OutputImagePointer;
58 typedef typename OutputImageType::RegionType OutputImageRegionType;
59 typedef typename OutputImageType::PixelType OutputImagePixelType;
60
61 typedef ChainCodePath<ImageDimension> ChainCodePathType;
62 typedef typename ChainCodePathType::Pointer ChainCodePathPointer;
63
64 typedef typename ChainCodePathType::OffsetType OffsetType;
65
67 typedef typename DataObject::Pointer DataObjectPointer;
68
70 itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
71 itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
72
73 void PrintSelf(std::ostream& os, Indent indent) const override;
74
78
80 itkGetMacro(MovedSeed, bool);
81
85
87 ChainCodePathType* GetPathOutput() { return static_cast<ChainCodePathType*>(this->ProcessObject::GetOutput(1)); }
88
89protected:
91 ~LevelTracingImageFilter() override = default;
92
95
97 void EnlargeOutputRequestedRegion(DataObject* output) override;
98
99 void GenerateData() override;
100
101 using Superclass::MakeOutput;
102 DataObjectPointer MakeOutput(unsigned int output);
103
106 {
107 };
108 template <signed int VDimension>
110 {
111 };
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// #ifdef ITK_USE_CONCEPT_CHECKING
140// #endif
141
142} // end namespace itk
143
144#ifndef ITK_MANUAL_INSTANTIATION
145# include "itkLevelTracingImageFilter.txx"
146#endif
147
148#endif
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
ImageToImageFilter< TInputImage, TOutputImage > Superclass
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
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.