TRiP98 CT command
| GSI Biophysics | TRiP98 long write-up |

CT


ct | file / import()   list      dim()             debug
            export()   delete    steps()
            read       display   num()
            write      inspect   eqvpathlength()
            slice()    swap
            window() 

Purpose

Handles input and output as well as generation of CT data cubes.

Parameters

file
For read/write specifies the stem of the CT cube's file name (without extension) for input/output, respectively.
Since CT cubes are data cubes they come as a binary <file>.CTX data file together with a text <file>.HED header file.
For export <file> is taken as a prefix.
For the creation of CTs with dim() and steps() <file> is used as a patient name.
For import special file naming conventions apply (see there).
import()
cadslices imports a bunch of CT data slices in Lyon's CADPlan format. cadslicesxy does the same, but for an early version with x running as lines and y running as columns. All slice files need to be specified, wild cards are supported.
isogray imports a bunch of CT data slices in IsoGray format. Only their stem name may be given, and only the files <file>m*.hdr, <file>p*.hdr, <file>m*.sca, <file>p*.sca will be considered.
export(fmt)
Exports the current CT cube in some other format.

With cadslices
the CT is exported in Lyon's CADPlan format.

With gd
data are exported to be plotted with the gd program. Depending on window() or slice() data are exported as a single 1-dim file, a 2-dim file or a series of 2-dim files. File naming convention is:
<prefix>ct.gd,
and
<prefix>ct.um<yyyyyy>.gd,
for 1D and 2D files, respectively, where <yyyyyy> is the slice coordinate (centre) in micrometers. <prefix> is either given by file or, if omitted, derived from either the patient name or, if omitted, from the original input file name.

With ctnum.gd
the CT number (HU or equivalent path) distribution is exported to be plotted with the gd program. window() or slice() are taken into account. File naming convention is:
<prefix>ctnum.gd,
If a HLUT is loaded, the corresponding distribution (equivalent path or HU) is also filed.
read
Read CT data specified by file
write
Writes the current CT cube as specified by file File naming convention is
<file>.ctx, <file>.hed,
or, if file is omitted:
<patient-id>000.ctx, <patient-id>000.hed,
window(xmin,xmax,ymin,ymax,zmin,zmax)
Consider only the specified interval of CT-coordinates for export(). A * may be used to specify the lower/upper limit, respectively.
slice(interval)
Consider only the specified interval of slice numbers for export(). <interval> might be
*
<slice-number>
<low-slice>,<high-slice>
*,<high-slice>
<low-slice>,*
where * stands for "all" or the lower/upper limit, respectively.
list
Show some internal info about the currently loaded CT data.
delete
Deletes the current CT cube from memory (not from file).
display
Displays the current CT cube. Not yet implemented.
inspect
Show some internal info about the current CT cube.
swap
When a CT cube is written, the bytes are swapped.
dim(nx,ny,nz) steps(dx,dy,dz)
When used together with either the num() or the eqvpathlength() parameters a CT cube is generated in memory. <nx,ny,nz> specifies a list of three numbers denoting the number of voxels in the three dimensions. <dx,dy,dz> specifies a list of three numbers denoting the voxel sizes (in mm) in the three dimensions. Note that the file parameter must also be given in order to assign a patient name.
num(hf)
When used together with the dim() and the steps() parameters a CT cube is generated in memory. If <hf> can be interpreted as a reasonable Hounsfield number (hf>=-1000) it will be assumed as a constant value for all CT voxels. Otherwise <hf> is assumed to be the name of a user-supplied executable (plug-in) which calculates the Hounsfield numbers.
eqvpathlength(len)
When used together with the dim() and the steps() parameters a CT cube is generated in memory. If <len> can be interpreted as a reasonable equivalent path length (len>0) it will be assumed as a constant value for all CT voxels. Otherwise <len> is assumed to be the name of a user-supplied executable (plug-in) which calculates the equivalent path lengths.
debug
Debug switch. Lots of output !

Remark

Note that created CT data cubes based on equivalent path length can only be saved to files when a valid Hounsfield table is loaded !

Examples

  1. ct OTTOT3000 / read
    
    Reads CT data (files OTTOT3000.CTX and OTTOT3000.HED) for patient "OTTOT3".
  2. ct xxxxxx /dim(8,4,2) steps(1,1,1) num(17)
    
    Creates a CT data cube with size 8x4x2, a voxel size of 1 mm in either direction and a constant Hounsfield number of 17.
  3. ct 'CADPLAN/250603007*.txt' /import(cadslices)
    
    Imports CADplan CT slices stored in directory CADPLAN
  4. ct "ISOGRAY/80325" /import(isogray)
    
    Imports IsoGray CT slices 80325m*.hdr, 80325p*.hdr, 80325m*.sca, 80325p*.sca stored in directory ISOGRAY

| GSI Biophysics | TRiP98 long write-up |
Last updated: $Id: trip98cmdct.html,v 1.15 2009/08/17 15:45:18 kraemer Exp $
M.Kraemer@gsi.de,