<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);">
Hi Andreas,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You are correct, I had failed to flip the y and z coordinates of the offset parameter in the header. I had thought that the transformmatrix would take care of this. Now the simulated projection looks as desired. Thank you!</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
You mentioned the possibility of applying pre-processing on the CB projections for a bow-tie filter. Do you know what kind of pre-processing is available within RTK for bow-tie filters? I ask because I plan on subtracting the measured CBCT projections from
the simulated CT-registered projections. However, the measured CBCT projections have the characteristic attenuation pattern on the left and right side of the image corresponding to a bow-tie filter. Can RTK remove these two regions of greater attenuation? </div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Also, would you happen to know if rtkprojections, when converting the raw projection float values to attenuation, is compatible with Varian raw projection data? I ask this because the studies I have read that perform this procedure use Elekta projection data.
The output attenuation values for my measured projection data in air region is about ~2 mm-1 after conversion with rtkprojections. Whereas, I previously converted the HU of the registered CT volume to attenuation using the formula: mu = (HU + 1024)/2^16 which
shows air to be ~0.019mm-1 once forward projected.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thank you kindly for your advice,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Brani</div>
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Andreas Andersen <andreasga22@gmail.com><br>
<b>Sent:</b> Tuesday, 26 May 2020 4:51 PM<br>
<b>To:</b> Brani Rusanov <Brani_Rusanov@hotmail.com><br>
<b>Cc:</b> rtk-users@public.kitware.com <rtk-users@public.kitware.com><br>
<b>Subject:</b> Re: [Rtk-users] Unable to Forward Project CT Volume With Correct Orientation</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>What do you more precisely mean by "The output projections do not look like the raw projections I have from the CBCT"</div>
<div>Are they flipped, are they all black, are they much brighter or darker, or do they not align?<br>
<br>
</div>
<div>If alignment: Consider if you need to sort the projections by gantry angle before visual comparison, the Xim reader just reads sequentially by the given regex, so a ProBeam CB (with two imagers) may interleave projections from different angles. This is
unlikely to be a problem for a gantry with only one imager.</div>
<div><br>
</div>
<div>If flipped or all black: Your transformation matrix looks correct to me, so I think the problem may be elsewhere.</div>
<div dir="ltr">
<div>It's always a mess to figure out. Be careful, that when you flip axes manually like that that you also remember to flip offsets (origin), spacing, etc. accordingly.</div>
<div>In particular orientation (directions), I can see it says RAI for "AnatomicalOrientation", but I think you'll need the "Orientation" tag with direction cosines if you want to specify the directions manually.</div>
<div><a href="https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fitk.org%2FWiki%2FITK%2FMetaIO%2FDocumentation%23MetaObject_Tags&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220302299&sdata=2ZmsSExCABkVNp%2FB7i%2BdRO7avF4Ayt4i7bWNVM7VHn0%3D&reserved=0" originalsrc="https://itk.org/Wiki/ITK/MetaIO/Documentation#MetaObject_Tags" shash="z8ozhG+mguPKgcPsAsRSGmU4ei0YyK4DR0BLHoYgovc9254DW5aRwabXAx96wbojmZPyyc4XnCpiPZbR8xZyywBvmItdVJrrdhOAglkrU9sxxRjdRD1GVa4RzDhKDdf5oXZdgngnlIAG7SGUfhoptfkHx5F8Zia00jDPqYbEaig=">https://itk.org/Wiki/ITK/MetaIO/Documentation#MetaObject_Tags</a></div>
<div><br>
</div>
<div>All this being said, I would suggest to instead use ITK's readers and the built-in filters for image transformation if that's even necessary, to avoid the hell of trying to keep track of all these values manually.</div>
<div><br>
</div>
<div>If intensity is darker or brighter: Check if you have preprocessed the CB projections correctly for bow-tie filter and the like.</div>
<div><br>
</div>
<div>I hope this gives a hint to where the problem might be.</div>
<div><br>
</div>
<div>/Andreas<br clear="all">
<div>
<div dir="ltr" class="x_gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<p style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:rgb(31,73,125)"><span lang="EN-US" style="font-size:11pt; line-height:16.8667px; font-family:Calibri,sans-serif">__________________________________</span></span></p>
<p style="margin-bottom:0.0001pt"><span lang="EN-US" style="color:rgb(31,73,125)"><span lang="EN-US" style="font-size:11pt; line-height:16.8667px; font-family:Calibri,sans-serif">Andreas Gravgaard Andersen</span></span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:12pt; font-family:"Times New Roman",serif; color:black">
<span style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)">Danish Center for Particle Therapy, </span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:12pt; font-family:"Times New Roman",serif; color:black">
<span style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)">Aarhus University Hospital<u></u><u></u></span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:12pt; font-family:"Times New Roman",serif; color:black">
<span lang="DA" style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)">Palle Juul-Jensens Blvd. 99,</span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:12pt; font-family:"Times New Roman",serif; color:black">
<span lang="DA" style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)">8200, Aarhus</span></p>
<div>
<p style="margin:0cm 0cm 0.0001pt; font-size:12pt; font-family:"Times New Roman",serif; color:black">
<span lang="DA" style="font-size:11pt; font-family:Calibri,sans-serif; color:rgb(31,73,125)">Mail: <a href="mailto:agravgaard@protonmail.com" target="_blank">agravgaard@protonmail.com</a></span></p>
<p style="margin:0cm 0cm 0.0001pt; font-size:12pt; font-family:"Times New Roman",serif; color:black">
<span style="color:rgb(31,73,125); font-family:Calibri,sans-serif; font-size:11pt">Cell: </span><span style="color:rgb(31,73,125); font-family:Calibri,sans-serif; font-size:11pt"> </span><a value="+4523382411" style="font-family:Calibri,sans-serif; font-size:11pt; color:rgb(17,85,204)">+45
3165 8140</a></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Tue, 26 May 2020 at 05:08, Brani Rusanov <<a href="mailto:Brani_Rusanov@hotmail.com">Brani_Rusanov@hotmail.com</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div 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://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.semanticscholar.org%2Fpaper%2Fnuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray%2F1ec27be3617dfc4e03bba86dcd92db8f3323de21%2Ffigure%2F3&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220302299&sdata=38k6I1zbNt9Ztug3AEmqufJziS7RIeVS93bFlYmY8ms%3D&reserved=0" originalsrc="https://www.semanticscholar.org/paper/nuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray/1ec27be3617dfc4e03bba86dcd92db8f3323de21/figure/3" shash="fTM2/FjPRN1mZslpfmSp3Ac+/RQw7ZjnVnq9oYgcTNQ4kwipW0J5683UhWzrNPhJCVZiNxWOdCE8LlYrkzw5cCcHRARgl+U2cE5JJ3aXQQEnSAkUUMk1Btptjb3bu6waSLalSKJWb2eUlLPHRKvW/CGGVVZh2vWn2rw0+z+WFFQ=" rel="noopener noreferrer" target="_blank" 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 href="https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.semanticscholar.org%2Fpaper%2Fnuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray%2F1ec27be3617dfc4e03bba86dcd92db8f3323de21%2Ffigure%2F3&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220312293&sdata=t5krH2%2BS8BqG%2BCQI0WAoV94cl95TBd3fQvqc8EUpv7I%3D&reserved=0" originalsrc="https://www.semanticscholar.org/paper/nuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray/1ec27be3617dfc4e03bba86dcd92db8f3323de21/figure/3" shash="kcKktHFyF1qsh3P4+AAxuttZnaZC5l7IFModm+vo79rHBvi3LUPDaZf1+/6ReBBL5vXqaRcvm09M3YjSFSVDm+UGDk/PkC74ARVLSUoLDkzNbNpsD8mYVHRnBPpkzw6mhaewg3xXyAZjzZ+vJCkEIOVoqLdubaidpm5yM6j8x3g=" target="_blank" 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 href="https://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.semanticscholar.org%2Fpaper%2Fnuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray%2F1ec27be3617dfc4e03bba86dcd92db8f3323de21%2Ffigure%2F3&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220312293&sdata=t5krH2%2BS8BqG%2BCQI0WAoV94cl95TBd3fQvqc8EUpv7I%3D&reserved=0" originalsrc="https://www.semanticscholar.org/paper/nuclear-science-and-technology-Radiation-Quantities-Brink-McNitt-Gray/1ec27be3617dfc4e03bba86dcd92db8f3323de21/figure/3" shash="kcKktHFyF1qsh3P4+AAxuttZnaZC5l7IFModm+vo79rHBvi3LUPDaZf1+/6ReBBL5vXqaRcvm09M3YjSFSVDm+UGDk/PkC74ARVLSUoLDkzNbNpsD8mYVHRnBPpkzw6mhaewg3xXyAZjzZ+vJCkEIOVoqLdubaidpm5yM6j8x3g=" target="_blank" style="margin:0px">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)">
<a href="https://eur05.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.semanticscholar.org%2F&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220312293&sdata=O4e5uTw2FXYaR2smfbVaqhpGDxbR6N4p%2F6s6daZ8XXE%3D&reserved=0" originalsrc="http://www.semanticscholar.org/" shash="Qrd5GXB5wcVAyN9Cs8jh9wKcjugEM36c+wHpNYp+U5Df1eSDqHFAnQAB0lCB5JVrfwkl+VENGfA+IQwHT3BuePLnIblTkupCQOSJt+6hRPAmM4q9xE6pgOSiG7fCfuz/gZgwVQ3Lt0K4GG5uTl4I8sBle2o047DzO1aSW9sUC68=" target="_blank">www.semanticscholar.org</a></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>
</div>
_______________________________________________<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://eur05.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpublic.kitware.com%2Fmailman%2Flistinfo%2Frtk-users&data=02%7C01%7C%7C7ef45dc6b2294a6111e208d801520e5f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637260799220322282&sdata=rEtT1yvJkExK7XBd9vaVFqdBI%2F%2FY8UtNwE80AP5BaGU%3D&reserved=0" originalsrc="https://public.kitware.com/mailman/listinfo/rtk-users" shash="W+q7SwGW/A+0MQS/tMfA1eEqHv2jVbHIe7z+SIh5xU8f4TvS1wFv4nBE4O3Bdjsz/aCNemZNFX6dyapwgciXHkfcKqQmjq2KBWTIg3vR1SgV7YaCyztmJv5rGxEWdK3sVt6txh/8O3KV4YFSs7Yl1hRLfGvpRi6aM6hlWMpjVmc=" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote>
</div>
</div>
</div>
</body>
</html>