Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
STIR
Search
Search
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
STIR-ASIM Howto
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
===File Headers and Formats=== The most frustrating aspect of setting up and using ASIM is undoubtedly file formats and headers. Although headers are necessary the problems they cause are disproportionately irksome. ASIM uses a file header system analogous to, but not compatible with, Interfile Headers. It was suggested (B.E. Washington) that we run Simul with the –I option and use the ASIM demo data as input. One of the output files from that run would provide a template for a header, a text file with extension .yhdr, suitable for use with a voxelised phantom. XCAT avoids the problem of headers by producing raw binary files without headers of any kind. Using the computer configuration at Surrey, XCAT output files are little endian 32 bit floats and have to be converted to 16-bit big endian format with a corresponding .yhdr file which points to it. It was found to be necessary to insert or adjust a fairly small number of parameters of the template header as follows: <pre> original_file_name=${yaff_basename} num_planes=${IF_dim3} x_dimension=${IF_dim1} y_dimension=${IF_dim2} z_dimension=${IF_dim3} x_pixel_size_cm=${IF_pixdim1cm} y_pixel_size_cm=${IF_pixdim2cm} z_pixel_size_cm=${IF_pixdim3cm} </pre> Other parameters were left unchanged. The above list includes the shell variable substitution used to edit the actual parameter values into place. For those familiar with LINUX shell scripting the crude technique I used was to pass the entire .yhdr skeleton file with the above variables as shown as a ‘here is’ document input to the ‘cat’ utility, having previously set the shell variables to the actual parameter values. Note - pixel dimensions are in cm rather than mm units. As mentioned above we found the only way to get a voxelised phantom into ASIM was by converting it to 16 bit big endian format from the XCAT little endian 32 bit floats. MATLAB (google ‘MATLAB’) was used to do this. ASIM works satisfactorily reading and writing its intermediate files which have extension .yaff and textual headers which have extension .yhdr. It was never necessary to adjust intermediate file headers. The final output sinograms have a corresponding .yhdr file but the data file (.yaff) is almost an Ecat 7/STIR compatible file. At the first attempt at getting it into STIR, FBP2D failed to recognise it as an Ecat 7 file. Then an attempt was made to use the STIR utility ‘if_headers_for_ecat7’ but it also refused to recognise the .yaff as Ecat 7 format. An interfile header was produced by editing one obtained from a GATE run. There is also an example .hs file in section F of the ASIM user guide. The following parameters were changed using the .ydhr as a guide. This inability to process the .yaff files directly could be a limitation of ASIM or STIR or both. <pre> name of data file := <nowiki>asim_nrmd_noisey_sino.ya</nowiki>ff originating system := ECAT 962 imagedata byte order := BIGENDIAN !number format := float !number of bytes per pixel := 4 number of dimensions := 4 <nowiki>matrix axis label [4] := segment</nowiki> <nowiki>!matrix size [4] := 5</nowiki> <nowiki>matrix axis label [3] := view</nowiki> <nowiki>!matrix size [3] := 144</nowiki> <nowiki>matrix axis label [2] := axial coordinate</nowiki> <nowiki>!matrix size [2] := { 63,</nowiki>53,53,45,45} <nowiki>matrix axis label [1] := tangential coordinate</nowiki> <nowiki>!matrix size [1] := 288</nowiki> minimum ring difference per segment := { -4,-13, 5,-22, 14} maximum ring difference per segment := { 4, -5, 13,-14, 22} </pre> It is important to remember that the above values may not be appropriate in any other case, they are intended only as a guide about which parameters may need attention. The list above is for the standard 32 ring configuration. When processing the 128 ring configuration use : <nowiki>!matrix size [2] := { 255, 245, 245, 227, 227}</nowiki>
Summary:
Please note that all contributions to STIR may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
STIR:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Toggle limited content width