<div dir="ltr">Sorry for those multiple emails. I felt they were not going through to the mailing list as they were not showing up in the archives.<div><br></div><div>Simon, thanks a lot for the reply. I tried "center - 0.5 * scale * (resolution - 1)". I will try what you suggest and see.</div><div><br></div><div>The four valued rotation parameter --- <span style="font-size:12.8px"><rotation>0 0 0.705858 0.708353</rotation> </span>--- in the .cal file is apparently a quaternion of unit length. Can i make an itk::Versor object from the four quaternion values. And then use its GetMatrix() as the direction as shown below:</div><div><br></div><div>itk::Versor<double> gridRot(0, 0, 0.705858, 0.708353);</div><div>dummyReconImage->SetDirection( gridRot.GetMatrix() );</div><div><br></div><div>I tried this and it still dint seem to give the right reconstruction. Any suggestions?</div><div><br></div><div>Should i be rotating the origin using this matrix before setting it using SetOrigin() maybe?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 10, 2016 at 7:44 AM, Simon Rit <span dir="ltr"><<a href="mailto:simon.rit@creatis.insa-lyon.fr" target="_blank">simon.rit@creatis.insa-lyon.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
Hi,<br>
I haven't used the Digisens geometry reader so I hope that it works
fine. Be careful with it because I don't think it's been thoroughly
tested.<br>
Regarding the definition of the volume, in ITK, the origin is the
coordinate of the first voxel. This is what allows you to place the
volume at the right location. Using your grid parameters, I would
say that you have to set the origin as (coordinate-by-coordinate)<br>
scale * 0.5 * (resolution-1) + center<br>
so that the center of the reconstructed volume is around the
"center" parameter of your xml file.<br>
The direction would allow you to tilt your volume but since I don't
understand the digisens parameter, I can't help you. I advise you to
work on it later.<br>
I hope this helps. Good luck!<br>
Simon<div><div class="h5"><br>
<br>
<div>On 10/02/2016 02:03, Deepak Roy
Chittajallu wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div dir="ltr"><span style="font-size:12.8px">Hello All,</span>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">I have at hand a stack of
projection images and the projection geometry defined in a
.cal file of digisens. I am trying to use RTK to do the
reconstruction.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">I used <a href="http://www.openrtk.org/Doxygen/classrtk_1_1DigisensGeometryReader.html" target="_blank">rtk::DigisensGeometryReader</a> to read the
.cal file and generate the geometry.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Then i call <a href="http://www.openrtk.org/Doxygen/classrtk_1_1FDKConeBeamReconstructionFilter.html" target="_blank">rtk::FDKConeBeamReconstructionFilter</a> to
do the reconstruction by supplying to it as Inputs -- the
geometry, a dummy reference image of the reconstructed volume
(with origin, spacing, size, direction etc), and the stack of
projection images.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">But i am getting a blank volume as
reconstruction.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">I suspect the problem is with
positioning the reconstructed volume (specified via the dummy
reference image).</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">As a sample attached is the
digisens .cal file that RTK uses for testing purposes which
looks very similar to mine.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">In lines 642-656, it seems to
define the postion, size, and spacing of the reconstructed
volume via the following schema:</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">---------------------------------------------------------------------</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">
<div> <Grid></div>
<div> <rotation>0 0 0.705858 0.708353</rotation></div>
<div> <center>-1.23119 -16.6554 10.2144</center></div>
<div> <scale>0.2 0.2 0.2</scale></div>
<div> <resolution>289 399 360</resolution></div>
<div> <autoRotation>true</autoRotation></div>
<div>
<cylinderConstraint>false</cylinderConstraint></div>
<div>
<cylinderConstraintFromGrid>false</cylinderConstraintFromGrid></div>
<div>
<name>C:/Documents/2011_02_14_15-15-12_FenteAl/reconstruction.vol</name></div>
<div> <format>2</format></div>
<div> <beamHardening>0</beamHardening></div>
<div> <background>0</background></div>
<div> <colorscaling>1 0</colorscaling></div>
<div> <rawOutput></rawOutput></div>
<div> </Grid></div>
</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">-----------------------------------------------------------------------</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">I understand the <scale>
(spacing in mm) and <resolution> (size) elements. These
can be used to SetSize() and SetSpacing() of the dummy
reconstructed volume provided as input to the reconstruction
filter.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">I dont know how to translate the
<rotation> and <center> to SetOrigin(), and
SetDirection() of the dummy reconstructed volume.</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Does anyone know how to do this?</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Or alternatively, is there a way
to automatically set these to reconstruct the maximum possible
extent of the object positioned in between the source and
detector?</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Regards,</div>
<div style="font-size:12.8px"><br>
</div>
<div style="font-size:12.8px">Deepak</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
Rtk-users mailing list
<a href="mailto:Rtk-users@public.kitware.com" target="_blank">Rtk-users@public.kitware.com</a>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div style="color:rgb(136,136,136);font-size:12.8000001907349px">Deepak Roy Chittajallu, Ph.D.<div>R&D Engineer, Medical Computing Team<br><div><a href="http://www.kitware.com/" style="color:rgb(17,85,204)" target="_blank">Kitware Inc</a>, Carrboro, NC, USA</div><div>E-mail: <a href="mailto:cdeepakroy@gmail.com" style="color:rgb(17,85,204)" target="_blank">cdeepakroy@gmail.com</a><br>URL: <a href="http://www.drchittajallu.info/" style="color:rgb(17,85,204)" target="_blank">http://www.drchittajallu.info</a></div></div></div><div style="color:rgb(136,136,136);font-size:12.8000001907349px">Linkedin: <a href="https://www.linkedin.com/in/cdeepakroy" style="color:rgb(17,85,204)" target="_blank">https://www.linkedin.com/in/cdeepakroy</a></div></div></div></div>
</div>