ITK  4.6.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< typename TInputImage, typename 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  // Begin concept checking
187  itkConceptMacro( OutputHasNumericTraitsCheck,
189  // End concept checking
190 #endif
191 
192 protected:
193 
195  {
196  m_Order.Fill(1);
197  m_Variance.Fill(0.0);
198  m_MaximumError.Fill(0.01);
200  m_UseImageSpacing = true;
201  m_NormalizeAcrossScale = false;
203  }
204 
206  void PrintSelf(std::ostream & os, Indent indent) const;
207 
214  virtual void GenerateInputRequestedRegion();
215 
221  void GenerateData();
222 
223 private:
224 
225  DiscreteGaussianDerivativeImageFilter(const Self &); //purposely not
226  // implemented
227  void operator=(const Self &); //purposely not
228  // implemented
229 
232 
236 
241 
245 
248 
251 
255 };
256 } // end namespace itk
257 
258 #ifndef ITK_MANUAL_INSTANTIATION
259 #include "itkDiscreteGaussianDerivativeImageFilter.hxx"
260 #endif
261 
262 #endif
void SetOrder(const typename OrderArrayType::ValueType v)
virtual void SetVariance(ArrayType _arg)
void PrintSelf(std::ostream &os, Indent indent) const
Base class for all process objects that output image data.
void Fill(const ValueType &)
virtual void SetOrder(OrderArrayType _arg)
FixedArray< unsigned int, itkGetStaticConstMacro(ImageDimension) > OrderArrayType
void SetMaximumError(const typename ArrayType::ValueType v)
FixedArray< double, itkGetStaticConstMacro(ImageDimension) > ArrayType
virtual void SetMaximumError(ArrayType _arg)
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Calculates image derivatives using discrete derivative gaussian kernels. This filter calculates Gauss...
#define itkConceptMacro(name, concept)