<div dir="ltr"><div>Hi,</div><div>Congratulations on this code translation. Only 17 cycles according to your phase.txt file is very few. But there seems to be something else going one. I would suggest to remove the parker weights because RTK might detect a short scan since you have large gaps between projections in the same cycle. Or set the <a href="http://www.openrtk.org/Doxygen/classrtk_1_1ParkerShortScanImageFilter.html#a7f0bc650a54b022cb47523841749d741">angular threshold</a> to a larger value to be sure that it does not apply any such weight, the default is  pi/9 and not large enough in your case.</div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 14, 2020 at 11:58 PM Zhang, Zhehao <<a href="mailto:zhehao.zhang@wustl.edu">zhehao.zhang@wustl.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">





<div lang="EN-US">
<div class="gmail-m_-519719924775407965WordSection1">
<p class="MsoNormal">Hi,</p>
<p class="MsoNormal">Sorry for my fault, I think I have made that link public this time. The results are also uploaded.<u></u><u></u></p>
<div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">The attachment  is my phase-correlated reconstruction result (the first phase of total five phases). Thank you.</p>
<p class="gmail-m_-519719924775407965xmsonormal">BTW, if I need to utilize more projections for each phase, is there some integrated method in RTK to do so? Or you mean that I need to handle it by myself?
</p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">Best regards,</p>
<p class="gmail-m_-519719924775407965xmsonormal">Zhehao</p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="gmail-m_-519719924775407965xmsonormal"><b>From: </b><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">Simon Rit</a><br>
<b>Sent: </b>Thursday, May 14, 2020 2:17 AM<br>
<b>To: </b><a href="mailto:zhehao.zhang@wustl.edu" target="_blank">Zhang, Zhehao</a><br>
<b>Cc: </b><a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a><br>
<b>Subject: </b>Re: [Rtk-users] 4D Phase-correlated Reconstruction</p>
</div>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">Hi,</p>
</div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">Yes, you understood correctly. Adding projections will not fix the problem of angular gaps but will add some motion blur. This is, in my experience, the best way to proceed but you're free to do otherwise.</p>
</div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">I can't access your link, it seems to be protected. Can you provide just one snapshot of your result?</p>
</div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">Simon</p>
</div>
</div>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">On Thu, May 14, 2020 at 8:13 AM Zhang, Zhehao <<a href="mailto:zhehao.zhang@wustl.edu" target="_blank">zhehao.zhang@wustl.edu</a>> wrote:</p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt">
<div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">Hi,</p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">First, thank you for your reply. I am following the rtkfourdfdk to do the phase-correlated recon now. However, the result is not desirable and I am wondering whether the bad results result from too few projections for each phase.</p>
<p class="gmail-m_-519719924775407965xmsonormal">If I understand the rtk::SelectOneProjectionPerCycleImageFilter correctly, it only select one projection from per respiratory cycle for each phase. So if 20 projections were acquired per respiratory cycle and I want to reconstruct 10 phases,
 only half projections will be used, right? I don’t know why we abandon some projections and is there some way I can use all the data? That’s to say, select 2 projections for each one of total 10 phases per respiratory cycle.</p>
