ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkLaplacianRecursiveGaussianImageFilter.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 itkLaplacianRecursiveGaussianImageFilter_h
19 #define itkLaplacianRecursiveGaussianImageFilter_h
20 
22 #include "itkImage.h"
23 #include "itkCommand.h"
24 
25 namespace itk
26 {
42 template< typename TInputImage,
43  typename TOutputImage = TInputImage >
45  public ImageToImageFilter< TInputImage, TOutputImage >
46 {
47 public:
53 
55  typedef TInputImage InputImageType;
56  typedef typename InputImageType::PixelType PixelType;
57 
59  itkStaticConstMacro(ImageDimension, unsigned int,
60  TInputImage::ImageDimension);
61 
62  itkStaticConstMacro(NumberOfSmoothingFilters ,unsigned int, ImageDimension - 1);
63 
65 
69  typedef float InternalRealType;
70  typedef Image< InternalRealType,
71  itkGetStaticConstMacro(ImageDimension) > RealImageType;
72 
78 
84 
87 
90 
92  typedef typename TOutputImage::Pointer OutputImagePointer;
93 
95  typedef TOutputImage OutputImageType;
96  typedef typename OutputImageType::PixelType OutputPixelType;
97 
98 
102 
104  itkNewMacro(Self);
105 
109 
111  void SetSigma(RealType sigma);
112  RealType GetSigma() const;
114 
118  void SetNormalizeAcrossScale(bool normalizeInScaleSpace);\
119  itkGetConstMacro(NormalizeAcrossScale, bool);
121 
122 protected:
125  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
126 
128  void GenerateData(void) ITK_OVERRIDE;
129 
130  // Override since the filter produces the entire dataset
131  void EnlargeOutputRequestedRegion(DataObject *output) ITK_OVERRIDE;
132 
133 private:
134  LaplacianRecursiveGaussianImageFilter(const Self &); //purposely not
135  // implemented
136  void operator=(const Self &); //purposely not
137  // implemented
138 
139  // special binary functor to perform A+B*ConstValue
140  //
141  // Where A is the cumulativeImage, B is the last filter, and
142  // ConstValue is the spacing scalling
144  {
145  public:
146  typedef AddMultConstFunctor Self;
147 
148  AddMultConstFunctor( void ) : m_Value( NumericTraits<PixelType>::OneValue() ) {}
149 
150  bool operator!=( const Self &other ) const { return !(*this==other); }
151  bool operator==( const Self &other ) const { return m_Value == other.m_Value; }
152 
154  {
155  return static_cast<InternalRealType>( a + b*m_Value );
156  }
157 
159  };
160 
163 
166 };
167 } // end namespace itk
168 
169 #ifndef ITK_MANUAL_INSTANTIATION
170 #include "itkLaplacianRecursiveGaussianImageFilter.hxx"
171 #endif
172 
173 #endif
void SetNormalizeAcrossScale(bool normalizeInScaleSpace)
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
Computes the Laplacian of Gaussian (LoG) of an image.
Base class for all process objects that output image data.
RecursiveGaussianImageFilter< RealImageType, RealImageType > GaussianFilterType
ImageToImageFilter< TInputImage, TOutputImage > Superclass
A Command subclass that calls a pointer to a member function.
Definition: itkCommand.h:85
void EnlargeOutputRequestedRegion(DataObject *output) override
RecursiveGaussianImageFilter< InputImageType, RealImageType > DerivativeFilterType
void PrintSelf(std::ostream &os, Indent indent) const override
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.
Image< InternalRealType, itkGetStaticConstMacro(ImageDimension) > RealImageType
Base class for all data objects in ITK.
GaussianFilterPointer m_SmoothingFilters[NumberOfSmoothingFilters]
Templated n-dimensional image class.
Definition: itkImage.h:75
InternalRealType operator()(const InternalRealType &a, const InternalRealType &b) const