TRiP98 trafo command



trafo | file / read        export()        point() debug
               cube()      resamplecube    inspect
               noAffine    noNonRigid     invert

Purpose

Handles 4D-transformations for CT, VOI, etc.

Parameters

file
stem name of a .trf-file, containing steering information, i.e. the type of transformation and the number of states. At the time of this writing, the following transformations are supported: The file format is described here.
read
Read a transformation specified by a collection of files, which must reside in the same directory. The stem name of a .trf-file must be given. The contents of this file determines the type of transformation and thus the names of the additional files to be read. These files contain the actual transformation specifications. The naming convention for these additional files is:
<file>_<fromstate>_<tostate>.<trafo>,
where
<fromstate>,<tostate> are the state numbers, derived from the respective entries in the .trf-file,
and the extension <trafo> may be .aff, .dof, and .scr, respectively
export(fmt)
Not yet implemented. Feel free to make propositions for important formats which should be supported.
point(x, y, z, SrcState, DstState)
Transforms the single given point, (x,y,z), from a state, SrcState, to another one, DstState, provided a transformation is loaded. Please keep in mind the specifications of the loaded transformation. Dependent on the type of transformation, the result is unpredictable if the source coordinates are outside the transformation range.
cube(InCube, OutCube, SrcState, DstState)
Transforms a whole cube from one state to another, provided a transformation is loaded. In case of the SCR transformation the size of the cube and the transformation are compared and adjusted. In the case of a AFF transformation it does not matter, whether the size of the cube and the transformation are matching or not. In case of the DOF transformation the user is responsible for the right size of cube and transformation.
resamplecube(InCube,OutCube,nx,ny,nz,algorithm)
Resamples a given cube, InCube, to an outpute cube, OutCube, with new numbers of voxels, nx,ny,nz in the respective directions. The sampling algorithm number must be given, although currently only one (=0) is actually implemented.
inspect
Outputs internal structures and values, for debugging purposes.
noAffine
Flag, which can be combined with the cube or point parameters, if only the non rigid part of a transformation should be performed. The affine part will be ignored.
(Works only with Siemens SCR transformations.)
noNonRigid
Flag, which can be combined with the cube or point parameters, if only the affine part of a transformation should be done. The non rigid part will be ignored.
(Works only with Siemens SCR transformations.)
invert
Flag, which can be combined with the cube or point parameters, if the direction of the transformation should be changed. (Works only with Siemens SCR transformation.)
debug
Debug switch. Lots of output !

Remarks

later

Examples


  1. trafo DeformationFields /read
    trafo /point(130, 124, 25, 2, 1)
    trafo /cube(Source.ctx,Destination.ctx, 2, 1)
    trafo /cube(Source.ctx,DstSCR.ctx, 2, 1) /invert /noAffine /noNonRigid
    
    Reads transformation steering file DeformationFields.trf and subsequent state files (mandatory).
    Transforms the point with patient coordinates 130,124,25 from state 2 to state 1 and outputs the result.
    Transforms the cube Source.ctx to cube Destination.ctx, from state 2 to state 1.

  2. trafo scr /read
    trafo /cube(Src.ctx,DstSCR.ctx, 2, 1) /invert /noAffine /noNonRigid
    
    Reads transformation steering file scr.trf and subsequent state files (we assume an SCR transformation here).
    Transforms the cube Src.ctx to cube DstSCR.ctx, from state 2 to state 1, using the dedicated SCR parameters.

Last updated:
$Id: trip98cmdtrafo.html,v 1.3 2011/03/08 19:02:45 kraemer Exp $
M.Kraemer@gsi.de