<p class="gmail-m_-519719924775407965xmsonormal">I also put my Python code and used data here( <a href="https://drive.google.com/drive/folders/1SFXr4ehI1N8Wh0BAMlRqIah9cXwukRYJ" target="_blank">
https://drive.google.com/drive/folders/1SFXr4ehI1N8Wh0BAMlRqIah9cXwukRYJ</a><span style="font-family:DengXian">
</span>). </p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">Thank you again.</p>
<p class="gmail-m_-519719924775407965xmsonormal">Zhehao</p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<div style="border-color:currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="gmail-m_-519719924775407965xmsonormal"><b>From: </b><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">Simon Rit</a><br>
<b>Sent: </b>Wednesday, May 13, 2020 3:59 AM<br>
<b>To: </b><a href="mailto:zhehao.zhang@wustl.edu" target="_blank">Zhang, Zhehao</a><br>
<b>Cc: </b><a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a><br>
<b>Subject: </b>Re: [Rtk-users] 4D Phase-correlated Reconstruction</p>
</div>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">Hi,</p>
</div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">I think you should look at <a href="https://github.com/SimonRit/RTK/blob/master/applications/rtkfourdfdk/rtkfourdfdk.cxx" target="_blank">
rtkfourdfdk</a> which does what you want. rtk::SelectOneProjectionPerCycleImageFilter will select the projections for you. Can you try to reimplement this in Python? We'll help if you're stuck but this is the right file to use as a basis for your dev.</p>
</div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">Simon</p>
</div>
</div>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal">On Wed, May 13, 2020 at 8:07 AM Zhang, Zhehao <<a href="mailto:zhehao.zhang@wustl.edu" target="_blank">zhehao.zhang@wustl.edu</a>> wrote:</p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor windowtext;border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt">
<div>
<div>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">Dear all, </p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">I am trying to do the 4D phase-correlated CBCT reconstruction under Python environment. What I have are the projection data(.mha), geometry info(.xml) and the repiratory info(.txt). You can check the attachment for the phase file. I want
 just to simply ‘divide’ the projections and geometry into different bins according to the phase information and perform FDK recon separately, to get several different 3D images with streaks artifacts of course. The Rooster is not necessary for me.</p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">I have spent lot of time on the given ‘4DROOSTERReconstruction’ example. I think it used the ReorderProjectionsImageFilter order to do the separation. However, I am stuck on how to perform it for Python since I didn’t figure out how to
 read the phase.txt. Could you please give me some hints and is it correct to call this order to achieve my goals?</p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">Additionally, I also saw another test example(<a href="https://github.com/SimonRit/RTK/blob/master/test/rtkwarpprojectionstacktofourdtest.cxx" target="_blank">https://github.com/SimonRit/RTK/blob/master/test/rtkwarpprojectionstacktofourdtest.cxx</a>)
 which seems using ‘PhasesToInterpolationWeights’ ,  ‘BackProjectionImageFilter’ and ‘DivideImageFilter ‘ to do this. I am confused I should follow which way. And I also want to make sure why here using BackProjectionImageFilter rather than FDKConeBeamReconstructionFilter.</p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">Sorry for these cumbersome questions. Really hope to get some help, which means a lot for me. Thank you very much.</p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<p class="gmail-m_-519719924775407965xmsonormal">Sincerely,</p>
<p class="gmail-m_-519719924775407965xmsonormal">Zhehao</p>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
</div>
</div>
</blockquote>
</div>
<p class="gmail-m_-519719924775407965xmsonormal" style="margin-left:4.8pt">_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a></p>
</div>
</div>
</blockquote>
</div>
<p class="gmail-m_-519719924775407965xmsonormal" style="margin-left:4.8pt"> </p>
</div>
</div>
<p class="gmail-m_-519719924775407965xmsonormal"> </p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal" style="border:medium none;padding:0in"><b>From: </b><a href="mailto:zhehao.zhang@wustl.edu" target="_blank">Zhang, Zhehao</a><br>
<b>Sent: </b>Thursday, May 14, 2020 2:38 AM<br>
<b>To: </b><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">Simon Rit</a><br>
<b>Cc: </b><a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a><br>
<b>Subject: </b>RE: [Rtk-users] 4D Phase-correlated Reconstruction</p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Sorry for my fault, I think I have made that link public this time. The results are also there.<u></u><u></u></p>
<p class="MsoNormal">I attached two results, the better one is conventional FDK where also projections are used (no separate phase) and another one is phase-correlated recon (the shown is the first of five phases).<u></u><u></u></p>
<p class="MsoNormal">BTW, if I need to utilize more projections for each phase, is there some integrated method in RTK to do so? Or you mean that I need to handle it by myself?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Best regards,<u></u><u></u></p>
<p class="MsoNormal">Zhehao<u></u><u></u></p>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b>From: </b><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">Simon Rit</a><br>
<b>Sent: </b>Thursday, May 14, 2020 2:17 AM<br>
<b>To: </b><a href="mailto:zhehao.zhang@wustl.edu" target="_blank">Zhang, Zhehao</a><br>
<b>Cc: </b><a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a><br>
<b>Subject: </b>Re: [Rtk-users] 4D Phase-correlated Reconstruction<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Yes, you understood correctly. Adding projections will not fix the problem of angular gaps but will add some motion blur. This is, in my experience, the best way to proceed but you're free to do otherwise.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">I can't access your link, it seems to be protected. Can you provide just one snapshot of your result?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Simon<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, May 14, 2020 at 8:13 AM Zhang, Zhehao <<a href="mailto:zhehao.zhang@wustl.edu" target="_blank">zhehao.zhang@wustl.edu</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt">
<div>
<div>
<p class="MsoNormal" style="margin-left:0.2in">
Hi,<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
First, thank you for your reply. I am following the rtkfourdfdk to do the phase-correlated recon now. However, the result is not desirable and I am wondering whether the bad results result from too few projections for each phase.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
If I understand the rtk::SelectOneProjectionPerCycleImageFilter correctly, it only select one projection from per respiratory cycle for each phase. So if 20 projections were acquired per respiratory cycle and I want to reconstruct 10 phases, only half projections
 will be used, right? I don’t know why we abandon some projections and is there some way I can use all the data? That’s to say, select 2 projections for each one of total 10 phases per respiratory cycle.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
