<div dir="ltr"><div>Hi Ryan,</div><div>If you check our code, the normalization step is quite simplistic to avoid a backprojection: we simply calculate and divide by the length of the intersection between each ray and the "image box" (parallelepiped corresponding to the space occupied by the volume) using the <a href="https://www.openrtk.org/Doxygen/classrtk_1_1SARTConeBeamReconstructionFilter.html">rtk::RayBoxIntersectionImageFilter</a>. This is exactly what you should get if you forward project a volume of 1 with our Joseph forward projectors. See the diagram from the implementation of SART:</div><div><a href="https://www.openrtk.org/Doxygen/classrtk_1_1SARTConeBeamReconstructionFilter.html">https://www.openrtk.org/Doxygen/classrtk_1_1SARTConeBeamReconstructionFilter.html</a></div><div>Maybe you can try to do the same here?</div><div>For what you want to do, it would be better to use a forward and backprojector combining the projection and a vector field... We have it available for the <a href="https://www.openrtk.org/Doxygen/classrtk_1_1FDKWarpBackProjectionImageFilter.html">backprojection</a> and for the <a href="https://www.openrtk.org/Doxygen/classrtk_1_1ForwardWarpImageFilter.html">forward</a>, maybe we should try to implement it in the SART command line application for you... I have opened an issue to track this:</div><div><a href="https://github.com/RTKConsortium/RTK/issues/721">https://github.com/RTKConsortium/RTK/issues/721</a></div><div>Cheers,</div><div>Simon</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 14, 2025 at 6:25 PM Andosca, Ryan <<a href="mailto:RAndosca@mednet.ucla.edu" target="_blank">RAndosca@mednet.ucla.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>
<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Hi,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
So, my experience with coding, especially in C, is extremely limited. I mostly work in MATLAB, and as such I've been primarily using the built-in console applications to perform reconstruction on CBCT datasets. The rtksart application works great and provides
a beautiful reconstruction. My goal is to effectively do the same reconstruction, but tack on motion compensation to each iteration.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
After delving into the algorithm implementation in rtksart as much as I am able, I wrote a MATLAB workflow that boils down to:</div>
<ul style="margin-top:0px;margin-bottom:0px">
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"- "">
<div>Start with image of zeros</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"- "">
<div>Randomize gantry angle order</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"- "">
<div>Iterate over gantry angles:</div>
</li><ul style="margin-top:0px;margin-bottom:0px;list-style-type:circle">
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Load current projection forward and backward motion compensation DVFs</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Deform current image iteration to current gantry angle breathing state</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Forward project deformed image</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Subtract deformed projections from raw CBCT image data</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Back project the subtraction image</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>NORMALIZE BACK PROJECTION (this is where I think my issue is)</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Deform normalized back projection back to the original image space</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Update current image: img = img + lambda * (normalized_back_projection / number_of_gantry_angles)</div>
</li><ul style="margin-top:0px;margin-bottom:0px">
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"\00220e "">
<div>Note: This step, as it also contains normalization, may also be a source of my issue...</div>
</li></ul>
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Set negatives to 0</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<div>Repeat</div>
</li></ul>
</ul>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I get an image that is much as I expect - a much sharper diaphragm and generally higher definition in soft tissue structures. So I must be generally on the right track. The issue is that the normalization is clearly off in some way. I have a bright circle artifact
in the middle of the image and some striping throughout. Try as I might to understand it, I couldn't discern how normalization was done in the rtksart application. So, this is the method I used:</div>
<ul style="margin-top:0px;margin-bottom:0px">
<li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"- "">
<div>Create an image of 1s of the size of the final (SART reconstructed) image.</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"- "">
<div>Forward project through this image of 1s</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"- "">
<div>Back project through the resulting forward projection</div>
</li><li style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);list-style-type:"- "">
<div>In the normalization step in the MCSART process detailed above, I simply divide by this resulting back projection.</div>
</li></ul>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Knowing all of that, any idea what my issue might be leading to my artifacts? Ultimately, I know it would be more ideal if I just altered the rtksart application itself to include motion compensation, and then I'd just be using the built-in normalization that
clearly works, but I find my abilities lacking when I attempt to do this... So instead I am just seeking to understand how that application implements normalization, so that I can use a similar normalization in my algorithm!<br>
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I greatly appreciate any help provided!</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Best,</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
R. Andosca</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
GSR</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
UCLA Health</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<br>
<hr>
<font face="Arial" color="Navy" size="2"><br>
UCLA HEALTH SCIENCES IMPORTANT WARNING: This email (and any attachments) is only intended for the use of the person or entity to which it is addressed, and may contain information that is privileged and confidential. You, the recipient, are obligated to maintain
it in a safe, secure and confidential manner. Unauthorized redisclosure or failure to maintain confidentiality may subject you to federal and state penalties. If you are not the intended recipient, please immediately notify us by return email, and delete this
message from your computer.<br>
</font>
</div>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:rtk-users@openrtk.org" target="_blank">rtk-users@openrtk.org</a><br>
<a href="https://www.creatis.insa-lyon.fr/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://www.creatis.insa-lyon.fr/mailman/listinfo/rtk-users</a><br>
</div></blockquote></div>