[Rtk-users] itFirstAngle and itLastAngle in rtkParkerShortScanImageFilter.txt
Andy Shieh
hsieandy at gmail.com
Fri Oct 24 03:50:26 EDT 2014
Hi Simon & RTK developers & the RTK community,
I have a question about how delta is calculated in
rtkParkerShortScanImageFilter.txt.
The itFirstAngle and the itLastAngle were used to find the first and last
angular values for calculating delta.
However I noticed that at line 93 itFirstAngle is acquired by:
itFirstAngle = sortedAngles.find(rotationAngles[maxAngularGapPos]);
itFirstAngle =
(++itFirstAngle==sortedAngles.end())?sortedAngles.begin():itFirstAngle;
itFirstAngle =
(++itFirstAngle==sortedAngles.end())?sortedAngles.begin():itFirstAngle;
Why are the second and third lines duplicated? Wouldn't this point to the
"second" angle instead?
And also for itLastAngle at line 99:
itLastAngle = sortedAngles.find(rotationAngles[maxAngularGapPos]);
itLastAngle =
(itLastAngle==sortedAngles.begin())?--sortedAngles.end():--itLastAngle;
Why is the second line needed here? Wouldn't this point to the "second
last" angle instead? (Since maxAngularGapPos was caluclated
with GetAngularGapsWithNext).
I did test this with a 0-200 deg short scan, and found that firatAngle and
lastAngle weren't equal to 0 and 200, but were calculated to be the second
and second last angles instead.
Is there any reason for this implementation?
Thank you.
Cheers,
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20141024/f3250965/attachment-0008.html>
More information about the Rtk-users
mailing list