ITK  4.3.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 
193 protected:
194 
196  {
197  m_Order.Fill(1);
198  m_Variance.Fill(0.0);
199  m_MaximumError.Fill(0.01);
200  m_MaximumKernelWidth = 32;
201  m_UseImageSpacing = true;
202  m_NormalizeAcrossScale = false;
203  m_InternalNumberOfStreamDivisions = ImageDimension * ImageDimension;
204  }
205 
207  void PrintSelf(std::ostream & os, Indent indent) const;
208 
215  virtual void GenerateInputRequestedRegion()
217 
223  void GenerateData();
224 
225 private:
226 
227  DiscreteGaussianDerivativeImageFilter(const Self &); //purposely not
228  // implemented
229  void operator=(const Self &); //purposely not
230  // implemented
231 
233  OrderArrayType m_Order;
234 
237  ArrayType m_Variance;
238 
242  ArrayType m_MaximumError;
243 
246  int m_MaximumKernelWidth;
247 
249  bool m_UseImageSpacing;
250 
252  bool m_NormalizeAcrossScale;
253 
256  unsigned int m_InternalNumberOfStreamDivisions;
257 };
258 } // end namespace itk
259 
260 #ifndef ITK_MANUAL_INSTANTIATION
261 #include "itkDiscreteGaussianDerivativeImageFilter.hxx"
262 #endif
263 
264 #endif
265