forked from InsightSoftwareConsortium/ITK
-
Notifications
You must be signed in to change notification settings - Fork 0
/
itkFFTWRealToComplexConjugateImageFilter.h
100 lines (82 loc) · 3.2 KB
/
itkFFTWRealToComplexConjugateImageFilter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
/*=========================================================================
Program: Insight Segmentation & Registration Toolkit
Module: itkFFTWRealToComplexConjugateImageFilter.h
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) 2002 Insight Consortium. All rights reserved.
See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#ifndef __itkFFTWRealToComplexConjugateImageFilter_h
#define __itkFFTWRealToComplexConjugateImageFilter_h
#include "itkFFTRealToComplexConjugateImageFilter.h"
#include "itkFFTWCommon.h"
namespace itk
{
/** /class FFTWRealToComplexConjugateImageFilter
* /brief
*
* \ingroup
*/
template <class TPixel, unsigned int Dimension = 3>
class ITK_EXPORT FFTWRealToComplexConjugateImageFilter :
public FFTRealToComplexConjugateImageFilter<TPixel,Dimension>
{
public:
typedef FFTWRealToComplexConjugateImageFilter Self;
typedef FFTRealToComplexConjugateImageFilter<TPixel,Dimension> Superclass;
typedef SmartPointer<Self> Pointer;
typedef SmartPointer<const Self> constPointer;
/** Standard class typedefs.*/
typedef typename Superclass::TInputImageType TInputImageType;
typedef typename Superclass::TOutputImageType TOutputImageType;
/**
* the proxy type is a wrapper for the fftw API
* since the proxy is only defined over double and float,
* trying to use any other pixel type is inoperative, as
* is trying to use double if only the float FFTW version is
* configured in, or float if only double is configured.
*/
typedef typename fftw::Proxy<TPixel> FFTWProxyType;
/** Method for creation through the object factory. */
itkNewMacro(Self);
/** Run-time type information (and related methods). */
itkTypeMacro(FFTWRealToComplexConjugateImageFilter,
FFTRealToComplexConjugateImageFilter);
//
// these should be defined in every FFT filter class
virtual void GenerateData(); // generates output from input
protected:
FFTWRealToComplexConjugateImageFilter() : m_PlanComputed(false),
m_LastImageSize(0),
m_InputBuffer(0),
m_OutputBuffer(0)
{
}
~FFTWRealToComplexConjugateImageFilter()
{
if(m_PlanComputed)
{
FFTWProxyType::DestroyPlan(this->m_Plan);
delete [] this->m_InputBuffer;
delete [] this->m_OutputBuffer;
}
}
virtual bool FullMatrix();
private:
FFTWRealToComplexConjugateImageFilter(const Self&); //purposely not implemented
void operator=(const Self&); //purposely not implemented
bool m_PlanComputed;
typename FFTWProxyType::PlanType m_Plan;
unsigned int m_LastImageSize;
TPixel *m_InputBuffer;
typename FFTWProxyType::ComplexType *m_OutputBuffer;
};
} // namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
#include "itkFFTWRealToComplexConjugateImageFilter.txx"
#endif
#endif //__itkFFTWRealToComplexConjugateImageFilter_h