I don't know about loading into a PDL::Graphics::LUT object, but I use
this 1 liner to load the files:

#
# load_lut($filename)
#
# Loads a color look up table from an ASCII file. returns a piddle
#
sub load_lut
{
    return xchg(byte(cat(rcols(shift))), 0, 1);
} # end of load_lut()...


Also of note, the color values for the TriD stuff are not byte values,
they're floats from 0.0 - 1.0, so you'll need to scale them
appropriately first.

Maybe take a look at the proj transform test I did (somewhere under t/).
It reads an RGB png, but once you get your LUT applied, you should be
able to copy the rest over.

-Judd

On Thu, 2007-11-08 at 11:01 -0500, Greg Ederer wrote:
> Hi All:
> 
> I have some color lookup tables as text files, used to convert data 
> values to image pixels. Where the data are constrained or transformed to 
> be in the range {0..255} the tables list 256 rows of three values:
>     r, g, b
> and where the data have non-uniform ranges, the tables list N rows of 
> five values:
>     min, max, r, g, b
> where data within the range {min .. max} are assigned the associated colors.
> 
> Is there any information on how to convert these tables to 
> PDL::Graphics::LUT objects? I'm trying to use the PDL::Graphics::TriD 
> module to create images of my data, but can't figure out how to get the 
> colors right.
> 
> Thanks,
> --greg
> 
> 
> _______________________________________________
> Perldl mailing list
> [email protected]
> http://mailman.jach.hawaii.edu/mailman/listinfo/perldl
> 
-- 
____________________________
Judd Taylor
Software Engineer

Orbital Systems, Ltd.
3807 Carbon Rd.
Irving, TX 75038-3415

[EMAIL PROTECTED]
(972) 915-3669 x127

_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl

Reply via email to