go home Home | Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages
itkParabolicErodeDilateImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright Insight Software Consortium
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkParabolicErodeDilateImageFilter_h
19#define itkParabolicErodeDilateImageFilter_h
20
21#include "itkImageToImageFilter.h"
22#include "itkNumericTraits.h"
23#include "itkProgressReporter.h"
24
25namespace itk
26{
61template <typename TInputImage, bool doDilate, typename TOutputImage = TInputImage>
62class ITK_TEMPLATE_EXPORT ParabolicErodeDilateImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
63{
64
65public:
67
70 using Superclass = ImageToImageFilter<TInputImage, TOutputImage>;
71 using Pointer = SmartPointer<Self>;
72 using ConstPointer = SmartPointer<const Self>;
73
75 itkNewMacro(Self);
76
78 itkTypeMacro(ParabolicErodeDilateImageFilter, ImageToImageFilter);
79
81 using InputImageType = TInputImage;
82 using OutputImageType = TOutputImage;
83 using PixelType = typename TInputImage::PixelType;
84 using RealType = typename NumericTraits<PixelType>::RealType;
85 using ScalarRealType = typename NumericTraits<PixelType>::ScalarRealType;
86 using OutputPixelType = typename TOutputImage::PixelType;
87
89 using InputImagePointer = typename TInputImage::Pointer;
90 using InputImageConstPointer = typename TInputImage::ConstPointer;
91 using InputSizeType = typename TInputImage::SizeType;
92 using OutputSizeType = typename TOutputImage::SizeType;
93
95 using RadiusType = typename itk::FixedArray<ScalarRealType, TInputImage::ImageDimension>;
96
98 itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension);
99 itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension);
100 itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension);
101
102 using OutputImageRegionType = typename OutputImageType::RegionType;
107 using InternalRealType = typename NumericTraits<PixelType>::FloatType;
108 // typedef typename Image<InternalRealType, Self::ImageDimension > RealImageType;
109
110 // set all of the scales the same
111 void
113
114 itkSetMacro(Scale, RadiusType);
115 itkGetConstReferenceMacro(Scale, RadiusType);
116
121 itkSetMacro(UseImageSpacing, bool);
122 itkGetConstReferenceMacro(UseImageSpacing, bool);
123 itkBooleanMacro(UseImageSpacing);
126#ifdef ITK_USE_CONCEPT_CHECKING
128 itkConceptMacro(SameDimension, (Concept::SameDimension<Self::InputImageDimension, Self::OutputImageDimension>));
129
130 itkConceptMacro(Comparable, (Concept::Comparable<PixelType>));
131
133#endif
134
135protected:
138 void
139 PrintSelf(std::ostream & os, Indent indent) const override;
140
142 void
143 GenerateData() override;
144
145 unsigned int
146 SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType & splitRegion) override;
147
148 void
149 ThreadedGenerateData(const OutputImageRegionType & outputRegionForThread, ThreadIdType threadId) override;
150
151 // virtual void GenerateInputRequestedRegion();
152 // Override since the filter produces the entire dataset.
153 void
154 EnlargeOutputRequestedRegion(DataObject * output) override;
155
156 bool m_UseImageSpacing{};
157
158private:
159 RadiusType m_Scale{};
160
161 int m_CurrentDimension{};
162};
163
164} // end namespace itk
165
166#ifndef ITK_MANUAL_INSTANTIATION
167# include "itkParabolicErodeDilateImageFilter.hxx"
168#endif
169
170#endif
Parent class for morphological operations with parabolic structuring elements.
typename itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType
void SetScale(ScalarRealType scale)
typename NumericTraits< PixelType >::RealType RealType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
void ThreadedGenerateData(const OutputImageRegionType &outputRegionForThread, ThreadIdType threadId) override
typename NumericTraits< PixelType >::ScalarRealType ScalarRealType
unsigned int SplitRequestedRegion(unsigned int i, unsigned int num, OutputImageRegionType &splitRegion) override
itkStaticConstMacro(OutputImageDimension, unsigned int, TOutputImage::ImageDimension)
void EnlargeOutputRequestedRegion(DataObject *output) override
void PrintSelf(std::ostream &os, Indent indent) const override
typename NumericTraits< PixelType >::FloatType InternalRealType
itkStaticConstMacro(InputImageDimension, unsigned int, TInputImage::ImageDimension)
~ParabolicErodeDilateImageFilter() override=default
ITK_DISALLOW_COPY_AND_MOVE(ParabolicErodeDilateImageFilter)
typename TInputImage::ConstPointer InputImageConstPointer
typename OutputImageType::RegionType OutputImageRegionType
itkStaticConstMacro(ImageDimension, unsigned int, TInputImage::ImageDimension)


Generated on 2024-07-17 for elastix by doxygen 1.11.0 (9b424b03c9833626cd435af22a444888fbbb192d) elastix logo