19 #ifndef rtkFFTProjectionsConvolutionImageFilter_h 20 #define rtkFFTProjectionsConvolutionImageFilter_h 25 #include "rtkConfiguration.h" 44 template <
class TInputImage,
class TOutputImage,
class TFFTPrecision>
61 using IndexType =
typename InputImageType::IndexType;
62 using SizeType =
typename InputImageType::SizeType;
71 static constexpr
unsigned int ImageDimension = TOutputImage::ImageDimension;
74 #ifdef itkOverrideGetNameOfClassMacro 94 itkGetConstMacro(GreatestPrimeFactor,
int);
101 itkGetConstMacro(TruncationCorrection,
double);
112 if (m_ZeroPadFactors != _arg)
114 m_ZeroPadFactors = _arg;
115 m_ZeroPadFactors[0] = std::max(m_ZeroPadFactors[0], 1);
116 m_ZeroPadFactors[1] = std::max(m_ZeroPadFactors[1], 1);
117 m_ZeroPadFactors[0] = std::min(m_ZeroPadFactors[0], 2);
118 m_ZeroPadFactors[1] = std::min(m_ZeroPadFactors[1], 2);
124 #ifdef ITK_USE_CONCEPT_CHECKING 133 GenerateInputRequestedRegion()
override;
136 BeforeThreadedGenerateData()
override;
139 AfterThreadedGenerateData()
override;
148 virtual FFTInputImagePointer
149 PadInputImageRegion(
const RegionType & inputRegion);
151 GetPaddedImageRegion(
const RegionType & inputRegion);
155 PrintSelf(std::ostream & os,
itk::Indent indent)
const override;
166 UpdateFFTProjectionsConvolutionKernel(
const SizeType size) = 0;
174 UpdateTruncationMirrorWeights();
179 int m_KernelDimension{ 1 };
190 double m_TruncationCorrection{ 0. };
192 GetTruncationCorrectionExtent();
203 int m_GreatestPrimeFactor{ 2 };
204 int m_BackupNumberOfThreads{ 1 };
209 #ifndef ITK_MANUAL_INSTANTIATION 210 # include "rtkFFTProjectionsConvolutionImageFilter.hxx" Base class for 1D or 2D FFT based convolution of projections.
typename InputImageType::SizeType SizeType
ITKCommon_EXPORT bool IsPrime(unsigned int n)
typename InputImageType::RegionType RegionType
TInputImage InputImageType
std::vector< TFFTPrecision > m_TruncationMirrorWeights
#define itkSetMacro(name, type)
typename FFTInputImageType::Pointer FFTInputImagePointer
TOutputImage OutputImageType
typename InputImageType::IndexType IndexType
typename itk::Image< TFFTPrecision, TInputImage::ImageDimension > FFTInputImageType
ITKCommon_EXPORT unsigned int GreatestPrimeFactor(unsigned int n)
FFTOutputImagePointer m_KernelFFT
virtual void SetZeroPadFactors(ZeroPadFactorsType _arg)
typename FFTOutputImageType::Pointer FFTOutputImagePointer
unsigned int ThreadIdType
#define itkConceptMacro(name, concept)
ZeroPadFactorsType m_ZeroPadFactors
typename itk::Image< std::complex< TFFTPrecision >, TInputImage::ImageDimension > FFTOutputImageType