ITK  4.2.0
Insight Segmentation and Registration Toolkit
itkRichardsonLucyDeconvolutionImageFilter.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkRichardsonLucyDeconvolutionImageFilter_h
00019 #define __itkRichardsonLucyDeconvolutionImageFilter_h
00020 
00021 #include "itkIterativeDeconvolutionImageFilter.h"
00022 
00023 #include "itkComplexConjugateImageAdaptor.h"
00024 #include "itkDivideOrZeroOutImageFilter.h"
00025 #include "itkMultiplyImageFilter.h"
00026 
00027 namespace itk
00028 {
00058 template< class TInputImage, class TKernelImage=TInputImage, class TOutputImage=TInputImage, class TInternalPrecision=double >
00059 class ITK_EXPORT RichardsonLucyDeconvolutionImageFilter :
00060     public IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
00061 {
00062 public:
00064   typedef RichardsonLucyDeconvolutionImageFilter                  Self;
00065   typedef IterativeDeconvolutionImageFilter< TInputImage,
00066                                              TKernelImage,
00067                                              TOutputImage,
00068                                              TInternalPrecision > Superclass;
00069   typedef SmartPointer< Self >                                    Pointer;
00070   typedef SmartPointer< const Self >                              ConstPointer;
00071 
00073   typedef TInputImage  InputImageType;
00074   typedef TKernelImage KernelImageType;
00075   typedef TOutputImage OutputImageType;
00076 
00078   typedef typename Superclass::InternalImageType               InternalImageType;
00079   typedef typename Superclass::InternalImagePointerType        InternalImagePointerType;
00080   typedef typename Superclass::InternalComplexType             InternalComplexType;
00081   typedef typename Superclass::InternalComplexImageType        InternalComplexImageType;
00082   typedef typename Superclass::InternalComplexImagePointerType InternalComplexImagePointerType;
00083 
00085   itkNewMacro(Self);
00086 
00088   itkTypeMacro(RichardsonLucyDeconvolutionImageFilter,
00089                IterativeDeconvolutionImageFilter);
00090 
00091 protected:
00092   RichardsonLucyDeconvolutionImageFilter();
00093   virtual ~RichardsonLucyDeconvolutionImageFilter();
00094 
00095   virtual void Initialize(ProgressAccumulator * progress,
00096                           float progressWeight,
00097                           float iterationProgressWeight);
00098 
00099   virtual void Iteration(ProgressAccumulator * progress,
00100                          float iterationProgressWeight);
00101 
00102   virtual void Finish(ProgressAccumulator *progress, float progressWeight);
00103 
00104   typedef typename Superclass::FFTFilterType  FFTFilterType;
00105   typedef typename Superclass::IFFTFilterType IFFTFilterType;
00106 
00107   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00108 
00109 private:
00110   RichardsonLucyDeconvolutionImageFilter(const Self &); // purposely not implemented
00111   void operator=(const Self &);                         // purposely not implemented
00112 
00114   typedef MultiplyImageFilter< InternalImageType >                 MultiplyFilterType;
00115   typedef MultiplyImageFilter< InternalComplexImageType >          ComplexMultiplyType;
00116   typedef DivideOrZeroOutImageFilter< InternalImageType >          DivideFilterType;
00117   typedef ComplexConjugateImageAdaptor< InternalComplexImageType > ConjugateAdaptorType;
00118   typedef MultiplyImageFilter< InternalComplexImageType,
00119                                ConjugateAdaptorType,
00120                                InternalComplexImageType >          ComplexConjugateMultiplyType;
00121 
00122   InternalImagePointerType m_PaddedInput;
00123 
00124   typename ComplexMultiplyType::Pointer           m_ComplexMultiplyFilter1;
00125   typename IFFTFilterType::Pointer                m_IFFTFilter1;
00126   typename DivideFilterType::Pointer              m_DivideFilter;
00127   typename FFTFilterType::Pointer                 m_FFTFilter;
00128   typename ConjugateAdaptorType::Pointer          m_ConjugateAdaptor;
00129   typename ComplexConjugateMultiplyType::Pointer  m_ComplexMultiplyFilter2;
00130   typename IFFTFilterType::Pointer                m_IFFTFilter2;
00131   typename MultiplyFilterType::Pointer            m_MultiplyFilter;
00132 };
00133 } // end namespace itk
00134 
00135 #ifndef ITK_MANUAL_INSTANTIATION
00136 #include "itkRichardsonLucyDeconvolutionImageFilter.hxx"
00137 #endif
00138 
00139 #endif
00140