[Rtk-users] Difficulties figuring out how to use RTK, Geometries, Origins, etc...

Simon Rit simon.rit at creatis.insa-lyon.fr
Tue Jun 25 17:05:01 EDT 2013


Hi Steven,
This is a rather broad email. Have you had a look at the wiki.openrtk.org?

It's a good start that you have attenuation in mhd format, RTK assumes
that mhd files contain attenuation.

For the geometry, you should start with the doc on the wiki. RTK
geometry defines the geometric relation between the volume and the
projections coordinate spaces. The coordinate system is defined in
your mhd header with the offset (coordinate of the pixel 0,0,0), the
TransformMatrix (orientation of your voxel axis), the ElementSpacing.
AnatomicalOrientation and CenterOfRotation are not used. I would not
work in pixels if I were you but it should still work if everything is
expressed in voxels... We typically change the voxel size during
testing so that becomes very easily messy.

It is not clear in your email if you are using command lines or code.
In the first case, the voxel spacing is expressed as here (also an
example of how to reconstruct one slice only):
http://wiki.openrtk.org/index.php/RTK/Examples/ElektaReconstruction
In the second case, it is defined by the input itk::Image that you
pass to the backprojection filter.

To help you more, I repeat that the geometry are expressed in the
coordinate system of the image so if you change your projection stack
origin from 0 0 0 to -2 0 0, you must change it with
rtksimulatedgeometry --proj_iso_x 2.

Here are some entry points to help you, let us know if you don't
manage to progress with this,
Simon

On Tue, Jun 25, 2013 at 10:26 PM, Steven Pollmann <spollmann at robarts.ca> wrote:
> Hello,
> I've been trying to figure out how to use RTK to perform a reconstruction of some projection data, with little success.  I suspect it is because I do not understand the file formats, and the geometries of RTK.  It seems our in-house backprojection software requires slightly different parameters (that I'm sure map to RTK geometries etc...), but I cannot figure out how.
>
> The projection data I am using has already been corrected for non-uniformities, and bad-pixels.  In addition, I have converted the data into attenuation values, and stored it as floating point (32bit, little endian)
> We have 1000 2D projections in total, each with their angle of acquisition (reported from the machine), in 360degrees.
> The floating point Projections/Attenuation maps are:
> Dimensions: 1024x680 pixels
> Pixel Spacing is: 0.2mm
> Our source-to-detector distance is 704.83mm or 3524.15 pixels (704.83/0.2 = 3524.15)
> The Center of rotation is: 511.21 (in pixels) (x coordinate on projection)
> The Central Slice is: 340 (in pixels) (y coordinate on projection)
> The scanner reports a source-to-isocenter distance of: 542.31mm or 2711.55pixels, although I'm not really sure what this is for, unless it is to figure out the final voxel spacing by figuring out the magnification....
> 0.2 * (542.31/704.83) = 0.153884mm/voxel...
>
> Each projection is stored in a separate file as raw floating point data (of the form flat0000.dat, flat0001.dat.....flat%04d.dat), so i have made a flatHeader.mhd file that contains the following:
> ObjectType = Image
> NDims = 3
> DimSize = 1024 680 1000
> ElementType = MET_FLOAT
> ElementByteOrderMSB = False
> ElementDataFile = flat%04d.dat 0 999 1
>
> I have left ElementSize out, as I've been using it as the default 1, and specifying all the other parameters in "pixels" rather than "mm" (working in "pixels" is more intuitive for me in terms of thinking about the actual discreet data/pixels/voxels, although working in "mm" is fine).
> I am not sure if I am supposed to have an Offset value.  In the example shepp-logan projection data that you can generate from the example in the WIKI, there are a few lines in the header I don't understand:
>
> TransformMatrix = 1 0 0 0 1 0 0 0 1 (?)
>
> Offset = -255 -255 -255 (?)
>
> CenterOfRotation = 0 0 0 (does this get used at all?)
>
> AnatomicalOrientation = RAI
>
> ElementSpacing = 2 2 2  (if we are stacking up projections at different angle, what does it mean to have the third value in ElementSpacing be "2"?  Presumably it gets ignored?)
>
> Anyhow, sorry for the long e-mail.  I'm just not quite sure how to get the expected 1024x1024x680 volume from this data (using rtkfdk or rtkbackproject, or my own code using the RTK library)
>
> If anyone has any hints, and could point my Simple Brain in the right direction, that would be much appreciated!
> Thanks!
>
> Steve
>
> P.S.  as an aside, is there any way to just be able to reconstruct just a single slice?  (Again, I can't seem to figure this out, and would be helpful for testing, without having to reconstruct a whole volume....I Have tried using projection data that is 1024x1 (where I just pick out the middle row), but that wasn't working.
> _______________________________________________
> Rtk-users mailing list
> Rtk-users at openrtk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/rtk-users



More information about the Rtk-users mailing list