I also put my Python code and used data here( <a href="https://drive.google.com/drive/folders/1SFXr4ehI1N8Wh0BAMlRqIah9cXwukRYJ" target="_blank">
https://drive.google.com/drive/folders/1SFXr4ehI1N8Wh0BAMlRqIah9cXwukRYJ</a><span style="font-family:DengXian">
</span>). <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
Thank you again.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
Zhehao<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.2in">
 <u></u><u></u></p>
<div style="border-color:currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal" style="margin-left:0.2in">
<b>From: </b><a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">Simon Rit</a><br>
<b>Sent: </b>Wednesday, May 13, 2020 3:59 AM<br>
<b>To: </b><a href="mailto:zhehao.zhang@wustl.edu" target="_blank">Zhang, Zhehao</a><br>
<b>Cc: </b><a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a><br>
<b>Subject: </b>Re: [Rtk-users] 4D Phase-correlated Reconstruction<u></u><u></u></p>
</div>
<p class="MsoNormal" style="margin-left:0.2in">
 <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:0.2in">
Hi,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.2in">
I think you should look at <a href="https://github.com/SimonRit/RTK/blob/master/applications/rtkfourdfdk/rtkfourdfdk.cxx" target="_blank">
rtkfourdfdk</a> which does what you want. rtk::SelectOneProjectionPerCycleImageFilter will select the projections for you. Can you try to reimplement this in Python? We'll help if you're stuck but this is the right file to use as a basis for your dev.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:0.2in">
Simon<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:0.2in">
 <u></u><u></u></p>
<div>
<div>
<p class="MsoNormal" style="margin-left:0.2in">
On Wed, May 13, 2020 at 8:07 AM Zhang, Zhehao <<a href="mailto:zhehao.zhang@wustl.edu" target="_blank">zhehao.zhang@wustl.edu</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor windowtext;border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin:5pt 0in 5pt 4.8pt">
<div>
<div>
<p class="MsoNormal" style="margin-left:0.4in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
Dear all, <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
I am trying to do the 4D phase-correlated CBCT reconstruction under Python environment. What I have are the projection data(.mha), geometry info(.xml) and the repiratory info(.txt). You can check the attachment for the phase file. I want just to simply ‘divide’
 the projections and geometry into different bins according to the phase information and perform FDK recon separately, to get several different 3D images with streaks artifacts of course. The Rooster is not necessary for me.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
I have spent lot of time on the given ‘4DROOSTERReconstruction’ example. I think it used the ReorderProjectionsImageFilter order to do the separation. However, I am stuck on how to perform it for Python since I didn’t figure out how to read the phase.txt. Could
 you please give me some hints and is it correct to call this order to achieve my goals?<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
Additionally, I also saw another test example(<a href="https://github.com/SimonRit/RTK/blob/master/test/rtkwarpprojectionstacktofourdtest.cxx" target="_blank">https://github.com/SimonRit/RTK/blob/master/test/rtkwarpprojectionstacktofourdtest.cxx</a>) which
 seems using ‘PhasesToInterpolationWeights’ ,  ‘BackProjectionImageFilter’ and ‘DivideImageFilter ‘ to do this. I am confused I should follow which way. And I also want to make sure why here using BackProjectionImageFilter rather than FDKConeBeamReconstructionFilter.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
Sorry for these cumbersome questions. Really hope to get some help, which means a lot for me. Thank you very much.<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
 <u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
Sincerely,<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
Zhehao<u></u><u></u></p>
<p class="MsoNormal" style="margin-left:0.4in">
 <u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:19.2pt">
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a><br>
<a href="https://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><u></u><u></u></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:4.8pt">
 <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>

</blockquote></div>