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 >
80 typedef typename Superclass::SizeType SizeType;
81 typedef typename Superclass::OffsetType OffsetType;
87 NeighborhoodOperator< TPixel, TDimension, TAllocator >(),
91 m_BrightCenter(false),
92 m_InteriorValue(NumericTraits< PixelType >::ZeroValue()),
93 m_AnnulusValue(NumericTraits< PixelType >::OneValue()),
94 m_ExteriorValue(NumericTraits< PixelType >::ZeroValue()),
99 NeighborhoodOperator< TPixel, TDimension, TAllocator >(other),
100 m_InnerRadius( other.m_InnerRadius ),
101 m_Thickness( other.m_Thickness ),
102 m_Normalize( other.m_Normalize ),
103 m_BrightCenter( other.m_BrightCenter ),
104 m_InteriorValue( other.m_InteriorValue ),
105 m_AnnulusValue( other.m_AnnulusValue ),
106 m_ExteriorValue( other.m_ExteriorValue ),
107 m_Spacing( other.m_Spacing )
113 void CreateOperator();
117 void SetInnerRadius(
double r)
118 { m_InnerRadius = r; }
119 double GetInnerRadius()
const
120 {
return m_InnerRadius; }
126 void SetThickness(
double t)
128 double GetThickness()
const
129 {
return m_Thickness; }
134 void SetSpacing(SpacingType & s)
136 const SpacingType & GetSpacing()
const
137 {
return m_Spacing; }
142 void SetNormalize(
bool b)
144 bool GetNormalize()
const
145 {
return m_Normalize; }
147 { this->SetNormalize(
true); }
149 { this->SetNormalize(
false); }
154 void SetBrightCenter(
bool b)
155 { m_BrightCenter = b; }
156 bool GetBrightCenter()
const
157 {
return m_BrightCenter; }
158 void BrightCenterOn()
159 { this->SetBrightCenter(
true); }
160 void BrightCenterOff()
161 { this->SetBrightCenter(
false); }
168 void SetInteriorValue(TPixel v)
169 { m_InteriorValue = v; }
170 TPixel GetInteriorValue()
const
171 {
return m_InteriorValue; }
172 void SetAnnulusValue(TPixel v)
173 { m_AnnulusValue = v; }
174 TPixel GetAnnulusValue()
const
175 {
return m_AnnulusValue; }
176 void SetExteriorValue(TPixel v)
177 { m_ExteriorValue = v; }
178 TPixel GetExteriorValue()
const
179 {
return m_ExteriorValue; }
183 Self & operator=(
const Self & other)
187 Superclass::operator=(other);
188 m_InnerRadius = other.m_InnerRadius;
189 m_Thickness = other.m_Thickness;
190 m_Spacing = other.m_Spacing;
191 m_InteriorValue = other.m_InteriorValue;
192 m_AnnulusValue = other.m_AnnulusValue;
193 m_ExteriorValue = other.m_ExteriorValue;
194 m_Normalize = other.m_Normalize;
195 m_BrightCenter = other.m_BrightCenter;
202 virtual void PrintSelf(std::ostream & os, Indent i)
const ITK_OVERRIDE
204 os << i <<
"AnnulusOperator { this=" <<
this
205 <<
", m_InnerRadius = " << m_InnerRadius
206 <<
", m_Thickness = " << m_Thickness
207 <<
", m_Spacing = " << m_Spacing
208 <<
", m_Normalize = " << m_Normalize
209 <<
", m_BrightCenter = " << m_BrightCenter
210 <<
", m_InteriorValue = " << m_InteriorValue
211 <<
", m_ExteriorValue = " << m_ExteriorValue
213 Superclass::PrintSelf( os, i.GetNextIndent() );
221 typedef typename Superclass::CoefficientVector CoefficientVector;
222 typedef typename Superclass::PixelType PixelType;
225 CoefficientVector GenerateCoefficients() ITK_OVERRIDE;
228 void Fill(const CoefficientVector & c) ITK_OVERRIDE;
232 double m_InnerRadius;
236 PixelType m_InteriorValue;
237 PixelType m_AnnulusValue;
238 PixelType m_ExteriorValue;
239 SpacingType m_Spacing;
243 #ifndef ITK_MANUAL_INSTANTIATION
244 #include "itkAnnulusOperator.hxx"
A NeighborhoodOperator for performing a matched filtering with an annulus (two concentric circles...