- }\r
- \r
- ImageFileArrayConst vLHS = getArray();\r
- ImageFileArrayConst vLHSImag = getImaginaryArray();\r
- ImageFileArray vRealResult = result.getArray();\r
- ImageFileArray vImagResult = result.getImaginaryArray();\r
- \r
- unsigned int ix, iy;\r
-\r
- // alloc output matrix\r
- CTSimComplex** complexOut = new CTSimComplex* [m_nx];\r
- for (ix = 0; ix < m_nx; ix++)\r
- complexOut[ix] = new CTSimComplex [m_ny];\r
- \r
- // fourier each x column\r
-#if 1\r
- CTSimComplex* pY = new CTSimComplex [m_ny];\r
- for (ix = 0; ix < m_nx; ix++) {\r
- for (iy = 0; iy < m_ny; iy++) {\r
- pY[iy].real (vLHS[ix][iy]);\r
- if (isComplex())\r
- pY[iy].imag (vLHSImag[ix][iy]);\r
- else\r
- pY[iy].imag (0);\r
- } \r
- ProcessSignal::finiteFourierTransform (pY, complexOut[ix], m_ny, ProcessSignal::FORWARD);\r
- }\r
-#else\r
- double* pY = new double [m_ny];\r
- for (ix = 0; ix < m_nx; ix++) {\r
- for (iy = 0; iy < m_ny; iy++) {\r
- pY[iy] = vLHS[ix][iy];\r
- } \r
- ProcessSignal::finiteFourierTransform (pY, complexOut[ix], m_ny, ProcessSignal::FORWARD);\r
- }\r
-#endif\r
- delete [] pY;\r
- \r
- // fourier each y row\r
- CTSimComplex* pX = new CTSimComplex [m_nx];\r
- CTSimComplex* complexOutRow = new CTSimComplex [m_nx];\r
- for (iy = 0; iy < m_ny; iy++) {\r
- for (ix = 0; ix < m_nx; ix++)\r
- pX[ix] = complexOut[ix][iy];\r
- ProcessSignal::finiteFourierTransform (pX, complexOutRow, m_nx, ProcessSignal::FORWARD);\r
- for (ix = 0; ix < m_nx; ix++)\r
- complexOut[ix][iy] = complexOutRow[ix];\r
- }\r
- delete [] pX;\r
- \r
- // shuffle each column\r
- for (ix = 0; ix < m_nx; ix++)\r
- ProcessSignal::shuffleFourierToNaturalOrder (complexOut[ix], m_ny);\r
- \r
- // shuffle each row\r
- for (iy = 0; iy < m_ny; iy++) {\r
- for (ix = 0; ix < m_nx; ix++)\r
- complexOutRow[ix] = complexOut[ix][iy];\r
- ProcessSignal::shuffleFourierToNaturalOrder (complexOutRow, m_nx);;\r