[Rtk-users] reconstruct a volume from a series of .tifs
Simon Rit
simon.rit at creatis.insa-lyon.fr
Thu Oct 9 02:31:29 EDT 2014
Hi,
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!
To help you a bit there:
- 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.
- 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.
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.
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.
And yes, I have no doubt there is a way to reconstruct these projections...
if they are tomographic projections! Good luck with this,
Simon
On Wed, Oct 8, 2014 at 11:28 PM, M Miller via Rtk-users <
rtk-users at public.kitware.com> wrote:
> I'm trying to reconstruct a volume from a series of .tif projections and
> have a few questions.
> The 360 projections are each 2048x2000 floats, with transmission intensity
> values. The pixel spacing on the detector is 0.048mm.
> The following commands do produce a volume, but the scale is wrong. The
> --proj_iso_* values below are guesses.
>
> 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
> rtkbackprojections.exe --geometry=r:\data\geo.xml
> --path=R:\data\projections -r .tif$ --output=r:\data\fromTifs.mha
> --bp=CudaBackProjection --spacing=.5 --dimension=500
>
> How does rtk know the pixel spacing of the input images?
> I thought I could simplify the problem by using rtksubselect to convert
> the tifs into a mhd/raw set before reconstruction.
>
> 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$
>
> After a surprisingly long wait an mhd/raw pair are produced.
> (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.)
> The output mhd file has the ElementSpacing = 0.254. Where did that come
> from?
> 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.
>
> So, what is the correct way to reconstruct these projections into a volume?
>
> Thanks
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at public.kitware.com
> http://public.kitware.com/mailman/listinfo/rtk-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/rtk-users/attachments/20141009/50d018ea/attachment-0009.html>
More information about the Rtk-users
mailing list