ITK  5.0.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 
19 #ifndef itkSmoothingRecursiveYvvGaussianImageFilter_h
20 #define itkSmoothingRecursiveYvvGaussianImageFilter_h
21 
23 #include "itkCastImageFilter.h"
24 #include "itkImage.h"
25 #include "itkPixelTraits.h"
26 #include "itkCommand.h"
27 #include "itkFixedArray.h"
28 
29 namespace itk
30 {
46 template< typename TInputImage,
47  typename TOutputImage = TInputImage >
49  public InPlaceImageFilter< TInputImage, TOutputImage >
50 {
51 public:
52  ITK_DISALLOW_COPY_AND_ASSIGN(SmoothingRecursiveYvvGaussianImageFilter);
54 
60 
62  using InputImageType = TInputImage;
63  using OutputImageType = TOutputImage;
64  using PixelType = typename TInputImage::PixelType;
65  #ifdef WITH_DOUBLE
68  #else
71  #endif
72 
76 
78  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
79 
82  itkGetStaticConstMacro(ImageDimension) >;
83 
89  using RealImageType = typename InputImageType::template Rebind< InternalRealType >::Type;
90 
96 
102 
104  typedef CastImageFilter<
108 
111 
114 
117 
119  using OutputImagePointer = typename OutputImageType::Pointer;
120 
122  itkNewMacro(Self);
123 
128  void SetSigmaArray(const SigmaArrayType & sigmas);
129  void SetSigma(ScalarRealType sigma);
130  SigmaArrayType GetSigmaArray() const;
131  ScalarRealType GetSigma() const;
133 
135  void SetNormalizeAcrossScale(bool normalizeInScaleSpace);
136  itkGetConstMacro(NormalizeAcrossScale, bool);
138 
139  void SetNumberOfWorkUnits(ThreadIdType nb) override;
140 
141  bool CanRunInPlace(void) const override;
142 
143 #ifdef ITK_USE_CONCEPT_CHECKING
144 
145  itkConceptMacro( InputHasNumericTraitsCheck,
147 
149 #endif
150 protected:
153  void PrintSelf(std::ostream & os, Indent indent) const override;
155 
157  void GenerateData(void) override;
158 
164  void GenerateInputRequestedRegion() throw( InvalidRequestedRegionError ) override;
165 
166  // Override since the filter produces the entire dataset
167  void EnlargeOutputRequestedRegion(DataObject *output) override;
168 
169 private:
170  InternalGaussianFilterPointer m_SmoothingFilters[ImageDimension - 1];
171  FirstGaussianFilterPointer m_FirstSmoothingFilter;
172  CastingFilterPointer m_CastingFilter;
173 
175  bool m_NormalizeAcrossScale;
176 
178  SigmaArrayType m_Sigma;
179 };
180 } // end namespace itk
181 
182 #ifndef ITK_MANUAL_INSTANTIATION
183 #include "itkSmoothingRecursiveYvvGaussianImageFilter.hxx"
184 #endif
185 
186 #endif
1D recursive Gaussian blur based on Young-Van Vliet&#39;s algorithm, implemented for CPU.
typename OutputImageType::Pointer OutputImagePointer
Define numeric traits for std::vector.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename NumericTraits< PixelType >::FloatType InternalRealType
Base class for all process objects that output image data.
typename InternalGaussianFilterType::Pointer InternalGaussianFilterPointer
RecursiveLineYvvGaussianImageFilter< RealImageType, RealImageType > InternalGaussianFilterType
typename InputImageType::template Rebind< InternalRealType >::Type RealImageType
CastImageFilter< RealImageType, OutputImageType > CastingFilterType
Recursive Gaussian blurring filter based on Young-Van Vliet&#39;s algorithm, implemented for CPU...
TOutputImage OutputImageType
RecursiveLineYvvGaussianImageFilter< InputImageType, RealImageType > FirstGaussianFilterType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
typename NumericTraits< PixelType >::FloatType ScalarRealType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
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.