Skip to content

Commit ef19c51

Browse files
committed
clean-up in raytracing post processing
1 parent 956aedd commit ef19c51

File tree

1 file changed

+7
-17
lines changed

1 file changed

+7
-17
lines changed

src/Raytracing.h

+7-17
Original file line numberDiff line numberDiff line change
@@ -1764,30 +1764,20 @@ class CRaytracingPolar : public CRaytracingBasic
17641764
// -> if the resulting cartesian detector has more pixels than there are polar pixels,
17651765
// then use the interpolation method
17661766

1767-
uint processing_method;
17681767
if(map_pixel_x * map_pixel_y > npix_total)
17691768
{
1770-
processing_method = INTERP; // interpolation
1769+
detector->setProcessingMethod(INTERP);
1770+
cout << "HINT: Using 'interpolation' method to post process from polar to cartesian detector" << endl;
1771+
return postProcessingUsingInterpolation();
17711772
}
17721773
else
17731774
{
1774-
processing_method = NEAREST; // nearest
1775+
detector->setProcessingMethod(NEAREST);
1776+
cout << "HINT: Using 'nearest' method to post process from polar to cartesian detector" << endl;
1777+
return postProcessingUsingNearest();
17751778
}
1776-
detector->setProcessingMethod(processing_method);
17771779

1778-
switch(processing_method)
1779-
{
1780-
case NEAREST:
1781-
cout << "HINT: Using 'nearest' method to post process from polar to cartesian detector" << endl;
1782-
return postProcessingUsingNearest();
1783-
break;
1784-
case INTERP:
1785-
cout << "HINT: Using 'interpolation' method to post process from polar to cartesian detector" << endl;
1786-
return postProcessingUsingInterpolation();
1787-
break;
1788-
default:
1789-
return false;
1790-
}
1780+
return false;
17911781
}
17921782

17931783
bool postProcessingUsingNearest()

0 commit comments

Comments
 (0)