00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __itkDirectFourierReconstructionImageToImageFilter_h
00019 #define __itkDirectFourierReconstructionImageToImageFilter_h
00020
00021 #include "itkImageToImageFilter.h"
00022 #include "itkImage.h"
00023
00024 #include "itkVnlFFTRealToComplexConjugateImageFilter.h"
00025 #include "itkVnlFFTComplexConjugateToRealImageFilter.h"
00026
00027 #include "itkImageRegionIteratorWithIndex.h"
00028 #include "itkImageSliceConstIteratorWithIndex.h"
00029
00030 #include "itkComplexBSplineInterpolateImageFunction.h"
00031
00032 #include <math.h>
00033
00034 namespace itk
00035 {
00049 template< class TInputPixelType = double, class TOutputPixelType = double >
00050 class ITK_EXPORT DirectFourierReconstructionImageToImageFilter :
00051 public ImageToImageFilter< Image< TInputPixelType, 3 >, Image< TOutputPixelType, 3 > >
00052 {
00053 public:
00055 typedef DirectFourierReconstructionImageToImageFilter Self;
00057 typedef Image< TInputPixelType, 3 > InputImageType;
00059 typedef Image< TOutputPixelType, 3 > OutputImageType;
00060
00062 typedef ImageToImageFilter< InputImageType, OutputImageType > Superclass;
00063
00065 typedef SmartPointer< Self > Pointer;
00067 typedef SmartPointer< const Self > ConstPointer;
00068
00069 itkNewMacro( Self );
00070 itkTypeMacro( DirectFourierReconstructionImageToImageFilter, ImageToImageFilter );
00071
00073 typedef typename InputImageType::RegionType RegionType;
00075 typedef typename InputImageType::IndexType IndexType;
00077 typedef typename InputImageType::SizeType SizeType;
00079 typedef typename InputImageType::PointType PointType;
00081 typedef typename InputImageType::SpacingType SpacingType;
00082
00084 typedef typename InputImageType::ConstPointer ConstInputImagePointer;
00086 typedef typename InputImageType::Pointer InputImagePointer;
00088 typedef typename OutputImageType::Pointer OutputImagePointer;
00089
00090 itkSetMacro( ZeroPadding, unsigned short int );
00091 itkGetConstMacro( ZeroPadding, unsigned short int );
00092 itkSetMacro( OverSampling, unsigned short int );
00093 itkGetConstMacro( OverSampling, unsigned short int );
00094 itkSetMacro( Cutoff, double );
00095 itkGetConstMacro( Cutoff, double );
00096 itkSetMacro( AlphaRange, double );
00097 itkGetConstMacro( AlphaRange, double );
00098 itkSetMacro( AlphaDirection, unsigned short int );
00099 itkGetConstMacro( AlphaDirection, unsigned short int );
00100 itkSetMacro( ZDirection, unsigned short int );
00101 itkGetConstMacro( ZDirection, unsigned short int );
00102 itkSetMacro( RDirection, unsigned short int );
00103 itkGetConstMacro( RDirection, unsigned short int );
00104 itkSetMacro( RadialSplineOrder, unsigned short int );
00105 itkGetConstMacro( RadialSplineOrder, unsigned short int );
00106
00107 protected:
00109 DirectFourierReconstructionImageToImageFilter();
00111 ~DirectFourierReconstructionImageToImageFilter() {};
00112
00114 void PrintSelf( std::ostream &os, Indent indent ) const;
00115
00117 void GenerateOutputInformation();
00119 void GenerateInputRequestedRegion();
00121 void GenerateData();
00122
00123 private:
00125 typedef ImageSliceConstIteratorWithIndex< InputImageType > InputSliceIteratorType;
00126
00128 typedef VnlFFTRealToComplexConjugateImageFilter< double, 1 > FFTLineFilterType;
00130 typedef FFTLineFilterType::OutputImageType FFTLineType;
00132 typedef FFTLineFilterType::InputImageType ProjectionLineType;
00134 typedef ImageRegionIteratorWithIndex< FFTLineType > FFTLineIteratorType;
00136 typedef ComplexBSplineInterpolateImageFunction< FFTLineType, double, double > FFTLineInterpolatorType;
00137
00139 typedef VnlFFTComplexConjugateToRealImageFilter< double, 2 > IFFTSliceFilterType;
00141 typedef IFFTSliceFilterType::InputImageType FFTSliceType;
00143 typedef IFFTSliceFilterType::OutputImageType OutputSliceType;
00145 typedef ImageRegionIteratorWithIndex< FFTSliceType > FFTSliceIteratorType;
00147 typedef ImageRegionIteratorWithIndex< OutputSliceType > OutputSliceIteratorType;
00148
00149
00150 unsigned short int m_ZeroPadding;
00151 unsigned short int m_OverSampling;
00152 double m_Cutoff;
00153 double m_AlphaRange;
00154
00155 unsigned short int m_ZDirection;
00156 unsigned short int m_AlphaDirection;
00157 unsigned short int m_RDirection;
00158 unsigned short int m_RadialSplineOrder;
00159
00160 double m_PI;
00161
00162 RegionType m_InputRequestedRegion;
00163
00164 DirectFourierReconstructionImageToImageFilter(const Self&);
00165 void operator=(const Self&);
00166 };
00167
00168 }
00169
00170 #ifndef ITK_MANUAL_INSTANTIATION
00171 #include "itkDirectFourierReconstructionImageToImageFilter.txx"
00172 #endif
00173
00174 #endif
00175