ITK  4.9.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 &) ITK_DELETE_FUNCTION;
135  void operator=(const Self &) ITK_DELETE_FUNCTION;
136 
137  // special binary functor to perform A+B*ConstValue
138  //
139  // Where A is the cumulativeImage, B is the last filter, and
140  // ConstValue is the spacing scalling
142  {
143  public:
144  typedef AddMultConstFunctor Self;
145 
146  AddMultConstFunctor( void ) : m_Value( NumericTraits<PixelType>::OneValue() ) {}
147 
148  bool operator!=( const Self &other ) const { return !(*this==other); }
149  bool operator==( const Self &other ) const { return m_Value == other.m_Value; }
150 
152  {
153  return static_cast<InternalRealType>( a + b*m_Value );
154  }
155 
157  };
158 
161 
164 };
165 } // end namespace itk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 #include "itkLaplacianRecursiveGaussianImageFilter.hxx"
169 #endif
170 
171 #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