ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkHessianRecursiveGaussianImageFilter.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 itkHessianRecursiveGaussianImageFilter_h
19 #define itkHessianRecursiveGaussianImageFilter_h
20 
23 #include "itkImage.h"
25 #include "itkPixelTraits.h"
26 
27 namespace itk
28 {
41 // NOTE that the typename macro has to be used here in lieu
42 // of "typename" because VC++ doesn't like the typename keyword
43 // on the defaults of template parameters
44 template< typename TInputImage,
45  typename TOutputImage = Image< SymmetricSecondRankTensor<
46  typename NumericTraits< typename TInputImage::PixelType >::RealType,
47  TInputImage::ImageDimension >,
48  TInputImage::ImageDimension > >
49 class ITK_TEMPLATE_EXPORT HessianRecursiveGaussianImageFilter:
50  public ImageToImageFilter< TInputImage, TOutputImage >
51 {
52 public:
58 
60  typedef TInputImage InputImageType;
61  typedef typename TInputImage::PixelType PixelType;
63 
65  itkStaticConstMacro(ImageDimension, unsigned int,
66  TInputImage::ImageDimension);
67 
69  itkStaticConstMacro(NumberOfSmoothingFilters, unsigned int,
70  TInputImage::ImageDimension > 2 ? TInputImage::ImageDimension - 2 : 0);
71 
76  typedef float InternalRealType;
79 
84  typedef NthElementImageAdaptor< TOutputImage,
86 
88 
94 
100 
105 
108  typedef std::vector< GaussianFilterPointer > GaussianFiltersArray;
109 
113 
115  typedef typename TOutputImage::Pointer OutputImagePointer;
116 
118  typedef TOutputImage OutputImageType;
119  typedef typename OutputImageType::PixelType OutputPixelType;
121 
124 
126  itkNewMacro(Self);
127 
129  void SetSigma(RealType sigma);
130  RealType GetSigma() const;
132 
136  void SetNormalizeAcrossScale(bool normalizeInScaleSpace);
137  itkGetConstMacro(NormalizeAcrossScale, bool);
139 
145  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
146 
147 #ifdef ITK_USE_CONCEPT_CHECKING
148  // Begin concept checking
149  itkConceptMacro( InputHasNumericTraitsCheck,
151  itkConceptMacro( OutputHasPixelTraitsCheck,
153  // End concept checking
154 #endif
155 
156 protected:
157 
159  virtual ~HessianRecursiveGaussianImageFilter() ITK_OVERRIDE {}
160  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
161 
163  void GenerateData(void) ITK_OVERRIDE;
164 
165  // Override since the filter produces the entire dataset
166  void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
167 
168 private:
169 
170  ITK_DISALLOW_COPY_AND_ASSIGN(HessianRecursiveGaussianImageFilter);
171 
172  GaussianFiltersArray m_SmoothingFilters;
173  DerivativeFilterAPointer m_DerivativeFilterA;
174  DerivativeFilterBPointer m_DerivativeFilterB;
176 
178  bool m_NormalizeAcrossScale;
179 };
180 } // end namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkHessianRecursiveGaussianImageFilter.hxx"
184 #endif
185 
186 #endif
TPixelType::ValueType ValueType
RecursiveGaussianImageFilter< InputImageType, RealImageType > DerivativeFilterAType
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Base class for all process objects that output image data.
PixelTraits< OutputPixelType >::ValueType OutputComponentType
RecursiveGaussianImageFilter< RealImageType, RealImageType > DerivativeFilterBType
Computes the Hessian matrix of an image by convolution with the Second and Cross derivatives of a Gau...
Presents an image as being composed of the N-th element of its pixels.
NthElementImageAdaptor< TOutputImage, InternalRealType > OutputImageAdaptorType
Image< InternalRealType, TInputImage::ImageDimension > RealImageType
RecursiveGaussianImageFilter< RealImageType, RealImageType > GaussianFilterType
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
Define additional traits for native types such as int or float.
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
Templated n-dimensional image class.
Definition: itkImage.h:75