Purpose: Compress Integer IMG Files
Format: COMPRESS threshold image file <output file>
Notes: The COMPRESS statement will perform loss-less compression to the integer file image file. If the optional <output file> parameter is specified the compressed image is written to that file, otherwise the original image file is replaced. The threshold parameter value represents the minimum surrounding air values of a CT image. A value of -300 is typical. .If no thresholding is desired then specify the lowest pixel value (-1024 for CT, MRI may vary).
Example:
# Compress and replace the loaded viewer files.
$listq = $temppath "\filelist.q"
input_file $listq
finput inum
finput inum
*Main
finput $infile
compress -300
$infile
inum = inum - 1
if inum > 0
goto Main
endif
exit