next up previous
Next: convert_vol - Change datatype, Up: Brain Volume I/O Handling Previous: headerinfo - Show volume

resize_vol - Resize a volume (add/remove space)  

1997 Ulrik Kjems, DSP/IMM, Technical University of Denmark, uk@imm.dtu.dk
Use:
   resize_vol [-p outputtransfmatrix] [-d newx..z] [-a background] [-s|b newstartx..z] 
              inputvol outputvol

The volume is resized by stripping/adding boundary. Background may bespecified where the output image exceeds the input image (def. 0)

Use -s and -b to specify where in the output image the input image should 
start. If neither -s or -b is specified the new image is centered around the 
old center. 

-d x y z    Output volume size. Default is same as input volume.
-b x y z    starting index (x,y,z) is relative to the output volume (i.e.
	where does 0,0,0 in output image come from in input image).
-s x y z    starting index (x,y,z) of is relative to the input volume (i.e.
	where does 0,0,0 in input image go in output image).

Use -b when reducing image size, and -s when expanding (adding air 
around the image)

The -p  option produces an ascii file with the 4x4 transformation matrix
so go from coordinates in the input file to the output file. I.e.
if u=(ux,uy,uz,1) is homogeneous coordinate vector for a voxel in
the input image and v is the homogeneous vector for the corresponding voxel
in the output image, the transformation matrix E gives

   v = E*u
resize_vol -h produces above information

Ulrik Kjems
6/3/1998