[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Pixel data
//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