Orfeo Toolbox  4.0
itkAnnulusOperator.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 __itkAnnulusOperator_h
19 #define __itkAnnulusOperator_h
20 
22 #include "itkVector.h"
23 
24 namespace itk
25 {
68 template< typename TPixel, unsigned int TDimension = 2,
69  typename TAllocator = NeighborhoodAllocator< TPixel > >
71  public NeighborhoodOperator< TPixel, TDimension, TAllocator >
72 {
73 public:
77 
79  typedef typename Superclass::SizeType SizeType;
82 
84 
86  NeighborhoodOperator< TPixel, TDimension, TAllocator >(),
87  m_InnerRadius(1.0),
88  m_Thickness( 1.0 ),
89  m_Normalize(false),
90  m_BrightCenter(false),
94  m_Spacing( 1.0 )
95  {}
96 
97  AnnulusOperator(const Self & other):
98  NeighborhoodOperator< TPixel, TDimension, TAllocator >(other),
100  m_Thickness( other.m_Thickness ),
101  m_Normalize( other.m_Normalize ),
106  m_Spacing( other.m_Spacing )
107  {
108  }
109 
112  void CreateOperator();
113 
116  void SetInnerRadius(double r)
117  { m_InnerRadius = r; }
118  double GetInnerRadius() const
119  { return m_InnerRadius; }
120 
124  void SetThickness(double t)
125  { m_Thickness = t; }
126  double GetThickness() const
127  { return m_Thickness; }
128 
132  { m_Spacing = s; }
133  const SpacingType & GetSpacing() const
134  { return m_Spacing; }
135 
138  void SetNormalize(bool b)
139  { m_Normalize = b; }
140  bool GetNormalize() const
141  { return m_Normalize; }
142  void NormalizeOn()
143  { this->SetNormalize(true); }
145  { this->SetNormalize(false); }
146 
149  void SetBrightCenter(bool b)
150  { m_BrightCenter = b; }
151  bool GetBrightCenter() const
152  { return m_BrightCenter; }
154  { this->SetBrightCenter(true); }
156  { this->SetBrightCenter(false); }
157 
162  void SetInteriorValue(TPixel v)
163  { m_InteriorValue = v; }
164  TPixel GetInteriorValue() const
165  { return m_InteriorValue; }
166  void SetAnnulusValue(TPixel v)
167  { m_AnnulusValue = v; }
168  TPixel GetAnnulusValue() const
169  { return m_AnnulusValue; }
170  void SetExteriorValue(TPixel v)
171  { m_ExteriorValue = v; }
172  TPixel GetExteriorValue() const
173  { return m_ExteriorValue; }
174 
176  Self & operator=(const Self & other)
177  {
178  if(this != &other)
179  {
180  Superclass::operator=(other);
182  m_Thickness = other.m_Thickness;
183  m_Spacing = other.m_Spacing;
187  m_Normalize = other.m_Normalize;
189  }
190  return *this;
191  }
192 
194  virtual void PrintSelf(std::ostream & os, Indent i) const
195  {
196  os << i << "AnnulusOperator { this=" << this
197  << ", m_InnerRadius = " << m_InnerRadius
198  << ", m_Thickness = " << m_Thickness
199  << ", m_Spacing = " << m_Spacing
200  << ", m_Normalize = " << m_Normalize
201  << ", m_BrightCenter = " << m_BrightCenter
202  << ", m_InteriorValue = " << m_InteriorValue
203  << ", m_ExteriorValue = " << m_ExteriorValue
204  << "}" << std::endl;
206  }
207 
208 protected:
209 
214 
217 
219  void Fill(const CoefficientVector & c);
220 
221 private:
222 
224  double m_Thickness;
231 };
232 } // namespace itk
233 
234 #ifndef ITK_MANUAL_INSTANTIATION
235 #include "itkAnnulusOperator.hxx"
236 #endif
237 #endif

Generated at Sat Mar 8 2014 14:15:05 for Orfeo Toolbox with doxygen 1.8.3.1