Purpose: Select a 24 bit (16.7 Million) color graphics output file for image processing output.
Format: TIFF24 <filename>
Notes: When no parameter is given, the TIFF24 file name is automatically generated using the INPUT_A filename as the base name. If a text variable name is specified then that variable contains the file name. TIFF24 files must have an extension of ".TIF" . Unlike the 8 bit TIFF statement the WINDOW and LEVEL variables are not used. Instead the variables RED, GREEN and BLUE are used to represent the color mixture and intensity. Intensity values must be within the range of 0 to 1. Where 0 = minimum intensity and 1 = maximum intensity. ( Example: .78 = 78% of maximum , .009 = less than 1% of full intensity ) .
Example:
# Produce a color image
from a CT image file
# using a simple BGR
color generator
getfile $image_file "Select
an Input File"
input $tiff_file
"Enter Output TIFF Filename "
infile_a $image_file
tiff24 $tiff_file
fract = 1 / 4096
process begin
# Normalize Ct #'s so
we dont have to deal with
# the values less than
zero
ina = ina + 1024
# Calulate red intensities
as a simple ramp up
red = ina * fract
# Green intensities are at a center peak
if ina < 2049
green = (ina * fract)/2
endif
if ina > 2048
green = 1 - (ina * fract)
/ 2
endif
# Blue Values are brightest
at the lower CT #'s
blue = 1 - (ina * fract)
process end
exit
See Also: BMP24