Commit 605281c0 authored by myron's avatar myron

corretto tilt

parent 4a91a0ba
......@@ -7217,8 +7217,11 @@ __global__ static void multi_pro_gputomo_conicity_kernel(float *d_SINO, // da
}
if(dectTilt.sin_tilt!=0.0f) {
float alpha = ( 1.0e-6 * v_size/v2x) / ( source_distance+detector_distance) ;
fiz = SOURCE_Z + ( -dectTilt.sin_tilt* (fiz-SOURCE_Z)*alpha + dectTilt.cos_tilt ) * (fiz-SOURCE_Z) ;
fix = SOURCE_X + ( -dectTilt.sin_tilt* (fiz-SOURCE_Z)*alpha + 1.0f ) * (fix-SOURCE_Z) ;
// intanto mettere in swap una variabile R inizializzata a fiz prima di cambiare fiz
// Secondo il coseno deve moltiplicare da fuori della parentesi
float R = fiz;
fiz = SOURCE_Z + ( -dectTilt.sin_tilt* (fiz-SOURCE_Z)*alpha + 1.0f ) * (fiz-SOURCE_Z) *dectTilt.cos_tilt ;
fix = SOURCE_X + ( -dectTilt.sin_tilt* (R -SOURCE_Z)*alpha + 1.0f ) * (fix-SOURCE_X) ;
} else {
}
......@@ -7459,9 +7462,12 @@ __global__ static void gputomo_conicity_kernel(float *d_SLICE, // da allocare
float X1,Z1;
if(dectTilt.sin_tilt!=0.0f) {
// vedi correzioni da fare in proieione e applica anche qui
float alpha = ( 1.0e-6 * voxel_size/v2x) / ( source_distance+detector_distance) ;
Z1 = SOURCE_Z + ( +dectTilt.sin_tilt* (Z-SOURCE_Z)*alpha + 1.0f/dectTilt.cos_tilt ) * (Z - SOURCE_Z) ;
X1 = SOURCE_X + ( +dectTilt.sin_tilt* (Z-SOURCE_Z)*alpha + 1.0f ) * (X - SOURCE_Z) ;
Z1 = SOURCE_Z + ( +dectTilt.sin_tilt* (Z-SOURCE_Z)*alpha + 1.0f ) * (Z - SOURCE_Z) /dectTilt.cos_tilt ;
X1 = SOURCE_X + ( +dectTilt.sin_tilt* (Z-SOURCE_Z)*alpha + 1.0f ) * (X - SOURCE_X) ;
} else {
X1 = X ;
Z1 = Z;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment