<div dir="ltr"><div>Hi,</div><div>FDK takes as second input a stack of projections images, not a constant image. You need to convert your projections to line integrals. Instead of using an ImageFileReader, you can use <a href="http://www.openrtk.org/Doxygen/classrtk_1_1ProjectionsReader.html">rtk::ProjectionsReader</a> does this for you.<br></div><div>The constant image as first input can be left as is and is used to indicate the characteristics of the reconstructed image (number of pixels, spacing, origin, etc.).</div><div>Simon<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Feb 12, 2022 at 2:58 AM Fernando Hueso González <<a href="mailto:Fernando.Hueso@uv.es" target="_blank">Fernando.Hueso@uv.es</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>
<p>Hello RTK users,</p>
<p>I am a totally newbie here, and wanted to ask for some help.</p>
<p>I have a dataset of 360 raw images, each corresponding to an X-ray of an object in steps of 1 degree (rotating around origin). They correspond to a flat panel detector and a microfocus X-ray source. I would be interested in reconstructing the 3D geometry using FDK backprojection. (I also have all the information about detector and source distance, etc.)</p>
<p>I was able to follow the FirstReconstruction.cxx example on GitHub to create my geometry object.
</p>
<pre>using GeometryType = rtk::ThreeDCircularProjectionGeometry;
GeometryType::Pointer geometry = GeometryType::New();
for (size_t i = 0; i < 360; i++)
{
geometry->AddProjection(168, 271, i);
}</pre>
<p></p>
<p>I was also able to correctly load the 360x 2D images (a binary array of signed shorts) using ITK:</p>
<pre>using ImageIOType = itk::RawImageIO<short, 2>;
using ImageType = itk::Image<short, 2>;
ImageIOType::Pointer io = ImageIOType::New();
io->SetDimensions(0,768);
io->SetDimensions(1,486);
io->SetByteOrderToLittleEndian();
itk::ImageFileReader<ImageType>::Pointer reader = itk::ImageFileReader<ImageType>::New();
reader->SetImageIO(io);
for (size_t i = 0; i < 360; i++)
{
reader->SetFileName(std::to_string(i)+".raw");
reader->Update();
}</pre>
<p>However, now I am struggling with the next step. I am not sure how to convert all these 360 imageIO projections to a constant image source, as in the FirstReconstruction example.</p>
<p>Or is there a more appropriate way to connect the loaded images to the FDKConeBeamReconstructionFilter ?</p>
<p>
</p>
<pre>using FDKCPUType = rtk::FDKConeBeamReconstructionFilter<ImageType>;
FDKCPUType::Pointer feldkamp = FDKCPUType::New();
feldkamp->SetGeometry(geometry);
???
</pre>
<p>
</p>
<p>Thanks in advance,</p>
<p>Fernando.
</p>
<p>
</p>
<p>
</p>
<p></p>
</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://public.kitware.com/mailman/listinfo/rtk-users" rel="noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div>