ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkDiscreteGaussianDerivativeImageFilter.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 __itkDiscreteGaussianDerivativeImageFilter_h
19 #define __itkDiscreteGaussianDerivativeImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 #include "itkImage.h"
23 
24 namespace itk
25 {
59 template< class TInputImage, class TOutputImage >
61  public ImageToImageFilter< TInputImage, TOutputImage >
62 {
63 public:
69 
71  itkNewMacro(Self);
72 
75 
77  typedef TInputImage InputImageType;
78  typedef TOutputImage OutputImageType;
79 
82  typedef typename TOutputImage::PixelType OutputPixelType;
83  typedef typename TOutputImage::InternalPixelType OutputInternalPixelType;
84  typedef typename TInputImage::PixelType InputPixelType;
85  typedef typename TInputImage::InternalPixelType InputInternalPixelType;
86 
89  itkStaticConstMacro(ImageDimension, unsigned int,
90  TOutputImage::ImageDimension);
91 
94 
97 
101  itkSetMacro(Order, OrderArrayType);
102  itkGetConstMacro(Order, const OrderArrayType);
104 
111  itkSetMacro(Variance, ArrayType);
112  itkGetConstMacro(Variance, const ArrayType);
114 
118  itkSetMacro(MaximumError, ArrayType);
119  itkGetConstMacro(MaximumError, const ArrayType);
121 
124  itkGetConstMacro(MaximumKernelWidth, int);
125  itkSetMacro(MaximumKernelWidth, int);
127 
137  itkSetMacro(InternalNumberOfStreamDivisions, unsigned int);
138  itkGetConstMacro(InternalNumberOfStreamDivisions, unsigned int);
139 
144  void SetOrder(const typename OrderArrayType::ValueType v)
145  {
146  OrderArrayType a;
147 
148  a.Fill(v);
149  this->SetOrder(a);
150  }
151 
152  void SetVariance(const typename ArrayType::ValueType v)
153  {
154  ArrayType a;
155 
156  a.Fill(v);
157  this->SetVariance(a);
158  }
159 
160  void SetMaximumError(const typename ArrayType::ValueType v)
161  {
162  ArrayType a;
163 
164  a.Fill(v);
165  this->SetMaximumError(a);
166  }
167 
172  itkSetMacro(UseImageSpacing, bool);
173  itkGetConstMacro(UseImageSpacing, bool);
174  itkBooleanMacro(UseImageSpacing);
176 
180  itkSetMacro(NormalizeAcrossScale, bool);
181  itkGetConstMacro(NormalizeAcrossScale, bool);
182  itkBooleanMacro(NormalizeAcrossScale);
184 
185 #ifdef ITK_USE_CONCEPT_CHECKING
186 
187  itkConceptMacro( OutputHasNumericTraitsCheck,
189 
191 #endif
192 protected:
193 
195  {
196  m_Order.Fill(1);
197  m_Variance.Fill(0.0);
198  m_MaximumError.Fill(0.01);
199  m_MaximumKernelWidth = 32;
200  m_UseImageSpacing = true;
201  m_NormalizeAcrossScale = false;
202  m_InternalNumberOfStreamDivisions = ImageDimension * ImageDimension;
203  }
204 
206  void PrintSelf(std::ostream & os, Indent indent) const;
207 
214  virtual void GenerateInputRequestedRegion()
216 
222  void GenerateData();
223 
224 private:
225 
226  DiscreteGaussianDerivativeImageFilter(const Self &); //purposely not
227  // implemented
228  void operator=(const Self &); //purposely not
229  // implemented
230 
232  OrderArrayType m_Order;
233 
236  ArrayType m_Variance;
237 
241  ArrayType m_MaximumError;
242 
245  int m_MaximumKernelWidth;
246 
248  bool m_UseImageSpacing;
249 
251  bool m_NormalizeAcrossScale;
252 
255  unsigned int m_InternalNumberOfStreamDivisions;
256 };
257 } // end namespace itk
258 
259 #ifndef ITK_MANUAL_INSTANTIATION
260 #include "itkDiscreteGaussianDerivativeImageFilter.hxx"
261 #endif
262 
263 #endif
264