[Rtk-users] Difficulties figuring out how to use RTK, Geometries, Origins, etc...
Steven Pollmann
spollmann at robarts.ca
Tue Jun 25 16:26:01 EDT 2013
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.
More information about the Rtk-users
mailing list