I am seeking the working example for the forward and inverse FFT in two dimension. At the present moment I am trying to understand the thread : Inverse FFT for 2D histogram question
but receiving the following error :
/media/dsiwal/DSIWAL/RadonTransform_Imaging/./2DFFTCut.c:49:46: error: only the first dimension of an allocated array may have dynamic size
Double_t *re_full = new Double_t[nBins[0]][nBins[1]];
/media/dsiwal/DSIWAL/RadonTransform_Imaging/./2DFFTCut.c:50:46: error: only the first dimension of an allocated array may have dynamic size
Double_t *im_full = new Double_t[nBins[0]][nBins[1]];
TVirtualFFT *fft_back = TVirtualFFT::FFT(nDims, nBins, “C2R M K”);
fft_back->SetPointsComplex(re_full,im_full);
fft_back->Transform();
But getting following error, seeing help…
././FFT2D.C:153:8: error: no matching member function for call to ‘GetPointsComplex’
fft->GetPointsComplex(re_full, im_full);
/home/dsiwal/softwares/root_build/include/TVirtualFFT.h:115:23: note: candidate function not viable: no known conversion from 'double **' to
'Double_t *' (aka 'double *') for 1st argument; dereference the argument
with *
virtual void GetPointsComplex(Double_t *data, Bool_t fromInput ...
^
/home/dsiwal/softwares/root_build/include/TVirtualFFT.h:114:23: note: candidate function not viable: no known conversion from 'double **' to
'Double_t *' (aka 'double *') for 1st argument; dereference the argument
with *
virtual void GetPointsComplex(Double_t *re, Double_t *im, Bool_...
^
In file included from input_line_12:6:
././FFT2D.C:156:30: error: cannot initialize a parameter of type 'const Double_t *' (aka 'const double *')
with an lvalue of type 'double **'
fft_back->SetPointsComplex(re_full,im_full);
^~~~~~~
/home/dsiwal/softwares/root_build/include/TVirtualFFT.h:121:56: note: passing argument to parameter 're' here
virtual void SetPointsComplex(const Double_t *re, const Double_...