There is one other problem I've found with ReadImage colors. If you read in a 24 bit tiff, the colors become Byte colors [3]. Software rendering can handle these with no problem, but hardware rendering will barf on them. You have to convert them before sending them to Image for Hardware rendering. Guess its time to start getting some of these bugs posted to the bug database and update the bug database.

David

     In DX, a delayed color dataset often has "unsigned byte" colors
ref'ing a "float[256][3]" color map.  DX of course renders images of this
sort with no problem, as ReadImage creates them.

     However, Import refuses to load such a field (even one created by
ReadImage->Export), reporting:

   ----------------------------------------------------------------------
   ERROR:  38::/Import:0: Invalid data: `colors' component must be
                          type INT to `ref' another component  / file
                          'power-button.dx' line 23
   ----------------------------------------------------------------------

     Does anyone have a preference for what list of types should allowed to
"ref" another component in addition to TYPE_INT and TYPE_UBYTE
(e.g. TYPE_BYTE, TYPE_SHORT, TYPE_USHORT).

     The check is at edfio.c:212.  It would need to change along with the
probe code below it.  Anyone have a feel whether other areas break as well?

     FWIW when I hit this I was writing a colormapped volume (byte voxels)
format converter to DX native, trying to mimick what DX does.

Randy



---- SIMPLE BUG DEMO ----

 dx -script
dx> data = ReadImage( "delayed-color-image.tif", "tiff" );
dx> Export(data, "power-button.dx");
dx> data = Import( "power-button.dx" );
0: ERROR: 38::/Import:0: Invalid data: `colors' component must be type INT to `ref' another component / file 'power-button.dx' line 23


--
Randall Hopper (mailto:[EMAIL PROTECTED])
Lockheed Martin Operation Support
EPA Scientific Visualization Center
US EPA MD/24 ERC-1A; RTP, NC 27711


--
.............................................................................
David L. Thompson                          The University of Montana
mailto:[EMAIL PROTECTED]                 Computer Science Department
http://www.cs.umt.edu/u/dthompsn           Missoula, MT  59812
                                           Work Phone : (406)257-8530

Reply via email to