ITK  4.1.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 >
00059 class ITK_EXPORT RichardsonLucyDeconvolutionImageFilter :
00060     public IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >
00061 {
00062 public:
00064   typedef RichardsonLucyDeconvolutionImageFilter            Self;
00065   typedef IterativeDeconvolutionImageFilter< TInputImage,
00066                                              TKernelImage,
00067                                              TOutputImage > Superclass;
00068   typedef SmartPointer< Self >                              Pointer;
00069   typedef SmartPointer< const Self >                        ConstPointer;
00070 
00072   typedef TInputImage  InputImageType;
00073   typedef TKernelImage KernelImageType;
00074   typedef TOutputImage OutputImageType;
00075 
00077   typedef typename Superclass::InternalImageType               InternalImageType;
00078   typedef typename Superclass::InternalImagePointerType        InternalImagePointerType;
00079   typedef typename Superclass::InternalComplexType             InternalComplexType;
00080   typedef typename Superclass::InternalComplexImageType        InternalComplexImageType;
00081   typedef typename Superclass::InternalComplexImagePointerType InternalComplexImagePointerType;
00082 
00084   itkNewMacro(Self);
00085 
00087   itkTypeMacro(RichardsonLucyDeconvolutionImageFilter,
00088                IterativeDeconvolutionImageFilter);
00089 
00090 protected:
00091   RichardsonLucyDeconvolutionImageFilter();
00092   virtual ~RichardsonLucyDeconvolutionImageFilter();
00093 
00094   virtual void Initialize(ProgressAccumulator * progress,
00095                           float progressWeight,
00096                           float iterationProgressWeight);
00097 
00098   virtual void Iteration(ProgressAccumulator * progress,
00099                          float iterationProgressWeight);
00100 
00101   virtual void Finish(ProgressAccumulator *progress, float progressWeight);
00102 
00103   typedef typename Superclass::FFTFilterType  FFTFilterType;
00104   typedef typename Superclass::IFFTFilterType IFFTFilterType;
00105 
00106   virtual void PrintSelf(std::ostream & os, Indent indent) const;
00107 
00108 private:
00109   RichardsonLucyDeconvolutionImageFilter(const Self &); // purposely not implemented
00110   void operator=(const Self &);                         // purposely not implemented
00111 
00113   typedef MultiplyImageFilter< InternalImageType >                 MultiplyFilterType;
00114   typedef MultiplyImageFilter< InternalComplexImageType >          ComplexMultiplyType;
00115   typedef DivideOrZeroOutImageFilter< InternalImageType >          DivideFilterType;
00116   typedef ComplexConjugateImageAdaptor< InternalComplexImageType > ConjugateAdaptorType;
00117   typedef MultiplyImageFilter< InternalComplexImageType,
00118                                ConjugateAdaptorType,
00119                                InternalComplexImageType >          ComplexConjugateMultiplyType;
00120 
00121   InternalImagePointerType m_PaddedInput;
00122 
00123   typename ComplexMultiplyType::Pointer           m_ComplexMultiplyFilter1;
00124   typename IFFTFilterType::Pointer                m_IFFTFilter1;
00125   typename DivideFilterType::Pointer              m_DivideFilter;
00126   typename FFTFilterType::Pointer                 m_FFTFilter;
00127   typename ConjugateAdaptorType::Pointer          m_ConjugateAdaptor;
00128   typename ComplexConjugateMultiplyType::Pointer  m_ComplexMultiplyFilter2;
00129   typename IFFTFilterType::Pointer                m_IFFTFilter2;
00130   typename MultiplyFilterType::Pointer            m_MultiplyFilter;
00131 };
00132 } // end namespace itk
00133 
00134 #ifndef ITK_MANUAL_INSTANTIATION
00135 #include "itkRichardsonLucyDeconvolutionImageFilter.hxx"
00136 #endif
00137 
00138 #endif
00139