检查成像问题
parent
a7d2ed7996
commit
dce9400f1c
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
//#define __PRFDEBUG__
|
//#define __PRFDEBUG__
|
||||||
|
|
||||||
|
#define __TBPIMAGE__
|
||||||
|
|
||||||
//#include <mkl.h>
|
//#include <mkl.h>
|
||||||
#include <complex>
|
#include <complex>
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,8 @@ __global__ void CUDA_TBPImage(
|
||||||
float factorj = freq * 4 * PI / LIGHTSPEED;
|
float factorj = freq * 4 * PI / LIGHTSPEED;
|
||||||
cuComplex Rfactorj = make_cuComplex(0, factorj * R);
|
cuComplex Rfactorj = make_cuComplex(0, factorj * R);
|
||||||
cuComplex Rphi =cuCexpf(Rfactorj);// ĐŁŐýĎî
|
cuComplex Rphi =cuCexpf(Rfactorj);// ĐŁŐýĎî
|
||||||
imgArr[idx] = cuCaddf(imgArr[idx], cuCmulf(echoArr[Rid] , Rphi));// 시攣
|
cuComplex echotime = echoArr[prfid * freqcount + Rid];
|
||||||
|
imgArr[idx] = cuCaddf(imgArr[idx], cuCmulf(echotime, Rphi));// 시攣
|
||||||
//printf("R=%f;Rid=%d;factorj=%f;Rfactorj=complex(%f,%f);Rphi=complex(%f,%f);\n", R, Rid, factorj,
|
//printf("R=%f;Rid=%d;factorj=%f;Rfactorj=complex(%f,%f);Rphi=complex(%f,%f);\n", R, Rid, factorj,
|
||||||
// Rfactorj.x, Rfactorj.y,
|
// Rfactorj.x, Rfactorj.y,
|
||||||
// Rphi.x, Rphi.y);
|
// Rphi.x, Rphi.y);
|
||||||
|
|
|
||||||
|
|
@ -280,8 +280,6 @@ ErrorCode TBPImageAlgCls::ProcessGPU()
|
||||||
tempimgBlockline, colCount,
|
tempimgBlockline, colCount,
|
||||||
tempechoBlockline, PlusePoints );
|
tempechoBlockline, PlusePoints );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
this->L1ds->saveImageRaster(imgArr, startimgrowid, tempimgBlockline);
|
this->L1ds->saveImageRaster(imgArr, startimgrowid, tempimgBlockline);
|
||||||
}
|
}
|
||||||
|
|
@ -393,12 +391,14 @@ void TBPImageGPUAlg(std::shared_ptr<float> antPx, std::shared_ptr<float> antPy,
|
||||||
|
|
||||||
// Device -> Host
|
// Device -> Host
|
||||||
DeviceToHost(h_imgArr, d_imgArr, sizeof(cuComplex) * rowcount * colcount);
|
DeviceToHost(h_imgArr, d_imgArr, sizeof(cuComplex) * rowcount * colcount);
|
||||||
|
DeviceToHost(h_R,d_R,sizeof(float)*rowcount*colcount);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
for (long i = 0; i < rowcount; i++) {
|
for (long i = 0; i < rowcount; i++) {
|
||||||
for (long j = 0; j < colcount; j++) {
|
for (long j = 0; j < colcount; j++) {
|
||||||
imgArr.get()[i * colcount + j] = imgArr.get()[i * colcount + j]+ std::complex<float>(h_imgArr[i * colcount + j].x,
|
imgArr.get()[i * colcount + j] = std::complex<float>(h_imgArr[i * colcount + j].x,h_imgArr[i * colcount + j].y);
|
||||||
h_imgArr[i * colcount + j].y);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue