Re: I will *NOT* fear raw data ...

New Message Reply Date view Thread view Subject view Author view

From: Ken Schwarz (kschwarz@sgi.com)
Date: 06/14/2000 12:03:03


Oops ... I assumed that you had a *binary* file.

What you need to do is get that regularly-spaced data into a single *binary*
file. This file is a raw list of 8- or 16-bit values. Raw data has *only* the
intensity values - no dimensions, no header, nothing but pixel intensity values.

A 128^3 volume would take up 2097152 bytes for 8-bit values, 4194304 bytes for
16-bit values.

You'll have to convert this data before you can view it. As you can see, you'll
also have to scale the data to fit into 8-bit or 16-bit values. Since you
mentioned that the range of your data may be ~1000.0 you'll have to choose
appropriate scale (and possibly offset) values.

In pseudo-code:
--------------------------------
1) Allocate a 3-dimensional array of integers

2) Read each datum from the ASCII input file

3) Subtract an appropriate offset and multiply the value by appropriate scale
factor to fit within an 8- or 16-bit value (truncate if desired)

4) Place the new value into the corresponding location (x,y,z) in the 3D array

5) After all values are processed open up the output file and output in order
the integers as char (8-bit) or unsigned short (16-bit) data

After the data is converted, then you can perform the steps in my previous
email. Imgcopy will work with 16-bit values also. I memory serves, you have to
include the "#type=ushort" parameter in the command.

Your questions about "touring" the dataset I think can be addressed if you visit
/usr/share/Volumizer/src/apps/OpenGL. There are many examples of the things you
can do with Volumizer, and there are some sample datasets under
/usr/share/Volumizer/data/volumes. Color is done with color look-up table
(CLUT) translation. Transparency can be specified dynamically. Spend some time
with these examples and I think you'll be convinced that Volumizer is the right
tool to view your data.

As far as the origin is concerned, the examples will scale and translate the
volume appropriately to allow viewing. Initally, consider the data to be in
"pixel" coordinates. Most of the example programs have a scaling parameter "-sc
x y z".

Best,

Ken

Tom Impelluso wrote:

> Ken,
>
> You said:
>
> >>Raw data plays very well with Volumizer. There are several ways to skin
> >>this cat. Thankfully the TIFF image format will accomodate 3 dimensions
> >>of imagery. Take your raw data and convert it to .tif format.
> >>Assuming your file is named "raw_128.dat" the conversion command on
>
> Can you point me in the direction of how to do this conversion?
> Again... all I have is
> x y z value
> x y z value
>
> and so on...
>
> Also...
>
> You mentioned , after conversion , to issue:
> voglBasic out.tif
>
> OK... I am confused about this too and I ask you only to prep the way
> (I cannot afford the time if this proves to be the wrong path)
>
> I am still learning about voxel presentations...
> Apparently, I have this "value" ( a single number ) say, between 0 to 1000.00
>
> 1) How is it scaled to a color?
> 2) How is it scaled to an opacity?
> Such that voglBasic will know what to do with it?
>
> Will voglBasic enable me to "tour" the data set?
> Or only look at it?
>
> How does voglBasic "know" where the origin is?
>
> I am asking this cause I fear that the path you suggest leaves too many
> questions in my mind and I am not sure it is the best path...
>
> Tom

--
 ...  Ken Schwarz Tech Consultant (TC) SGI Dallas kschwarz@sgi.com ...
....  Vmail: 972.628.3232 Pager: 888.986.8243 Mobile: 972.672.7278  ....
....               http://reality.sgi.com/kschwarz                  ....
  ... Brain: Pinky, what rhymes with June?  Pinky: No it doesn't.  ...


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Jun 14 2000 - 11:45:35 PDT