<div dir="ltr"><div><div>Obviously I hadn't looked at the result and/or checked the command line options, sorry. This is an example from the same simulated dataset that gives me a good results:<br><br>OS-SR-466:tmp srit$ rtksart -p . -r proj.mha -g geo -o SART_SL3.mha -f Joseph -b VoxelBasedBackProjection --dimension 128 --spacing 2 -l 0.3 -n 3 --time 1<br>Recording elapsed time... <br>SARTConeBeamReconstructionFilter timing:<br> Extraction of projection sub-stacks: 0.567773 s<br> Multiplication by zero: 0.303715 s<br> Forward projection: 142.305 s<br> Subtraction: 0.445842 s<br> Multiplication by lambda: 0.2663 s<br> Ray box intersection: 5.40366 s<br> Division: 0.535618 s<br> Multiplication by the gating weights: 0 s<br> Displaced detector: 0.415431 s<br> Back projection: 21.3689 s<br> Volume update: 0 s<br>It took... 177.059 s<br><br></div>but this doesn't change the content of my previous message. What takes time is probably in your own software, be sure that you update SART inputs before timing it.<br></div><div>Simon<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 27, 2015 at 4:05 PM, Guangming Zang <span dir="ltr"><<a href="mailto:guangming.zang@kaust.edu.sa" target="_blank">guangming.zang@kaust.edu.sa</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;color:#0000ff">Hi Simon,</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;color:#0000ff"> it cost 1200s for SART algorithm at first, and the command are:</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;color:#0000ff"><div class="gmail_default">rtksimulatedgeometry -n 360 --arc -360 -o geometry.xml --sdd=<a href="tel:725.9240729" value="+17259240729" target="_blank">725.9240729</a> --sid=500.0 --proj_iso_x="-128" --proj_iso_y="-128" <br></div><div class="gmail_default"><div class="gmail_default"><div class="gmail_default"><br></div><div class="gmail_default">rtksart -p . -r 360pro_SL_Vol128_512.mha -g geometry.xml -o SART_SL.mha -f Joseph -b VoxelBasedBackProjection --newspacing 0.5 --dimension 128,128,128 --spacing 1,1,1 --origin -64,-64,-64 -l 0.5 -n 1 --time 1</div><div><br></div></div></div></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;color:#0000ff">in which, the projections data(360pro_SL_Vol128_512.mha) is not generated from rtkprojectshepploganphantom , but from my application. though it took long time, but i can got a nice result,</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;color:#0000ff"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;color:#0000ff"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;color:#0000ff">And i just tried the command you used, i.e. generated the projections data by rtkprojectshepploganphantom :</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif;color:#0000ff"><br></div><div class="gmail_default"><div class="gmail_default"><font face="trebuchet ms, sans-serif" color="#0000ff">rtksimulatedgeometry -n 360 --arc -360 -o geo.xml --sdd=<a href="tel:725.9240729" value="+17259240729" target="_blank">725.9240729</a> --sid=500.0 </font></div><div class="gmail_default"><font face="trebuchet ms, sans-serif" color="#0000ff">rtkprojectshepploganphantom -g geo.xml -o proj.mha --dimension 512</font></div><div class="gmail_default"><font face="trebuchet ms, sans-serif" color="#0000ff">rtksart -p . -r proj.mha -g geo.xml -o SART_SLnew.mha -f Joseph -b VoxelBasedBackProjection --newspacing 0.5 --dimension 128,128,128 --spacing 1,1,1 --origin -64,-64,-64 -l 0.5 -n 3 --time 1</font></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif">yes, it takes about 56s.</div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif">but the reconstructed result is weird, the voxel values range from [-142186, 208146] and can not see anything when visualizing it.<br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif">i believe you got the similar results, which maybe explain why it computes much faster.</div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif">if i wanna use the projections generated by rtkprojectshepploganphantom , can you give me an example to get a nice results?</div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif">Best regards</div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif">Guangming</div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div><div class="gmail_default" style="color:rgb(0,0,255);font-family:'trebuchet ms',sans-serif"><br></div></div></div><div class="gmail_extra"><span class=""><br clear="all"><div><div><div dir="ltr"><div><div dir="ltr"><font style="line-height:23.32400131225586px" face="arial, helvetica, sans-serif" color="#674ea7"><b><i>Guangming Zang (Alex)</i></b></font><div style="line-height:23.32400131225586px"><font face="arial, helvetica, sans-serif"><b><i><font color="#0b5394">King Abdullah University of Science and Technology</font><font color="#073763">(KAUST)</font></i></b></font></div><div style="line-height:23.32400131225586px"><span style="font-family:arial;font-size:13px;line-height:20.020000457763672px"><font color="#0b5394"><b><i>University of Chinese Academy of Sciences(UCAS)</i></b></font></span><font face="arial, helvetica, sans-serif"><b><i><font color="#073763"><br></font></i></b></font></div><div style="line-height:23.32400131225586px"><span style="font-family:arial;font-size:13px;line-height:20.020000457763672px"><font color="#0b5394"><b><i><br></i></b></font></span></div><div style="line-height:23.32400131225586px"><span style="font-family:arial;font-size:13px;line-height:20.020000457763672px"><font color="#0b5394"><b><i><br></i></b></font></span></div><div style="line-height:23.32400131225586px"><br></div></div></div></div></div></div>
<br></span><div class="gmail_quote"><span class="">2015-07-27 16:02 GMT+03:00 Simon Rit <span dir="ltr"><<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>></span>:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">No I expect forward projection to be longer than backprojection<br>
although with optimal implementations, it should take about the same<br>
time since they have the same complexity.<br>
I have 4 cores on my laptop. I don't see how it explains it, try to<br>
find out where does SART spend the time.<br>
Simon<br>
</span><span><span class=""><br>
On Mon, Jul 27, 2015 at 2:50 PM, Guangming Zang<br></span><span class="">
<<a href="mailto:guangming.zang@kaust.edu.sa" target="_blank">guangming.zang@kaust.edu.sa</a>> wrote:<br>
> Hi Simon,<br>
> sorry for the mistake, not"the backprojection should take much longer time<br>
> than<br>
> sart algorithm" , but "the backprojection should take much longer time than<br>
> forward projection in sart algorithm".<br>
><br>
> BTW, how many cores does your computer have?? Mine is 24 cores.<br>
> is it can explain the reason why it takes much longer time on my computer<br>
> than yours?<br>
> Regards<br>
> Guangming<br>
><br>
> Guangming Zang (Alex)<br>
> King Abdullah University of Science and Technology(KAUST)<br>
> University of Chinese Academy of Sciences(UCAS)<br>
><br>
><br>
><br>
><br>
</span></span><div><div class="h5"><div><div>> 2015-07-27 15:28 GMT+03:00 Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>>:<br>
>><br>
>> I can try. Forward and back projection have the same algorithmic<br>
>> complexity but voxel based backprojection benefits from several<br>
>> optimizations in terms of memory management and computations that<br>
>> makes it faster. The best is to look at the code for further<br>
>> details... although both have far from being optimal. And I did not<br>
>> get the sentence "the backprojection should take much longer time than<br>
>> sart algorithm." because SART contains a backprojection and other<br>
>> steps so SART is obviously longer than the bp alone.<br>
>> Your log is strange and I don't see what steps are not timed that<br>
>> would take most of the time. I did the same test on my computer and<br>
>> here is my result:<br>
>><br>
>> OS-SR-466:tmp srit$ rtksimulatedgeometry -n 360 -o geo<br>
>> OS-SR-466:tmp srit$ rtkprojectshepploganphantom -g geo -o proj.mha<br>
>> --dimension 512<br>
>> OS-SR-466:tmp srit$ rtksart -p . -r proj.mha -g geo -o SART_SL3.mha<br>
>> -f Joseph -b VoxelBasedBackProjection --newspacing 0.5 --dimension<br>
>> 128,128,128 --spacing 1,1,1 --origin -64,-64,-64 -l 0.5 -n 3 --time<br>
>> 1<br>
>> Recording elapsed time...<br>
>> SARTConeBeamReconstructionFilter timing:<br>
>> Extraction of projection sub-stacks: 0.288571 s<br>
>> Multiplication by zero: 0.131672 s<br>
>> Forward projection: 34.3612 s<br>
>> Subtraction: 0.203409 s<br>
>> Multiplication by lambda: 0.146459 s<br>
>> Ray box intersection: 1.30755 s<br>
>> Division: 0.187294 s<br>
>> Multiplication by the gating weights: 0 s<br>
>> Displaced detector: 0.278408 s<br>
>> Back projection: 11.8456 s<br>
>> Volume update: 0 s<br>
>> It took... 53.2765 s<br>
>><br>
>> Simon<br>
>><br>
>> On Mon, Jul 27, 2015 at 10:41 AM, Guangming Zang<br>
</div></div></div></div><span class=""><span>>> <<a href="mailto:guangming.zang@kaust.edu.sa" target="_blank">guangming.zang@kaust.edu.sa</a>> wrote:<br>
>> > Hi Simon,<br>
>> > Thanks for your reply.<br>
>> > would you pls help and explain why backprojection is expected to take<br>
>> > shorter time than forward projection?? because i was thinking if no<br>
>> > caching<br>
>> > step, the backprojection should take much longer time than sart<br>
>> > algorithm.<br>
</span></span>>> > yes, i run rtksart for 2 times <a href="http://once.it" rel="noreferrer" target="_blank">once.it</a> took 12xxs, similar to the time<span class=""><br>
<span>>> > consumed of 3 times's sart, which much slower than my own application.<br>
>> > BTW, D drive is local disk drive, and 360pro_SL_Vol128_512.mha are 360<br>
>> > shapp-logan projections(512*512 resolution each)<br>
>> > rtksart -p . -r 360pro_SL_Vol128_512.mha -g geometry.xml -o<br>
>> > ../Result_SL512/SART_SL3.mha -f Joseph -b VoxelBasedBackProjection<br>
>> > --newspacing 0.5 --dimension 128,128,128 --spacing 1,1,1 --origin<br>
>> > -64,-64,-64 -l 0.5 -n 3 --time 1<br>
>> ><br>
>> > and i will try reader->Update() like what you said.<br>
>> > Thanks<br>
>> > Guangming<br>
>> ><br>
>> ><br>
>> ><br>
>> > Guangming Zang (Alex)<br>
>> > King Abdullah University of Science and Technology(KAUST)<br>
>> > University of Chinese Academy of Sciences(UCAS)<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
</span></span><span class=""><span>>> > 2015-07-27 8:59 GMT+03:00 Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>>:<br>
>> >><br>
>> >> Hi Guangming,<br>
>> >> It's not surprising to me that the backprojection is faster than the<br>
>> >> forward projection, that's what I expect. If the total time is longer,<br>
>> >> that's probably that some individual steps are not included in the<br>
>> >> total<br>
>> >> time. Can you try to add<br>
>> >> reader->Update();<br>
>> >> before the line<br>
>> >><br>
>> >> itk::TimeProbe totalTimeProbe;<br>
>> >><br>
>> >> in rtksart.cxx? It may be that all the reading operations are done but<br>
>> >> not<br>
>> >> timed in the sart->Update(). Why they are so long, I don't know, is<br>
>> >> your D:<br>
>> >> drive a network drive? Do you observe the same behavior if you do<br>
>> >> rtksart 2<br>
>> >> times in a row?<br>
>> >><br>
>> >> Simon<br>
>> >><br>
>> >><br>
>> >><br>
>> >> On Mon, Jul 27, 2015 at 12:30 AM, Guangming Zang<br>
</span></span><div><div class="h5"><div><div>>> >> <<a href="mailto:guangming.zang@kaust.edu.sa" target="_blank">guangming.zang@kaust.edu.sa</a>> wrote:<br>
>> >>><br>
>> >>> Hi RTK community,<br>
>> >>> i am using SART algorithm to reconstruct an object.<br>
>> >>> But in this new RTK version, the time recording seems a little weird:<br>
>> >>> the total time is 1219.12s , but adding the time cost in different<br>
>> >>> stages is not 1291.12 s. especially for "backprojection" part, only<br>
>> >>> 16.6051s<br>
>> >>> to reconstruct a 128^3 volume ?? even shorter than forward projection<br>
>> >>> part.<br>
>> >>> BTW, the -f and -b are Joseph and VoxelBasedBackProjection,<br>
>> >>> respectively,<br>
>> >>> both multi-threading i think.<br>
>> >>> Can anyone tell me what's going on?<br>
>> >>> Thanks<br>
>> >>> Regards<br>
>> >>> Guangming<br>
>> >>><br>
>> >>><br>
>> >>> Guangming Zang (Alex)<br>
>> >>> King Abdullah University of Science and Technology(KAUST)<br>
>> >>> University of Chinese Academy of Sciences(UCAS)<br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>><br>
>> >>> ________________________________<br>
>> >>> This message and its contents, including attachments are intended<br>
>> >>> solely<br>
>> >>> for the original recipient. If you are not the intended recipient or<br>
>> >>> have<br>
>> >>> received this message in error, please notify me immediately and<br>
>> >>> delete this<br>
>> >>> message from your computer system. Any unauthorized use or<br>
>> >>> distribution is<br>
>> >>> prohibited. Please consider the environment before printing this<br>
>> >>> email.<br>
>> >><br>
>> >><br>
>> ><br>
>> ><br>
>> > ________________________________<br>
>> > This message and its contents, including attachments are intended solely<br>
>> > for<br>
>> > the original recipient. If you are not the intended recipient or have<br>
>> > received this message in error, please notify me immediately and delete<br>
>> > this<br>
>> > message from your computer system. Any unauthorized use or distribution<br>
>> > is<br>
>> > prohibited. Please consider the environment before printing this email.<br>
><br>
><br>
><br>
> ________________________________<br>
> This message and its contents, including attachments are intended solely for<br>
> the original recipient. If you are not the intended recipient or have<br>
> received this message in error, please notify me immediately and delete this<br>
> message from your computer system. Any unauthorized use or distribution is<br>
> prohibited. Please consider the environment before printing this email.<br>
</div></div></div></div></blockquote></div><br></div><div class="HOEnZb"><div class="h5">
<br>
<div><hr></div><font face="Arial" size="1">This message and its contents, including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.</font></div></div></blockquote></div><br></div>