<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
Hi all,</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
I am attempting to forward project a CT volume (previously registered to a CBCT volume) using the geometry of a CBCT volume to generate raw projections. I also have access to the raw CBCT projections. I have used rktprojections to stack the raw CBCT projections
 and generate .mhd/raw files. </div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
Next, I used rtkvariabprobeamgeometry on the scan.xml file that came with the raw CBCT projections to generate a RTK compatible geometry.xml file. </div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
Next, I have stacked the registered CT dicoms into a .mhd/raw format. The trouble I'm having is creating the projections using rtkforwardprojections. Specifically, I cannot find the correct transformmatrix in the CT header to tell rtkforwardprojetions the conversion
 from DICOM to IEC geometry. The output projections do not look like the raw projections I have from the CBCT. This may be a stupid question, but I cannot figure it out. From my own estimation, the transformation should be 1 0 0 0 0 -1 0 1 0 based on this diagram
 (<a href="https://www.semanticscholar.org/paper/nuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray/1ec27be3617dfc4e03bba86dcd92db8f3323de21/figure/3" target="_blank" rel="noopener noreferrer" style="margin: 0px">https://www.semanticscholar.org/paper/nuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray/1ec27be3617dfc4e03bba86dcd92db8f3323de21/figure/3</a>
<div style="margin: 16px 0px; max-width: 800px; min-width: 424px">
<table style="padding: 12px; width: 800px; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px">
<tbody>
<tr style="border-spacing: 0px">
<td>
<div style="margin: 0px 12px 0px 0px; height: 104.547px; overflow: hidden"><a target="_blank" href="https://www.semanticscholar.org/paper/nuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray/1ec27be3617dfc4e03bba86dcd92db8f3323de21/figure/3" style="margin: 0px"><img alt="" height="104" width="240" style="margin: 0px; display: block" src="https://ai2-s2-public.s3.amazonaws.com/figures/2017-08-08/1ec27be3617dfc4e03bba86dcd92db8f3323de21/14-Figure1.4-1.png"></a></div>
</td>
<td style="width: 512.667px">
<div style="margin: 0px 8px 12px 0px; font-weight: 300; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif">
<a target="_blank" href="https://www.semanticscholar.org/paper/nuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray/1ec27be3617dfc4e03bba86dcd92db8f3323de21/figure/3" style="margin: 0px; color: var(--themePrimary)">Figure 1.4 from nuclear science
 and technology Radiation Quantities and Units , Dose to the Patients , and Image Quality in Computed Tomography ( CT ) ( RAD UNITS ) Author : | Semantic Scholar</a></div>
<div style="margin: 0px 8px 12px 0px; font-size: 14px; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; color: rgb(102, 102, 102); max-height: 100px; overflow: hidden">
Figure 1.4 (left) The IEC patient coordinate system (the patient is lying in supine position); (right) transformation of coordinates between the IEC and DICOM coordinate systems [IEC, 2000] (cited in ICRU Report 71, 2004, page 35) - "nuclear science and technology
 Radiation Quantities and Units , Dose to the Patients , and Image Quality in Computed Tomography ( CT ) ( RAD UNITS ) Author :"</div>
<div style="margin: 0px; font-size: 14px; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; color: rgb(166, 166, 166)">
www.semanticscholar.org</div>
</td>
</tr>
</tbody>
</table>
<span style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt;">)</span></div>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
My questions are: Is this the correct transformmatrix to apply?<br>
Do I need to also change the offset values in order to get the correct projections? <br>
Could this have something to do with the fact that I am using variant data?<br>
<br>
The .mhd for the registered CT is:<br>
<span style="margin: 0px">ObjectType = Image<br>
</span>
<div style="margin: 0px">NDims = 3<br>
</div>
<div style="margin: 0px">BinaryData = True<br>
</div>
<div style="margin: 0px">BinaryDataByteOrderMSB = False<br>
</div>
<div style="margin: 0px">CompressedData = False<br>
</div>
<div style="margin: 0px">TransformMatrix = 1 0 0 0 0 -1 0 1 0<br>
</div>
<div style="margin: 0px">Offset = -131.03451538085938 -131.03451538085938 -91.809638977050781  <br>
</div>
<div style="margin: 0px">CenterOfRotation = 0 0 0<br>
</div>
<div style="margin: 0px">AnatomicalOrientation = RAI<br>
</div>
<div style="margin: 0px">ElementSpacing = 0.51285523409720002 0.51285523409720002 1.9958648681640625<br>
</div>
<div style="margin: 0px">DimSize = 512 512 93<br>
</div>
<div style="margin: 0px">ElementType = MET_DOUBLE<br>
</div>
<span style="margin: 0px">ElementDataFile = CIRS_6A.raw<br>
</span><br>
Similarly, the .mhd for the raw CBCT projections is:<br>
<span style="margin: 0px">ObjectType = Image<br>
</span>
<div style="margin: 0px">NDims = 3<br>
</div>
<div style="margin: 0px">BinaryData = True<br>
</div>
<div style="margin: 0px">BinaryDataByteOrderMSB = False<br>
</div>
<div style="margin: 0px">CompressedData = False<br>
</div>
<div style="margin: 0px">TransformMatrix = 1 0 0 0 1 0 0 0 1<br>
</div>
<div style="margin: 0px">Offset = -198.46200000000002 -148.798 0<br>
</div>
<div style="margin: 0px">CenterOfRotation = 0 0 0<br>
</div>
<div style="margin: 0px">AnatomicalOrientation = RAI<br>
</div>
<div style="margin: 0px">ElementSpacing = 0.38800000000000001 0.38800000000000001 1<br>
</div>
<div style="margin: 0px">DimSize = 1024 768 501<br>
</div>
<div style="margin: 0px">ElementType = MET_FLOAT<br>
</div>
<span style="margin: 0px">ElementDataFile = CIRS_6A_SCGH_P.raw</span><br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
<span style="margin: 0px"><br>
</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
<span style="margin: 0px">Thank you kindly for your response,</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255)">
<span style="margin: 0px">Brani</span></div>
<br>
</div>
</body>
</html>