<div dir="ltr"><div>Hi,</div><div>You can read both raw projections or line integrals. The ProjectionsReader does different things depending on its input data. If the files have real pixel type (float or double), it assumes they are line integrals. If they are integers, it tries to convert them to line integrals depending on many things (image file type, pixel type, etc.). You can check the complex graph in the detailed description to find out what it does: <a href="http://www.openrtk.org/Doxygen/classrtk_1_1ProjectionsReader.html">http://www.openrtk.org/Doxygen/classrtk_1_1ProjectionsReader.html</a>. If you just have a stack of projections and want to process it, just use ImageFileReader to use them as is, without processing.</div><div>I'm not sure I understand the problem with the raw projections, it seems to be an ITK I/O issue. Does ImageFileReader work for them? And the sinogram does not seem right to me, air is brighter than the rest...<br></div><div>Simon<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jan 25, 2023 at 10:26 PM Keven Qiu <<a href="mailto:keven.qiu@ucalgary.ca">keven.qiu@ucalgary.ca</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 class="msg5512769282249180993">
<div dir="ltr">
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Hi Simon,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Do we need to read the raw projections or the sinogram images? Currently, we are reading the sinogram images and the air is at 0. Can you confirm which one we are supposed to load in? We have only tried loading in the sinogram images.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
If this is not the problem, any other suggestions to reconstruct the images?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Are there also other projections readers in RTK that we could use instead of ProjectionsReader?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Raw projection:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<img style="max-width: 100%;" size="352863" src="cid:185ec972f5acb971f162"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Sinogram</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<img style="max-width: 100%;" size="2030291" src="cid:185ec972f59cb971f161"><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Thanks,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Keven</div>
<div id="m_5512769282249180993appendonsend"></div>
<hr style="display:inline-block;width:98%">
<div id="m_5512769282249180993divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Simon Rit <<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>><br>
<b>Sent:</b> Tuesday, January 24, 2023 12:14 AM<br>
<b>To:</b> Keven Qiu <<a href="mailto:keven.qiu@ucalgary.ca" target="_blank">keven.qiu@ucalgary.ca</a>><br>
<b>Cc:</b> Tadiwa Waungana <<a href="mailto:tadiwa.waungana@ucalgary.ca" target="_blank">tadiwa.waungana@ucalgary.ca</a>>; <a href="mailto:rtk-users@openrtk.org" target="_blank">rtk-users@openrtk.org</a> <<a href="mailto:rtk-users@openrtk.org" target="_blank">rtk-users@openrtk.org</a>><br>
<b>Subject:</b> Re: Cone Beam Reconstruction using Open RTK</font>
<div> </div>
</div>
<div>
<table style="margin-bottom:10px" cellspacing="0" cellpadding="0" border="0">
<tbody>
<tr>
<td style="color:rgb(255,0,0)">[△EXTERNAL]</td>
</tr>
</tbody>
</table>
<br>
<br>
<div>
<div dir="ltr">
<div>Hi,</div>
<div>At first glance, no! The first step is indeed to check that you correctly read the projections, i.e. that your images are converted to line integrals (if needed). I would write to disk what you pass to FDK (with itk.imwrite) and check, e.g., that air is
at 0.</div>
<div>Simon<br>
</div>
</div>
<br>
<div>
<div dir="ltr">On Tue, Jan 24, 2023 at 12:58 AM Keven Qiu <<a href="mailto:keven.qiu@ucalgary.ca" target="_blank">keven.qiu@ucalgary.ca</a>> wrote:<br>
</div>
<blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div dir="ltr">
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">Hello Simon,</span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)"><br>
</span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">We are trying to use OpenRTK to reconstruct some knee images from cone beam CT. We have managed to run the example script
in Python but haven't been able to reconstruct our knee images. We have all the geometry parameters but are still struggling to get it to work. Here is our pseudocode below:</span></div>
<div><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">```</span></div>
<div><span style="font-family:monospace;font-size:12pt">Load projection images from DICOM series using </span></div>
<div><span style="font-family:monospace;font-size:12pt">rtk.ProjectionsReader[ImageType] where ImageType = itk.Image[itk.F, 3]</span><br>
</div>
<div><span style="font-family:monospace;font-size:12pt"><br>
</span></div>
<div><span style="font-family:monospace;font-size:12pt">We construct geometry object with SID, SDD, and gantry angle, and source offset X/Y, <span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">as well as the number of projections</span></span></div>
<div><span style="font-family:monospace;font-size:12pt"><br>
</span></div>
<div><span style="font-family:monospace;font-size:12pt">We create a blank image</span></div>
<div><span style="font-family:monospace;font-size:12pt"><br>
</span></div>
<div><span style="font-family:monospace;font-size:12pt">We pass the <span style="color:rgb(0,0,0);background-color:rgb(255,255,255);display:inline">
projections</span>, blank image, and geometry into the FDK reconstruction method</span></div>
<div><span style="font-family:monospace;font-size:12pt"><br>
</span></div>
<div><span style="font-family:monospace;font-size:12pt">We then pass the projections, FDK return value from previous step and geometry into the field of view mask</span></div>
<div><span style="font-family:monospace;font-size:12pt"><br>
</span></div>
<div><span style="font-family:monospace;font-size:12pt">Finally, we write the reconstructed image to file in NIfTI using rtk.ImageFileWriter[ImageType]</span></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
```</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
We seem to be having a problem when we load any projection images instead of generating them like the FirstReconstruction example with the sphere. We get a blank image of 0's, or a grey image with a circle outline.</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
At first glance, is there anything we are missing?</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Look forward to your response,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0);background-color:rgb(255,255,255)">
Keven Q</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div></blockquote></div>