IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 6, 2008, 1:41:58 PM (19 years ago)
Author:
eugene
Message:

updates from eam_branch_20071222 : new 3D color map and multiple channels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/kapa2/include/structures.h

    r14590 r16011  
    22/**************** Graphic carries X info around ****************/
    33typedef struct {
    4   Display       *display;
    5   int            screen;
     4  Display       *display;     // X display pointer
     5  int            screen;      // X screen number
    66  int            depth;
    77  Window         window;
    88  Visual        *visual;
    9   int            visualclass;
    10   int            Nbits;
     9  int            visualclass; // is visual dynamic? (XXX change name?)
     10  int            Nbits;       // pixel depth in bits (8, 16, 24, 32)
    1111  GC             gc;
    1212  XFontStruct   *font;
     
    1414  int            x,  y;
    1515  unsigned int   dx, dy;
    16   XColor         cmap[256];
     16  XColor        *cmap;
    1717  Colormap       colormap;
    18   unsigned long  fore;
    19   unsigned long  back;
    20   unsigned long  *color;
    21   unsigned long  pixels[256];
    22   unsigned long  overlay_color[NOVERLAYS];
    23   int Npixels;
    24   int Ncolors;
     18  unsigned long *color;      // graph plotting colors
     19  int            Ncolors;
     20
     21  unsigned long *pixels;      // image pixel colors
     22  int Npixels;                // number of pixels
     23
     24  int            ColorScaleMode; // single colormap for all images??
     25  int nRed;
     26  int nBlue;
     27  int nGreen;
     28
     29  unsigned long  fore;        // basic foreground color
     30  unsigned long  back;        // basic background color
     31
     32  unsigned long  overlay_color[NOVERLAYS]; // image plotting colors
    2533} Graphic;
    2634
     
    5866} TextBox;
    5967
     68/*** 3C color cube histogram tree thingy ***/
     69typedef struct CCNode {
     70  // for the moment, this structure is specific to the color-histogram analysis.  if
     71  // this were a void *pointer and we defined some additional apis, we could use this
     72  // structure to track any 3D space
     73  int count;   
     74  int pixel;
     75  char bottom;
     76  float min[3]; // min value for each of the 3 dimensions for this node
     77  float mid[3]; // mid-point for each of the 3 dimensions for this node
     78  float max[3]; // max value for each of the 3 dimensions for this node
     79  struct CCNode *sub[2][2][2];
     80} CCNode;
     81
    6082/**************** general structures ****************/
    6183typedef struct {
     
    125147} KapaGraphWidget;
    126148
     149typedef struct {
     150  // data associated with this image element
     151  Matrix   matrix;         /* data for picture */
     152  double   zero, range;    /* zero, range for picture to cmap */
     153  double   max, min;       /* zero, range for data to z-value */
     154  double   start, slope;   /* zero, range for cmap to pixels */
     155  Coords   coords;
     156  char     file[1024];     /* name of file */
     157  char     name[1024];     /* name of buffer */
     158} KapaImageChannel;
     159
    127160// a single image in the display window
    128161typedef struct {
     
    139172  Button   grey_button;
    140173  Button   rainbow_button;
    141   Button    puns_button;
     174  Button   heat_button;
    142175  Button   overlay_button[NOVERLAYS];
    143176
     
    149182  int      DecimalDegrees;
    150183
    151   // data associated with this image element
     184  double   X, Y;           /* image pixel at screen center */
     185  int      expand;         /* zoomscale */
     186  double   x, y, z;        /* last pointer coords */
     187
    152188  Overlay  overlay[NOVERLAYS];
    153189  Overlay  tickmarks;
    154   Matrix   matrix;         /* data for picture */
    155   double   X, Y;           /* image pixel at screen center */
    156   int      expand;         /* zoomscale */
    157   double   zero, range;    /* zero, range for picture to cmap */
    158   double   max, min;       /* zero, range for data to z-value */
    159   double   start, slope;   /* zero, range for cmap to pixels */
    160   double   x, y, z;        /* last pointer coords */
    161   Coords   coords;
    162   char     file[1024];     /* name of file */
    163   char     name[1024];  /* name of buffer */
     190
     191  unsigned short   *pixmap;   // lookup table for image pixel value to pixel index
     192  int      nPixels;
     193 
     194  KapaImageChannel *image;
     195  KapaImageChannel channel[NCHANNELS];
    164196} KapaImageWidget;
    165197
Note: See TracChangeset for help on using the changeset viewer.