ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkSmoothingRecursiveYvvGaussianImageFilter.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 #pragma once
19 
20 #ifndef _ITK_SMOOTHING_RECURSIVE_YVV_GAUSSIAN_IMAGE_FILTER_H_
21 #define _ITK_SMOOTHING_RECURSIVE_YVV_GAUSSIAN_IMAGE_FILTER_H_
22 
24 #include "itkCastImageFilter.h"
25 #include "itkImage.h"
26 #include "itkPixelTraits.h"
27 #include "itkCommand.h"
28 #include "itkFixedArray.h"
29 
30 namespace itk
31 {
47 template< typename TInputImage,
48  typename TOutputImage = TInputImage >
50  public InPlaceImageFilter< TInputImage, TOutputImage >
51 {
52 public:
53 
59 
61  typedef TInputImage InputImageType;
62  typedef TOutputImage OutputImageType;
63  typedef typename TInputImage::PixelType PixelType;
64  #ifdef WITH_DOUBLE
67  #else
70  #endif
71 
75 
77  itkStaticConstMacro(ImageDimension, unsigned int,
78  TInputImage::ImageDimension);
79 
81  typedef FixedArray< ScalarRealType,
82  itkGetStaticConstMacro(ImageDimension) > SigmaArrayType;
83 
89  typedef typename InputImageType::template Rebind< InternalRealType >::Type RealImageType;
90 
96 
102 
104  typedef CastImageFilter<
108 
111 
114 
117 
119  typedef typename OutputImageType::Pointer OutputImagePointer;
120 
122  itkNewMacro(Self);
123 
128  void SetSigmaArray(const SigmaArrayType & sigmas);
129 
130  void SetSigma(ScalarRealType sigma);
131 
132  SigmaArrayType GetSigmaArray() const;
133 
134  ScalarRealType GetSigma() const;
135 
137  void SetNormalizeAcrossScale(bool normalizeInScaleSpace);
138 
139  itkGetConstMacro(NormalizeAcrossScale, bool);
140 
141  void SetNumberOfThreads(ThreadIdType nb);
142 
143  // See super class for doxygen documentation
144  //
145  virtual bool CanRunInPlace(void) const;
146 
147 #ifdef ITK_USE_CONCEPT_CHECKING
148 
149  itkConceptMacro( InputHasNumericTraitsCheck,
151 
153 #endif
154 protected:
157  void PrintSelf(std::ostream & os, Indent indent) const;
159 
161  void GenerateData(void);
162 
168  virtual void GenerateInputRequestedRegion() throw( InvalidRequestedRegionError );
169 
170  // Override since the filter produces the entire dataset
171  void EnlargeOutputRequestedRegion(DataObject *output);
172 
173 private:
174  SmoothingRecursiveYvvGaussianImageFilter(const Self &); //purposely not
175  // implemented
176  void operator=(const Self &); //purposely not
177  // implemented
178 
179  InternalGaussianFilterPointer m_SmoothingFilters[ImageDimension - 1];
180  FirstGaussianFilterPointer m_FirstSmoothingFilter;
181  CastingFilterPointer m_CastingFilter;
182 
184  bool m_NormalizeAcrossScale;
185 
187  SigmaArrayType m_Sigma;
188  int telltale; //TODO: REMOVE
189 };
190 } // end namespace itk
191 
192 #ifndef ITK_MANUAL_INSTANTIATION
193 #include "itkSmoothingRecursiveYvvGaussianImageFilter.hxx"
194 #endif
195 
196 #endif
1D recursive Gaussian blur based on Young-Van Vliet&#39;s algorithm, implemented for CPU.
Base class for all process objects that output image data.
InPlaceImageFilter< TInputImage, TOutputImage > Superclass
FixedArray< ScalarRealType, itkGetStaticConstMacro(ImageDimension) > SigmaArrayType
Simulate a standard C array with copy semnatics.
Definition: itkFixedArray.h:50
InputImageType::template Rebind< InternalRealType >::Type RealImageType
RecursiveLineYvvGaussianImageFilter< RealImageType, RealImageType > InternalGaussianFilterType
CastImageFilter< RealImageType, OutputImageType > CastingFilterType
Recursive Gaussian blurring filter based on Young-Van Vliet&#39;s algorithm, implemented for CPU...
RecursiveLineYvvGaussianImageFilter< InputImageType, RealImageType > FirstGaussianFilterType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Define additional traits for native types such as int or float.
TOutputImage OutputImageType
Base class for filters that take an image as input and overwrite that image as the output...
#define itkConceptMacro(name, concept)
Base class for all data objects in ITK.
Casts input pixels to output pixel type.
unsigned int ThreadIdType
Definition: itkIntTypes.h:159