<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
@font-face
{font-family:"Cambria Math"}
@font-face
{font-family:Calibri}
@font-face
{font-family:Tahoma}
@font-face
{font-family:Consolas}
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black}
a:link, span.MsoHyperlink
{color:blue;
text-decoration:underline}
a:visited, span.MsoHyperlinkFollowed
{color:purple;
text-decoration:underline}
pre
{margin:0cm;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
{margin:0cm;
margin-bottom:.0001pt;
font-size:8.0pt;
font-family:"Tahoma","sans-serif";
color:black}
span.PrformatHTMLCar
{font-family:Consolas;
color:black}
span.TextedebullesCar
{font-family:"Tahoma","sans-serif";
color:black}
span.EmailStyle21
{font-family:"Calibri","sans-serif";
color:#1F497D}
.MsoChpDefault
{font-size:10.0pt}
@page WordSection1
{margin:70.85pt 70.85pt 70.85pt 70.85pt}
div.WordSection1
{}
-->
</style>
</head>
<body bgcolor="white" lang="FR" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Hi Laura,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Judging from the projection image you sent, you seem to be missing a crucial step.
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">The area around your water cylinder is white and the balls are black. This is probably what GATE generates, and it’s the raw data you would obtain
from a scanner. It is (more or less) the power received by each pixel of the detector. Before you backproject this, you have to convert it to attenuations.
</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Check out the Wikipedia page
</span><a href="http://en.wikipedia.org/wiki/Tomographic_reconstruction"><span lang="EN-US">http://en.wikipedia.org/wiki/Tomographic_reconstruction</span></a><span lang="EN-US">.
</span><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Currently your images represent I, and you have to extract p. Only then can you hope to get something coherent from an FDK reconstruction.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">I’m not a specialist of this step of the reconstruction, but some people on this list probably know the details and can help you further.</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Regards,</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D">Cyril</span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt; font-family:"Calibri","sans-serif"; color:#1F497D"> </span></p>
<div>
<div style="border:none; border-top:solid #B5C4DF 1.0pt; padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:windowtext">De :</span></b><span style="font-size:10.0pt; font-family:"Tahoma","sans-serif"; color:windowtext"> rtk-users-bounces@openrtk.org [mailto:rtk-users-bounces@openrtk.org]
<b>De la part de</b> Laura Trubuil<br>
<b>Envoyé :</b> lundi 27 mai 2013 15:45<br>
<b>À :</b> rtk-users@openrtk.org<br>
<b>Objet :</b> Re: [Rtk-users] .dat to .mha image</span></p>
</div>
</div>
<p class="MsoNormal"> </p>
<div>
<p class="MsoNormal">Dear RTK-users,<br>
<br>
I am working on reconstruction with RTK backprojection algorithm.<br>
RTK Wiki examples worked fine but now, I am trying with my own images, and I obtain a result I cannot explain.<br>
<br>
I have 15 projections, simulated with GATE. My phantom is a water cylinder, containing 4 balls of different materials.<br>
I attached one of them with the mail, to give an example (the other are quite similar, only the place of the balls changes).<br>
<br>
I generate a geometry.xml file with the command<b> </b>: <b>rtksimulatedgeometry -o geometry.xml -n 15 --sdd 300 --sid 150</b><br>
and then apply rtkbackprojection with : <b>rtkbackprojections -o output.mha -g geometry.xml -r header.mhd -p.</b>
<br>
I display output.mha with VTK and obtain a white cube...<br>
<br>
Does anybody have an idea of what I am missing? Is the number of projections too small? Is it a display problem?<br>
<br>
Regards,<br>
<br>
Laura Trubuil<br>
<br>
<br>
<br>
Le 13/05/2013 16:14, Simon Rit a écrit :</p>
</div>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<pre>Dear Laura,</pre>
<pre>If you use rtk::FDKConeBeamReconstructionFilter, there is a weighting</pre>
<pre>by the angular gap (angular distance between the previous and the next</pre>
<pre>projection) so that will be a problem. If you only use the</pre>
<pre>backprojection, that should not be a problem.</pre>
<pre>With FDK, there are a few solutions, the simplest being to trick the</pre>
<pre>algorithm by adding 2 projections with zeros at the beginning and the</pre>
<pre>end of your tomosynthesis acquisition.</pre>
<pre>If you have some problems with the geometry, don't hesitate to provide</pre>
<pre>your Gate macros and we can try to help.</pre>
<pre>Simon</pre>
<pre> </pre>
<pre>On Tue, May 7, 2013 at 10:05 AM, Laura Trubuil</pre>
<pre><a href="mailto:laura.trubuil@mail.medecom.fr"><laura.trubuil@mail.medecom.fr></a> wrote:</pre>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<pre>Dear Simon,</pre>
<pre>Thank you for your help.</pre>
<pre> </pre>
<pre>It is a circular cone beam CT, yes.</pre>
<pre>In fact, what I precisely do is working on tomosynthesis. I use the CT</pre>
<pre>scanner simulator of GATE as a basis for a tomosynthesis simulation. The</pre>
<pre>only differences are that the X-Ray dose is lower, and the angle is not 360°</pre>
<pre>but 40° maximum. I do not think it is a problem for RTK, is it?</pre>
<pre>First, I intend to use RTK backprojection, and then, I will try to enhance</pre>
<pre>the quality of the reconstruction by filtering techniques.</pre>
<pre> </pre>
<pre>I have already done some simulations on GATE, for small animal in a first</pre>
<pre>time (because the computation time is too long for real human chest</pre>
<pre>detectors, which are much bigger). It allows me to work on algorithms and</pre>
<pre>test reconstruction with something, for the moment! I will be glad to help</pre>
<pre>you if I can.</pre>
<pre> </pre>
<pre>I will continue studying RTK examples, I will let you know if I make some</pre>
<pre>progress. Thanks again.</pre>
<pre> </pre>
<pre>Regards,</pre>
<pre> </pre>
<pre>Laura</pre>
<pre> </pre>
<pre> </pre>
<pre>Le 07/05/2013 01:50, Simon Rit a écrit :</pre>
<pre> </pre>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<pre>Hi,</pre>
<pre>I don't know the CT simulation module of Gate so I can't help you. I</pre>
<pre>will discuss this matter with my colleagues. We are currently working</pre>
<pre>on a new CT simulation module but we definitely need to investigate</pre>
<pre>how one can reconstruct from the existing module. What is the geometry</pre>
<pre>of the scanner, is it circular cone-beam CT? It is the only geometry</pre>
<pre>that RTK can handle.</pre>
<pre>To understand how to use mhd files, you can look at other examples on</pre>
<pre>RTK wiki. We will work on your problem and I'll let you know as soon</pre>
<pre>as we have progressed but keep us informed if you make some progresses</pre>
<pre>on your side.</pre>
<pre>Regards,</pre>
<pre>Simon</pre>
<pre> </pre>
<pre>On Mon, May 6, 2013 at 9:21 AM, Laura Trubuil</pre>
<pre><a href="mailto:laura.trubuil@mail.medecom.fr"><laura.trubuil@mail.medecom.fr></a> wrote:</pre>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<pre>Dear Simon,</pre>
<pre> </pre>
<pre>Thank you for your answer.</pre>
<pre>I am using the CT Scanner simulation in GATE, so the output available</pre>
<pre>are</pre>
<pre>the ".root" and the ".dat" only.</pre>
<pre> </pre>
<pre>First, I simply tried to change the extension ".dat" to ".mhd" or to</pre>
<pre>".raw"</pre>
<pre>but, as expected, it does not work because I need to specifiy which kind</pre>
<pre>of</pre>
<pre>data the file contains (the role of the header in fact...).</pre>
<pre>Then, I tried to do something with the GateToImage Class, which contains</pre>
<pre>a</pre>
<pre>function called WriteMHD, but it was not a success... I did not find a</pre>
<pre>way</pre>
<pre>to directly obtain ".mhd" from a CT Scanner simulation from GATE. That is</pre>
<pre>when I decided to ask the RTK users!</pre>
<pre> </pre>
<pre>With M. Mory's method, I am now able to open my ".dat" files with</pre>
<pre>ImageFileReader function from ITK, and visualize it with VTK.</pre>
<pre> </pre>
<pre> </pre>
<pre>For the moment, I am trying to reconstruct slices from 15 projections</pre>
<pre>acquired with the CT Scanner example in GATE.</pre>
<pre>Have you got any example of reconstruction of slices from projections</pre>
<pre>with</pre>
<pre>RTK?</pre>
<pre> </pre>
<pre>I already studied the Sphere reconstruction tuto, but it does not help me</pre>
<pre>to</pre>
<pre>understand how I can make use of my ".mhd" files in the RTK algorithms. I</pre>
<pre>will do further research work.</pre>
<pre> </pre>
<pre>Regards,</pre>
<pre> </pre>
<pre>Laura Trubuil</pre>
<pre> </pre>
<pre> </pre>
<pre> </pre>
<pre>Le 05/05/2013 11:20, Simon Rit a écrit :</pre>
<pre> </pre>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<pre>Dear Laura,</pre>
<pre>I think that in the latest version of Gate, you should be able to</pre>
<pre>write mhd files. hdr file format should also work in both platforms.</pre>
<pre>What happens if you change the extension of your output files to .mhd?</pre>
<pre>Regards,</pre>
<pre>Simon</pre>
<pre> </pre>
<pre>On Thu, May 2, 2013 at 10:51 AM, MORY, CYRIL <a href="mailto:Cyril.Mory@philips.com"><Cyril.Mory@philips.com></a></pre>
<pre>wrote:</pre>
<blockquote style="margin-top:5.0pt; margin-bottom:5.0pt">
<pre>Hi Laura,</pre>
<pre> </pre>
<pre>In the .mhd and .raw format, the .raw file is a binary file of floats</pre>
<pre>(or</pre>
<pre>whatever) representing the pixel intensities, and the .mhd a simple</pre>
<pre>header</pre>
<pre>that indicates the number of dimensions, the size in pixels along each</pre>
<pre>dimension, ... Your .dat seems to be exactly the same as the .raw</pre>
<pre>You can create the .mhd header yourself, using a text editor. Here is</pre>
<pre>an</pre>
<pre>example :</pre>
<pre> </pre>
<pre>ObjectType = Image</pre>
<pre>NDims = 2</pre>
<pre>BinaryData = True</pre>
<pre>BinaryDataByteOrderMSB = False</pre>
<pre>CompressedData = False</pre>
<pre>TransformMatrix = 1 0 0 1</pre>
<pre>Offset = -190.5 -190.5</pre>
<pre>CenterOfRotation = 0 0</pre>
<pre>ElementSpacing = 3 3</pre>
<pre>DimSize = 128 128</pre>
<pre>ElementType = MET_FLOAT</pre>
<pre>ElementDataFile = SheppLogan.raw (try to replace this field with your</pre>
<pre>.dat filename)</pre>
<pre> </pre>
<pre>If I were you, I'd start by trying to adjust these parameters until you</pre>
<pre>manage to visualize a single projection (there are plenty of viewers</pre>
<pre>that</pre>
<pre>open mhd/raw files), and then create a header for the whole sequence</pre>
<pre>(NDims</pre>
<pre>= 3, etc ...) and concatenate the .dat binary files into a single one.</pre>
<pre>You</pre>
<pre>could use a script like the following :</pre>
<pre> </pre>
<pre>#!/bin/bash</pre>
<pre># Concatenate all projections into a single raw file</pre>
<pre>NbProj=300</pre>
<pre>i=0</pre>
<pre>list="projection${i}.raw"</pre>
<pre>for i in $(seq 1 1 $(($NbProj-1)))</pre>
<pre>do</pre>
<pre> list="$list projection${i}.raw"</pre>
<pre>done</pre>
<pre>cat $list > SheppLogan.raw</pre>
<pre> </pre>
<pre>which would concatenate all files named "projection0.raw",</pre>
<pre>"projection1.raw", ... into "SheppLogan.raw"</pre>
<pre> </pre>
<pre> </pre>
<pre>-----Message d'origine-----</pre>
<pre>De : <a href="mailto:rtk-users-bounces@openrtk.org">rtk-users-bounces@openrtk.org</a></pre>
<pre>[<a href="mailto:rtk-users-bounces@openrtk.org">mailto:rtk-users-bounces@openrtk.org</a>]</pre>
<pre>De la part de Laura Trubuil</pre>
<pre>Envoyé : jeudi 2 mai 2013 09:29</pre>
<pre>À : <a href="mailto:rtk-users@openrtk.org">rtk-users@openrtk.org</a></pre>
<pre>Objet : [Rtk-users] .dat to .mha image</pre>
<pre> </pre>
<pre>Dear RTK users,</pre>
<pre> </pre>
<pre>I am working on GATE (from Geant4), to create projections images of</pre>
<pre>tomosynthesis.</pre>
<pre>I have projections but they are in ".dat" format (binary matrix of</pre>
<pre>float</pre>
<pre>numbers that stores the simulated tomosynthesis image and is produced</pre>
<pre>for</pre>
<pre>each time slice).</pre>
<pre> </pre>
<pre>I want to reconstruct a 3D volume, from projections, with RTK.</pre>
<pre>To do that, I know I must change the format of my images (for example</pre>
<pre>to</pre>
<pre>.mhd/.raw or to .mha format) but my problem is that I do not know how.</pre>
<pre> </pre>
<pre>I anyone could help...</pre>
<pre> </pre>
<pre>Regards,</pre>
<pre> </pre>
<pre>Laura</pre>
<pre> </pre>
<pre>_______________________________________________</pre>
<pre>Rtk-users mailing list</pre>
<pre><a href="mailto:Rtk-users@openrtk.org">Rtk-users@openrtk.org</a></pre>
<pre><a href="http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users">http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users</a></pre>
<pre> </pre>
<pre>________________________________</pre>
<pre>The information contained in this message may be confidential and</pre>
<pre>legally</pre>
<pre>protected under applicable law. The message is intended solely for the</pre>
<pre>addressee(s). If you are not the intended recipient, you are hereby</pre>
<pre>notified</pre>
<pre>that any use, forwarding, dissemination, or reproduction of this</pre>
<pre>message is</pre>
<pre>strictly prohibited and may be unlawful. If you are not the intended</pre>
<pre>recipient, please contact the sender by return e-mail and destroy all</pre>
<pre>copies</pre>
<pre>of the original message.</pre>
<pre> </pre>
<pre>_______________________________________________</pre>
<pre>Rtk-users mailing list</pre>
<pre><a href="mailto:Rtk-users@openrtk.org">Rtk-users@openrtk.org</a></pre>
<pre><a href="http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users">http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users</a></pre>
</blockquote>
<pre>_______________________________________________</pre>
<pre>Rtk-users mailing list</pre>
<pre><a href="mailto:Rtk-users@openrtk.org">Rtk-users@openrtk.org</a></pre>
<pre><a href="http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users">http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users</a></pre>
<pre> </pre>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
</blockquote>
<p class="MsoNormal"> </p>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1">The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified
that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.<br>
</font>
</body>
</html>