Xmipp  v3.23.11-Nereus
dft.h
Go to the documentation of this file.
1 
4 
5 /*--------------------------------------------------------------------------*/
16  (
17  double Am2Re[], /* (amplitude -> real) */
18  double Ph2Im[], /* (phase -> imaginary) */
19  long SignalLength /* signal length */
20  );
21 
22 /*--------------------------------------------------------------------------*/
58  (
59  double Am2Am[], /* amplitude -> amplitude */
60  double Ph2Ph[], /* phase -> phase */
61  double *TmpRe, /* first scratch workspace */
62  double *TmpIm, /* second scratch workspace */
63  double CaS[], /* Hartley transform coefficients */
64  long SignalLength /* signal length */
65  );
66 
67 /*--------------------------------------------------------------------------*/
100  (
101  double Am2Re[], /* amplitude -> real */
102  double Ph2Im[], /* phase -> imaginary */
103  double *TmpRe, /* first scratch workspace */
104  double *TmpIm, /* second scratch workspace */
105  double CaS[], /* Hartley transform coefficients */
106  long SignalLength /* signal length */
107  );
108 
109 /*--------------------------------------------------------------------------*/
144  (
145  double Re2Am[], /* real -> amplitude */
146  double Im2Ph[], /* imaginary -> phase */
147  double *TmpRe, /* first scratch workspace */
148  double *TmpIm, /* second scratch workspace */
149  double CaS[], /* Hartley transform coefficients */
150  long SignalLength /* signal length */
151  );
152 
153 /*--------------------------------------------------------------------------*/
187  (
188  double Re2Re[], /* real -> real */
189  double Im2Im[], /* imaginary -> imaginary */
190  double *TmpRe, /* first scratch workspace */
191  double *TmpIm, /* second scratch workspace */
192  double CaS[], /* Hartley transform coefficients */
193  long SignalLength /* signal length */
194  );
195 
196 /*--------------------------------------------------------------------------*/
229 extern int DftRealToAmplitudePhase
230  (
231  double R2Am[], /* real -> amplitude */
232  double PhOut[], /* output phase */
233  double *Tmp, /* scratch workspace */
234  double CaS[], /* Hartley transform coefficients */
235  long SignalLength /* signal length */
236  );
237 
238 /*--------------------------------------------------------------------------*/
269 extern int DftRealToRealImaginary
270  (
271  double R2Re[], /* real -> real */
272  double ImOut[], /* output imaginary */
273  double *Tmp, /* scratch workspace */
274  double CaS[], /* Hartley transform coefficients */
275  long SignalLength /* signal length */
276  );
277 
278 /*--------------------------------------------------------------------------*/
290 extern int GetCaS
291  (
292  double CaS[], /* Hartley transform coefficients */
293  long SignalLength /* signal length */
294  );
295 
296 /*--------------------------------------------------------------------------*/
330  (
331  double Am2Am[], /* amplitude -> amplitude */
332  double Ph2Ph[], /* phase -> phase */
333  double *TmpRe, /* first scratch workspace */
334  double *TmpIm, /* second scratch workspace */
335  double CaS[], /* Hartley transform coefficients */
336  long SignalLength /* signal length */
337  );
338 
339 /*--------------------------------------------------------------------------*/
373  (
374  double Am2R[], /* amplitude -> real */
375  double PhIn[], /* input phase */
376  double *Tmp, /* scratch workspace */
377  double CaS[], /* Hartley transform coefficients */
378  long SignalLength /* signal length */
379  );
380 
381 /*--------------------------------------------------------------------------*/
414  (
415  double Am2Re[], /* amplitude -> real */
416  double Ph2Im[], /* phase -> imaginary */
417  double *TmpRe, /* first scratch workspace */
418  double *TmpIm, /* second scratch workspace */
419  double CaS[], /* Hartley transform coefficients */
420  long SignalLength /* signal length */
421  );
422 
423 /*--------------------------------------------------------------------------*/
457  (
458  double Re2Am[], /* real -> amplitude */
459  double Im2Ph[], /* imaginary -> phase */
460  double *TmpRe, /* first scratch workspace */
461  double *TmpIm, /* second scratch workspace */
462  double CaS[], /* Hartley transform coefficients */
463  long SignalLength /* signal length */
464  );
465 
466 /*--------------------------------------------------------------------------*/
499 extern int InvDftRealImaginaryToReal
500  (
501  double Re2R[], /* real -> real */
502  double ImIn[], /* input imaginary */
503  double *Tmp, /* scratch workspace */
504  double CaS[], /* Hartley transform coefficients */
505  long SignalLength /* signal length */
506  );
507 
508 /*--------------------------------------------------------------------------*/
541  (
542  double Re2Re[], /* real -> real */
543  double Im2Im[], /* imaginary -> imaginary */
544  double *TmpRe, /* first scratch workspace */
545  double *TmpIm, /* second scratch workspace */
546  double CaS[], /* Hartley transform coefficients */
547  long SignalLength /* signal length */
548  );
549 
550 /*--------------------------------------------------------------------------*/
565  (
566  double Re2Am[], /* real -> amplitude */
567  double Im2Ph[], /* imaginary -> phase */
568  long SignalLength /* signal length */
569  );
570 
571 /*--------------------------------------------------------------------------*/
585  (
586  double Am2Re[], /* (amplitude -> real) */
587  double Ph2Im[], /* (phase -> imaginary) */
588  long Nx, /* width of the volume */
589  long Ny, /* height of the volume */
590  long Nz /* depth of the volume */
591  );
592 
593 /*--------------------------------------------------------------------------*/
622  (
623  double *Am2Am, /* amplitude -> amplitude */
624  double *Ph2Ph, /* phase -> phase */
625  long Nx, /* width of the volume */
626  long Ny, /* height of the volume */
627  long Nz, /* depth of the volume */
628  int *Status /* error management */
629  );
630 
631 /*--------------------------------------------------------------------------*/
656  (
657  double *Am2Re, /* amplitude -> real */
658  double *Ph2Im, /* phase -> imaginary */
659  long Nx, /* width of the volume */
660  long Ny, /* height of the volume */
661  long Nz, /* depth of the volume */
662  int *Status /* error management */
663  );
664 
665 /*--------------------------------------------------------------------------*/
690  (
691  double *Re2Am, /* real -> amplitude */
692  double *Im2Ph, /* imaginary -> phase */
693  long Nx, /* width of the volume */
694  long Ny, /* height of the volume */
695  long Nz, /* depth of the volume */
696  int *Status /* error management */
697  );
698 
699 /*--------------------------------------------------------------------------*/
723  (
724  double *Re2Re, /* real -> real */
725  double *Im2Im, /* imaginary -> imaginary */
726  long Nx, /* width of the volume */
727  long Ny, /* height of the volume */
728  long Nz, /* depth of the volume */
729  int *Status /* error management */
730  );
731 
732 /*--------------------------------------------------------------------------*/
756  (
757  double *Re2Am, /* real -> amplitude */
758  double *PhOut, /* output phase */
759  long Nx, /* width of the volume */
760  long Ny, /* height of the volume */
761  long Nz, /* depth of the volume */
762  int *Status /* error management */
763  );
764 
765 /*--------------------------------------------------------------------------*/
790  (
791  double *Re2Re, /* real -> real */
792  double *ImOut, /* output imaginary */
793  long Nx, /* width of the volume */
794  long Ny, /* height of the volume */
795  long Nz, /* depth of the volume */
796  int *Status /* error management */
797  );
798 
799 /*--------------------------------------------------------------------------*/
826  (
827  double *Am2Am, /* amplitude -> amplitude */
828  double *Ph2Ph, /* phase -> phase */
829  long Nx, /* width of the volume */
830  long Ny, /* height of the volume */
831  long Nz, /* depth of the volume */
832  int *Status /* error management */
833  );
834 
835 /*--------------------------------------------------------------------------*/
862  (
863  double *Am2Re, /* amplitude -> real */
864  double *PhIn, /* input phase */
865  long Nx, /* width of the volume */
866  long Ny, /* height of the volume */
867  long Nz, /* depth of the volume */
868  int *Status /* error management */
869  );
870 
871 /*--------------------------------------------------------------------------*/
897  (
898  double *Am2Re, /* amplitude -> real */
899  double *Ph2Im, /* phase -> imaginary */
900  long Nx, /* width of the volume */
901  long Ny, /* height of the volume */
902  long Nz, /* depth of the volume */
903  int *Status /* error management */
904  );
905 
906 /*--------------------------------------------------------------------------*/
931  (
932  double *Re2Am, /* real -> amplitude */
933  double *Im2Ph, /* imaginary -> phase */
934  long Nx, /* width of the volume */
935  long Ny, /* height of the volume */
936  long Nz, /* depth of the volume */
937  int *Status /* error management */
938  );
939 
940 /*--------------------------------------------------------------------------*/
966  (
967  double *Re2Re, /* real -> real */
968  double *ImIn, /* input imaginary */
969  long Nx, /* width of the volume */
970  long Ny, /* height of the volume */
971  long Nz, /* depth of the volume */
972  int *Status /* error management */
973  );
974 
975 /*--------------------------------------------------------------------------*/
1000  (
1001  double *Re2Re, /* real -> real */
1002  double *Im2Im, /* imaginary -> imaginary */
1003  long Nx, /* width of the volume */
1004  long Ny, /* height of the volume */
1005  long Nz, /* depth of the volume */
1006  int *Status /* error management */
1007  );
1008 
1009 /*--------------------------------------------------------------------------*/
1023  (
1024  double Re2Am[], /* real -> amplitude */
1025  double Im2Ph[], /* imaginary -> phase */
1026  long Nx, /* width of the volume */
1027  long Ny, /* height of the volume */
1028  long Nz /* depth of the volume */
1029  );
int DftAmplitudePhaseToAmplitudePhase(double Am2Am[], double Ph2Ph[], double *TmpRe, double *TmpIm, double CaS[], long SignalLength)
int DftAmplitudePhaseToRealImaginary(double Am2Re[], double Ph2Im[], double *TmpRe, double *TmpIm, double CaS[], long SignalLength)
int DftRealImaginaryToAmplitudePhase(double Re2Am[], double Im2Ph[], double *TmpRe, double *TmpIm, double CaS[], long SignalLength)
int InvDftRealImaginaryToRealImaginary(double Re2Re[], double Im2Im[], double *TmpRe, double *TmpIm, double CaS[], long SignalLength)
int VolumeDftRealImaginaryToRealImaginary(double *Re2Re, double *Im2Im, long Nx, long Ny, long Nz, int *Status)
int VolumeDftAmplitudePhaseToRealImaginary(double *Am2Re, double *Ph2Im, long Nx, long Ny, long Nz, int *Status)
int VolumeInvDftAmplitudePhaseToRealImaginary(double *Am2Re, double *Ph2Im, long Nx, long Ny, long Nz, int *Status)
int DftRealToRealImaginary(double R2Re[], double ImOut[], double *Tmp, double CaS[], long SignalLength)
int InvDftAmplitudePhaseToRealImaginary(double Am2Re[], double Ph2Im[], double *TmpRe, double *TmpIm, double CaS[], long SignalLength)
int InvDftAmplitudePhaseToReal(double Am2R[], double PhIn[], double *Tmp, double CaS[], long SignalLength)
int InvDftRealImaginaryToReal(double Re2R[], double ImIn[], double *Tmp, double CaS[], long SignalLength)
int VolumeInvDftRealImaginaryToReal(double *Re2Re, double *ImIn, long Nx, long Ny, long Nz, int *Status)
int VolumeInvDftAmplitudePhaseToReal(double *Am2Re, double *PhIn, long Nx, long Ny, long Nz, int *Status)
int RealImaginaryToAmplitudePhase(double Re2Am[], double Im2Ph[], long SignalLength)
int GetCaS(double CaS[], long SignalLength)
int VolumeDftRealToRealImaginary(double *Re2Re, double *ImOut, long Nx, long Ny, long Nz, int *Status)
int VolumeAmplitudePhaseToRealImaginary(double Am2Re[], double Ph2Im[], long Nx, long Ny, long Nz)
int InvDftRealImaginaryToAmplitudePhase(double Re2Am[], double Im2Ph[], double *TmpRe, double *TmpIm, double CaS[], long SignalLength)
int VolumeDftRealToAmplitudePhase(double *Re2Am, double *PhOut, long Nx, long Ny, long Nz, int *Status)
int VolumeDftAmplitudePhaseToAmplitudePhase(double *Am2Am, double *Ph2Ph, long Nx, long Ny, long Nz, int *Status)
int VolumeRealImaginaryToAmplitudePhase(double Re2Am[], double Im2Ph[], long Nx, long Ny, long Nz)
int DftRealImaginaryToRealImaginary(double Re2Re[], double Im2Im[], double *TmpRe, double *TmpIm, double CaS[], long SignalLength)
int InvDftAmplitudePhaseToAmplitudePhase(double Am2Am[], double Ph2Ph[], double *TmpRe, double *TmpIm, double CaS[], long SignalLength)
int VolumeDftRealImaginaryToAmplitudePhase(double *Re2Am, double *Im2Ph, long Nx, long Ny, long Nz, int *Status)
int VolumeInvDftAmplitudePhaseToAmplitudePhase(double *Am2Am, double *Ph2Ph, long Nx, long Ny, long Nz, int *Status)
int DftRealToAmplitudePhase(double R2Am[], double PhOut[], double *Tmp, double CaS[], long SignalLength)
int VolumeInvDftRealImaginaryToRealImaginary(double *Re2Re, double *Im2Im, long Nx, long Ny, long Nz, int *Status)
int AmplitudePhaseToRealImaginary(double Am2Re[], double Ph2Im[], long SignalLength)
int VolumeInvDftRealImaginaryToAmplitudePhase(double *Re2Am, double *Im2Ph, long Nx, long Ny, long Nz, int *Status)