How to convert any file without a header into Petview-readable file
Command Line Arguments Square brackets indicate an argument is optional. Italics indicate a "fill-in-the-blank" item.
icp interp analyze pet infile outfile dx_anal dy_anal dz_anal dx_pet dy_pet dz_pet input_offset input_slcinc nframes
-v [ -x x0 ] [ -y y0 ] [ -z z0 ] [ -Z z1 ]
[ -s scale ] [ -d dim ] [ -D Dim ]
[ -m minslc ] [ -i slcinc ] [ -b ] [ -C ] [ -X dmax ]
where:
Required parameters
infile = input file name
outfile = output file name which must end in .img for Petview.
dx_anal = input images x pixel dimension (mm)
dy_anal = input images y pixel dimension (mm)
dz_anal = input images z pixel dimension (mm)
dx_pet = desired x pixel dimension (mm) in output image
dy_pet = desired y pixel dimension (mm) in output image
dz_pet = desired z pixel dimension (mm) in output image
input_offset = input slices to skip over before interpolating (usually 0)
input_slcinc = for reading matrix: if negative read from the end (usually 1)
nframes = number of pet frames in output: must be <= input_slcinc (usually 1)
Optional parameters:
-v = verbose option (input dataset: min, max, mean, variance, sd)
x0 = x mm offset into analyze matrix (default=0.0)
y0 = y mm offset into analyze matrix (default=0.0)
z0 = z mm offset into analyze matrix (default=0.0)
z1 = z mm limit within analyze matrix (default=end of matrix)
scale = absolute factor applied to interpolated pixels (default=1.0)
dim = square dimension of input slices (default=256)
Dim = square dimension of output PET slices (default=128)
minslc = starting output slice number (default=2)
slcinc = slice increment of output slices (default=(int)dz_pet)
-b byte image (default=short)
-C column major interpolation (default=row major)
-X dmax (default=256 or 512 if PET dimensions are 4mm x 4mm x 4mm)
Note that the input to this option is a file WITHOUT A HEADER. There is a program called "skipheader" that strips the header from any file if you know the size of the header in bytes (Picker file headers are 2048).
icp interp Example:
icp interp analyze pet R0nohdr R0.img 2 2 2 2 2 2 0 1 1 -d 128 -m 1 -i 1
This command takes the input file R0nohdr and creates a Petview-readable output file called R0.img. The size of the voxels in the output file will be the same as the input size (no interpolation). Ive informed the icp program that the matrix size of the input file is 128x128 instead of the default value of 256 and asked it to label the first slice 1 and the rest 2, 3, 4...