![]() |
ITK
4.2.0
Insight Segmentation and Registration Toolkit
|
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 __itkIterativeDeconvolutionImageFilter_h 00019 #define __itkIterativeDeconvolutionImageFilter_h 00020 00021 #include "itkFFTConvolutionImageFilter.h" 00022 #include "itkProgressAccumulator.h" 00023 00024 namespace itk 00025 { 00050 template< class TInputImage, class TKernelImage=TInputImage, class TOutputImage=TInputImage, class TInternalPrecision=double > 00051 class ITK_EXPORT IterativeDeconvolutionImageFilter : 00052 public FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision > 00053 { 00054 public: 00056 typedef IterativeDeconvolutionImageFilter Self; 00057 typedef FFTConvolutionImageFilter< TInputImage, 00058 TKernelImage, 00059 TOutputImage, 00060 TInternalPrecision > Superclass; 00061 typedef SmartPointer< Self > Pointer; 00062 typedef SmartPointer< const Self > ConstPointer; 00063 00065 typedef TInputImage InputImageType; 00066 typedef TKernelImage KernelImageType; 00067 typedef TOutputImage OutputImageType; 00068 00070 typedef typename Superclass::InternalImageType InternalImageType; 00071 typedef typename Superclass::InternalImagePointerType InternalImagePointerType; 00072 typedef typename Superclass::InternalComplexType InternalComplexType; 00073 typedef typename Superclass::InternalComplexImageType InternalComplexImageType; 00074 typedef typename Superclass::InternalComplexImagePointerType InternalComplexImagePointerType; 00075 00077 itkTypeMacro(IterativeDeconvolutionImageFilter, ConvolutionImageFilterBase); 00078 00080 itkSetMacro(NumberOfIterations, unsigned int); 00081 itkGetMacro(NumberOfIterations, unsigned int); 00083 00085 itkGetConstObjectMacro(CurrentEstimate, InternalImageType); 00086 00089 void SetStopIteration(bool stop) 00090 { 00091 // Don't call Modified() to avoid triggering a new update. 00092 m_StopIteration = stop; 00093 } 00094 itkGetConstMacro(StopIteration, bool); 00096 00098 itkGetConstMacro(Iteration, unsigned int); 00099 00100 protected: 00101 IterativeDeconvolutionImageFilter(); 00102 virtual ~IterativeDeconvolutionImageFilter(); 00103 00105 virtual void Initialize(ProgressAccumulator * progress, 00106 float progressWeight, 00107 float iterationProgressWeight); 00108 00110 virtual void Iteration(ProgressAccumulator * itkNotUsed(progress), 00111 float itkNotUsed(iterationProgressWeight)) = 0; 00112 00114 virtual void Finish(ProgressAccumulator * progress, 00115 float progressWeight); 00116 00124 virtual void GenerateInputRequestedRegion(); 00125 00128 virtual void GenerateData(); 00129 00131 InternalComplexImagePointerType m_TransferFunction; 00132 00134 InternalImagePointerType m_CurrentEstimate; 00135 00136 typedef typename Superclass::FFTFilterType FFTFilterType; 00137 typedef typename Superclass::IFFTFilterType IFFTFilterType; 00138 00139 virtual void PrintSelf(std::ostream & os, Indent indent) const; 00140 00141 private: 00142 IterativeDeconvolutionImageFilter(const Self &); // purposely not implemented 00143 void operator=(const Self &); // purposely not implemented 00144 00146 unsigned int m_NumberOfIterations; 00147 00149 unsigned int m_Iteration; 00150 00152 bool m_StopIteration; 00153 00155 unsigned long m_InputMTime; 00156 unsigned long m_KernelMTime; 00157 00158 }; 00159 } // end namespace itk 00160 00161 #ifndef ITK_MANUAL_INSTANTIATION 00162 #include "itkIterativeDeconvolutionImageFilter.hxx" 00163 #endif 00164 00165 #endif 00166
1.7.6.1