One point of clarification. x = Dimension 0 of axis vector y = Dimension 1 of axis vector z = Dimension 2 of axis vector I don't know what higher dimensions correspond to. The order indicates which axis is fastest, then next fastest, etc. Order 0 is fastest, order 1 next fast, order 2 next, etc. For VIMS cubes, we have SAMPLE(x) BAND (z) LINE (y) Assuming 3 samples, 2 bands, 4 lines Stored as (x,y,z) (0,0,0)(1,0,0)(2,0,0)(0,1,0)(1,1,0)(2,1,0) (0,0,1)(1,0,1)(2,0,1)(0,1,1)(1,1,1)(2,1,1) (0,0,2)(1,0,2)(2,0,2)(0,1,2)(1,1,2)(2,1,2) (0,0,3)(1,0,3)(2,0,3)(0,1,3)(1,1,3)(2,1,3) axes = 3; // X axis = SAMPLE axis[0].order = 0; // Fastest axis[0].size = 63; // Maximum (0 based size) 64 pixels axis[0].direction = '+'; // Goes across as expected // Y axis = LINE axis[1].order = 2; // Slowest axis[1].size = 63; // Maximum (0 based size) 64 pixels axis[1].direction = '+'; // Goes down as expected // Z axis = BAND axis[2].order = 1; // Second fastest axis[0].size = 351; // Maximum (0 based size) 352 channels (96 vis + 256 ir) axis[0].direction = '+'; // Goes back as expected -- When I use a word it means just what | John Ivens I choose it to mean - neither more | Principal Programmer nor less. | Cassini VIMS -- Humpty Dumpty | (520) 621-7301
--- Begin Message ---
- To: ICL XP Working Group <ICL-XP@pirl.LPL.Arizona.EDU>
- Subject: Pixel data
- From: John Ivens <jivens@lpl.arizona.edu>
- Date: Thu, 20 Dec 2001 11:16:46 -0700
//Pixels have these attributes: class Pixel_Data { unsigned short ID; Specific ID number char code; Code marker (CVS identifier) DataType data_type; SUN_INTEGER, SUN_FLOAT, etc. byte_orders byte_order; BIG_ENDIAN, LITTLE_ENDIAN, others int pixel_bits; Number of bits in this pixel float pixel_bytes; Number of bytes this pixel fits into }; enum DataType { SUN_INTEGER, SUN_FLOAT, SUN_DOUBLE, etc. }; // The pixel_bytes field needs discussion // I would like to discuss the ID and code also // Not sure if data_type should be a seperate object which knows its // byte_order and its pixel_bits or not. //Pixels are stored together in this geometry: class Pixel_Geometry { int axes; The number of axes in the data Axis_Vector axis[axes]; An array of axis information }; class Axis_Vector { int order; The order of this axis in the data int size; How many pixels are in this dimension Direction direction; Either positive or negative } enum Direction { '+', '-' }; // The order is relative to an assumed order of axes, namely // (0,0,0) at the uppermost left corner of the "cube" // +x going "across" // +y going "down" // +z going "back" // Hopefully noone will "mix axes" in the data. -- When I use a word it means just what | John Ivens I choose it to mean - neither more | Principal Programmer nor less. | Cassini VIMS -- Humpty Dumpty | (520) 621-7301--- End Message ---