warp_reslice − Applies deformation field and linear transformation |
warp_reslice [ -v ] [ -i infolevel ] [ -n | -l | -p sx sy sz ] [ -d dx dy dz ] [ -c cx cy cz ] [ -a E2_airfile ] [ -b E2_ascii_transfile ] [ -e E2_matrix_string ] [ -g E1_matrix_string ] [ -o E1_ascii_transfile ] [ -j inputvol ] [ -f displacement_vector_field ] [ -t templateexample ] [ -T ox oy oz ] [ -q fx fy fz ksx ksy ksz ] [ -k sx sy sz ] [ -m cmx cmy cmz ] outputvol |
Applies a 3D deformation field to a volume and combines the non-linear warp with a linear transformation matrix. This is a general purpose volume data reslice program, which supports VAPET, ANALYZE and XPRIME volume file formats. |
-v |
Display version number and exit. |
-i level |
silent, std (default), info or debug for control amount of output. |
-n |
Use nearest neighbor voxel interpolation. |
|||
-l |
Use trilinear voxel interpolation. |
-p sx sy sz |
Use sinc interpolation using a kernel size of sx * sy * sz. A Hann weigthing filter is applied. |
-a airfile |
Reads in a binary .air file as generated by alignlinear. The program checks for differences in endian architechture. The matrix is for cubic template voxels as output by the AIR alignlinear program. This is the E2 matrix. |
-b asciitransf2 |
Read in a 3x4 or 4x4 transformation matrix from an ascii file. This is the E2 matrix. |
-o asciitransf1 |
Read in a 3x4 or 4x4 transformation matrix from an ascii file. This is the E1 matrix. |
-g matrixstring |
Get the 3x4 or 4x4 E1 transformation matrix directly from this string. The matrix E1 is transversed row by row. The matrix defines the relationship between homogeneous volume index coordinates in the input volume and in the 12 parameter normalized volume: E1 * output volume coordinates = template index coordinates E2 * template index coordinates = reslice index coordinates Note that this is different from the .air convention where the template coordinates refer to cubic voxel sizes. |
-e matrixstring |
Get the 3x4 or 4x4 E2 transformation matrix directly from this string. Like -g above. |
-j inputvol |
Use this file as the source file for reslicing. If no inputvol is given, the airfile is searched for the name of the reslice file. |
-f dispfield |
Volume containing the displacment vectors. If not specified, zero vectors will be applied. |
-t templateex |
This is the name of a file which defines voxel spacing of the template volume. Use this volume to get the pixel size for reslicing (instead of using standard file from air file). This will override any naming of the template file given in the .air file (-a option) |
-m cmx cmy cmz |
Specify the template voxel spacing here (overriding any other defs). |
-k sx sy sz |
In stead of naming a template file, you can specify the template dimensions here (overriding other defs). |
-d dx dy dz |
Downsample the image by these factors in the x, y and z directions. This is when you want to resample the file over the same field of view as is covered by the template and the displacement map. |
-q fx fy fz ksx ksy ksz |
Use sinc presampling of input volume. Three sinc filters are applied in |
x, y, and z direction before the resampling to the output volume. This is needed to avoid aliasing when downsampling (i.e. output has larger voxel size). The amount of sinc filtering is controlled with fx,fy,fz in the three directions. Each number is a factor describing the downsampling factor which should be a number >= 1. A factor of 1 is no sinc-smoothing, a factor of 2 means remove all freqs above half Nyquist (i.e. when subsampling to twice as large voxels) and so on. The sizes sx sy and sz specify the length of the sinc kernels (voxels) They are 1 dimensional so dont be afraid to make them as large as 31.
-z sx sy sz |
Use these volume dimensions for the output volume. Voxel spacing adjusted accordingly so that the same field of view as the template is covered, unless -c specified as well) |
-c cx cy cz |
Use this voxel spacing for the output volume. (dimension adjusted accordingly unless -z specified also) |
-T ox oy oz |
Specify "origin" header entry manually (this is the AC point in image coordinates) in the output file. Default is to copy the setting from the input file (this may be terribly wrong! - but most people don’t use the origin anyway...) |
-h |
Display this help |
All volio.h file and data formats are supported. |
Applies a 3D deformation field to a volume and combines the non-linear warp with a linear transformation matrix (as produced by the e.g. the AIR registration package, see http://bishopw.loni.ucla.edu This is a general purpose volume data reslice program. For non-linear registration of PET using MR scans of each individual subject, the following setup is assumed: 6 par 12 par nonlinear Post linear linear warp trans/scale PET --> Subject MRI --> Template MRI --> Template MRI --> Aligned PET \_______________________/ \___________/ \___________/ | | | 12 parameter linear Displacement Translation transformation field The PET image(s) is registered with the corresponding MR scan using a 6 parameter rigid body reorientation. The subject MR scan is then aligned to the Talairach (or whatever) template MR scan, using a two step procedure: First the subject MR is aligned to the template using a 12 parameter linear affine transformation (translation, rotation and scale in any 3 directions). The nonlinear warp transforms the 12 parameter resliced subject MR to match the template. This program is able to perform the entire reslice operation, given a transformation matrix and the volume of displacement vectors. The deformation field is represented as a 4 dim. volume, with the last (outer) index being 0, 1 or 2 for X, Y or Z coordinate of the displacement vector. The displacements are stored in units of cm’s. The template volume covers the same field of view as the template volume but may be in lower resolution by any integral factor in each 3 dimensions (i.e. as produced by compute_warp). The program will resample the input volume ’inputvol’ over a field of view that may be different from the field of view covered by the displacement field. Define the following coordinates (measured in image indices, first voxel is (0,0,0)) Subject PET: p = (px, py, pz, 1) 12 parameter normalized MR: m = (mx, my, mz, 1) Template: t = (tx, ty, tz, 1) Aligned PET: u = (ux, uy, uz, 1) Displacement field vector F(t) = (F1(t), F2(t), F3(t), 0) 12 par. AIR transformation 4x4 matrix E2 Output translation 4x4 matrix E1 The program generates the following coordinate shift: p = E2*m m = t/t(4) + F(t) t = E1*u Note that if you do not wish to apply a deformation field but only the matrix transformation E1 or E2 you do not need to specify any information regarding the template volume. You will need to specify the total dimensions and voxel size of the output volume. If you do wish to apply a deformation field, you will need to specify the template size and voxel size, since the displacement field covers the same field of view as the template file. |
Please tell me if you find any! |
Ulrik Kjems <uk@imm.dtu.dk>, see also http://eivind.imm.dtu.dk/staff/kjems |
gauss_vol(1), histo_vols(1), subsample(1), file2vapet(1), file2ana(1), file2xprime(1), headerinfo(1), resize_vol(1), convert_vol(1), covar(1), flip(1), region(1), compute_warp(1), warp_reslice(1), warp_reconcile(1), |