18 #ifndef itkAnnulusOperator_h
19 #define itkAnnulusOperator_h
68 template<
typename TPixel,
unsigned int TDimension = 2,
69 typename TAllocator = NeighborhoodAllocator< TPixel > >
71 public NeighborhoodOperator< TPixel, TDimension, TAllocator >
81 using OffsetType =
typename Superclass::OffsetType;
87 NeighborhoodOperator< TPixel, TDimension, TAllocator >(),
95 NeighborhoodOperator< TPixel, TDimension, TAllocator >(other),
96 m_InnerRadius( other.m_InnerRadius ),
97 m_Thickness( other.m_Thickness ),
98 m_Normalize( other.m_Normalize ),
99 m_BrightCenter( other.m_BrightCenter ),
100 m_InteriorValue( other.m_InteriorValue ),
101 m_AnnulusValue( other.m_AnnulusValue ),
102 m_ExteriorValue( other.m_ExteriorValue ),
103 m_Spacing( other.m_Spacing )
109 void CreateOperator();
113 void SetInnerRadius(
double r)
114 { m_InnerRadius = r; }
115 double GetInnerRadius()
const
116 {
return m_InnerRadius; }
122 void SetThickness(
double t)
124 double GetThickness()
const
125 {
return m_Thickness; }
130 void SetSpacing(SpacingType & s)
132 const SpacingType & GetSpacing()
const
133 {
return m_Spacing; }
138 void SetNormalize(
bool b)
140 bool GetNormalize()
const
141 {
return m_Normalize; }
143 { this->SetNormalize(
true); }
145 { this->SetNormalize(
false); }
150 void SetBrightCenter(
bool b)
151 { m_BrightCenter = b; }
152 bool GetBrightCenter()
const
153 {
return m_BrightCenter; }
154 void BrightCenterOn()
155 { this->SetBrightCenter(
true); }
156 void BrightCenterOff()
157 { this->SetBrightCenter(
false); }
164 void SetInteriorValue(TPixel v)
165 { m_InteriorValue = v; }
166 TPixel GetInteriorValue()
const
167 {
return m_InteriorValue; }
168 void SetAnnulusValue(TPixel v)
169 { m_AnnulusValue = v; }
170 TPixel GetAnnulusValue()
const
171 {
return m_AnnulusValue; }
172 void SetExteriorValue(TPixel v)
173 { m_ExteriorValue = v; }
174 TPixel GetExteriorValue()
const
175 {
return m_ExteriorValue; }
179 Self & operator=(
const Self & other)
183 Superclass::operator=(other);
184 m_InnerRadius = other.m_InnerRadius;
185 m_Thickness = other.m_Thickness;
186 m_Spacing = other.m_Spacing;
187 m_InteriorValue = other.m_InteriorValue;
188 m_AnnulusValue = other.m_AnnulusValue;
189 m_ExteriorValue = other.m_ExteriorValue;
190 m_Normalize = other.m_Normalize;
191 m_BrightCenter = other.m_BrightCenter;
198 void PrintSelf(std::ostream & os, Indent i)
const override
200 os << i <<
"AnnulusOperator { this=" <<
this
201 <<
", m_InnerRadius = " << m_InnerRadius
202 <<
", m_Thickness = " << m_Thickness
203 <<
", m_Spacing = " << m_Spacing
204 <<
", m_Normalize = " << m_Normalize
205 <<
", m_BrightCenter = " << m_BrightCenter
206 <<
", m_InteriorValue = " << m_InteriorValue
207 <<
", m_ExteriorValue = " << m_ExteriorValue
209 Superclass::PrintSelf( os, i.GetNextIndent() );
217 using CoefficientVector =
typename Superclass::CoefficientVector;
218 using PixelType =
typename Superclass::PixelType;
221 CoefficientVector GenerateCoefficients()
override;
224 void Fill(
const CoefficientVector & c)
override;
228 double m_InnerRadius{1.0};
229 double m_Thickness{ 1.0 };
230 bool m_Normalize{
false};
231 bool m_BrightCenter{
false};
232 PixelType m_InteriorValue;
233 PixelType m_AnnulusValue;
234 PixelType m_ExteriorValue;
235 SpacingType m_Spacing;
239 #ifndef ITK_MANUAL_INSTANTIATION
240 #include "itkAnnulusOperator.hxx"
Define numeric traits for std::vector.
ImageBaseType::SizeType SizeType
A NeighborhoodOperator for performing a matched filtering with an annulus (two concentric circles...