<div dir="ltr"><div><div><div><div><div><div><div>Hi,<br></div>RTK takes the spacing given by the tiff reader of itk. For such questions, I strongly suggest to read the code, that's the beauty of open source codes!<br></div>To help you a bit there:<br></div>- rtk::ProjectionsReader is theĀ  base class for converting images to line integrals. It's always two-step: first, it reads in the projections (m_RawDataReader), second it converts it to line integrals (m_RawToProjectionsFilter). Spacing comes from the raw data reader, which is here TIFFImageIO.<br></div>- itk::TIFFImageIO::ReadImageInformation is quite complex but slightly readable. It seems to read in some spacing information, units, etc. m_XResolution is read from TIFFTAG_XRESOLUTION is defined in Modules//ThirdParty/TIFF/src/itktiff/tiff.h and it seems to be the tag 282 in the tiff image.<br></div>To correct this problem since apparently your tiff files are not according to itk expectations, you could change the spacing after reading in the projections by inserting a itk::ChangeInformationImageFilter in the pipeline, after rtk::ProjectionsReader.<br></div>Regarding memory issues, the solution is probably to stream things, as is done in many applications, e.g., rtkwangdisplaceddetectorweighting, with the --divisions option. I think it's quite straightforward to add it in rtksubselect but let me know if you can't figure it out.<br></div>And yes, I have no doubt there is a way to reconstruct these projections... if they are tomographic projections! Good luck with this,<br>Simon<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 11:28 PM, M Miller via Rtk-users <span dir="ltr"><<a href="mailto:rtk-users@public.kitware.com" target="_blank">rtk-users@public.kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I'm trying to reconstruct a volume from a series of .tif projections and have a few questions.<br>
The 360 projections are each 2048x2000 floats, with transmission intensity values. The pixel spacing on the detector is 0.048mm.<br>
The following commands do produce a volume, but the scale is wrong. The --proj_iso_* values below are guesses.<br>
<br>
rtksimulatedgeometry.exe --output=r:\data\geo.xml --nproj=360 --arc=360 --sdd=1860 --sid=1102 --proj_iso_x=-285.496 --proj_iso_y=-260.096<br>
rtkbackprojections.exe --geometry=r:\data\geo.xml --path=R:\data\projections -r .tif$ --output=r:\data\fromTifs.mha --bp=CudaBackProjection --spacing=.5 --dimension=500<br>
<br>
How does rtk know the pixel spacing of the input images?<br>
I thought I could simplify the problem by using rtksubselect to convert the tifs into a mhd/raw set before reconstruction.<br>
<br>
rtksubselect.exe --geometry=r:\data\geo.xml --out_geometry=r:\data\geo_sub.xml --out_proj=r:\data\proj_sub.mhd --path=R:\data\projections -r .tif$<br>
<br>
After a surprisingly long wait an mhd/raw pair are produced.<br>
(Why does it use so much memory? While running rtksubselect needed about 24GB, when all the projection data is <6GB and the output file is <6GB.)<br>
The output mhd file has the ElementSpacing = 0.254. Where did that come from?<br>
Using this mystery 0.254, the true spacing of 0.048, and the true proj_iso_x of -4.8, I calculated the working proj_iso_x value above. There must be an easier way.<br>
<br>
So, what is the correct way to reconstruct these projections into a volume?<br>
<br>
Thanks<br>
_______________________________________________<br>
Rtk-users mailing list<br>
<a href="mailto:Rtk-users@public.kitware.com">Rtk-users@public.kitware.com</a><br>
<a href="http://public.kitware.com/mailman/listinfo/rtk-users" target="_blank">http://public.kitware.com/mailman/listinfo/rtk-users</a><br>
</blockquote></div><br></div>