Main Page   Compound List   File List   Compound Members   File Members  

mosaic.h

00001 /* Enable the SADIE libraries to be linked to C++ code */
00002 #ifdef __cplusplus
00003 extern "C" {
00004 #endif 
00005 
00006 #ifndef MOSAIC_H
00007 #define MOSAIC_H
00008 
00009 #include "sadie_byte.h"
00010 #include "sadie_short.h"
00011 
00012     
00013 /*----------------------------------------------------------------------------*/
00014 /*    NOTE: When converting between a normal image and a mosaic image:        */
00015 /*          j_mosaic = j_normal - voffset[k]                                  */
00016 /*----------------------------------------------------------------------------*/
00017 
00018 /* Data structure to store the user-defined region-of-interest co-ordinates.  */
00019 /* Currently restricted to a rectangular region with arbitrary orientation.   */
00020 /* This forms a part of the MOSAIC_INDEX data structure.                      */
00021 typedef struct {
00022     unsigned short  left[2];            /* Co-ordinates of left extreme point
00023                                            in ROI                             */
00024     unsigned short  right[2];           /* Co-ordinates of right extreme point
00025                                            in ROI                             */
00026     unsigned short  top[2];             /* Co-ordinates of top extreme point
00027                                            in ROI                             */
00028     unsigned short  bottom[2];          /* Co-ordinates of bottom extreme
00029                                            point in ROI                       */
00030 }                       REGION_OF_INTEREST;
00031     
00032 
00033 /* Data structure to store the bounding rectangle for the frames.             */
00034 /* This forms a part of the MOSAIC_INSEX data structure                       */
00035 typedef struct {
00036     unsigned short  startx;
00037     unsigned short  endx;
00038     unsigned short  starty;
00039     unsigned short  endy;
00040 }                       MOSAIC_FRAME;
00041 
00042 
00043 /* Data structure to store the index values for a mosaic image.               */
00044 /* This information is vital to retrieve the raster image from the mosaic.    */
00045 /* Refer to Conner's thesis for more information.                             */
00046 typedef struct {
00047     unsigned short  nlin;               /* Number of lines in mosaic          */
00048     unsigned short  npix;               /* Number of pixels/line              */
00049     unsigned short  height_max;         /* Maximum number of pixels in a
00050                                            given line                         */
00051     short  nframe;                      /* Number of frames in the mosaic     */
00052     unsigned short  *voffset;           /* Pointer to offset of each column
00053                                            of data                            */
00054     unsigned short  *vheight;           /* Pointer to the height of each
00055                                            column of data                     */
00056     unsigned short  hstart;             /* X co-ordinate of left extreme
00057                                            point in ROI                       */
00058     unsigned short  hend;               /* X co-ordinate of right extreme
00059                                            point in ROI                       */
00060     unsigned short  *vstart;            /* Pointer to the start of ROI for
00061                                            each column of data                */
00062     unsigned short  *vend;              /* Pointer to the end of ROI for each
00063                                            column of data                     */
00064     REGION_OF_INTEREST *roi;      /* Pointer to the co-ordinates of ROI */
00065     MOSAIC_FRAME *frame;                /* Position and size of each frame    */
00066 }                       MOSAIC_INDEX;
00067 
00068 
00069 
00070 /*----------------------------------------------------------------------------*/
00071 
00072 extern short CHECKIMG_MOSAIC_INDEX(MOSAIC_INDEX *);
00073 extern void  RELIMG_MOSAIC_INDEX (MOSAIC_INDEX **);
00074 extern void  RELMEM_MOSAIC_INDEX (MOSAIC_INDEX *);
00075 extern void  GETMEM_MOSAIC_INDEX (int, int, short, MOSAIC_INDEX **);
00076 
00077 extern void  MOSAIC_DISK2INDEX (unsigned char *, MOSAIC_INDEX **);
00078 extern void  MOSAIC_INDEX2DISK (MOSAIC_INDEX *, unsigned char *);
00079 
00080 extern void  MOSAIC_BYTE_RESAMPL (IMAGE_BYTE *, MOSAIC_INDEX *, short, short, short, short, IMAGE **);
00081 extern void  MOSAIC_BYTE_EXTRACT (IMAGE_BYTE *,MOSAIC_INDEX *, int, int, int, int, PIXEL,IMAGE **);
00082 extern void  MOSAIC_BYTE_INSERT (IMAGE *, MOSAIC_INDEX *, int, int, IMAGE_BYTE **);
00083 extern void  MOSAIC_BYTE_EXPORT (IMAGE_BYTE*, char*);
00084 extern void  MOSAIC_IMPORT (MOSAIC_INDEX *, char *, int,int ,int , int,int ,int , IMAGE **);
00085 
00086 extern void  MOSAIC2MOSAIC_RESAMPL (IMAGE_BYTE *, MOSAIC_INDEX *, short, short, short, short, IMAGE_BYTE **);
00087 extern void  INDEX_RESAMPL (MOSAIC_INDEX *, int, MOSAIC_INDEX **);
00088 extern void  MOSAIC_BYTE_TRACKRINGS (IMAGE_BYTE *, MOSAIC_INDEX *, IMAGE_BYTE **, IMAGE_BYTE **);
00089 
00090 #endif
00091 
00092 #ifdef __cplusplus
00093 }
00094 #endif

Generated on Tue Jun 22 14:32:07 2004 for trees by doxygen1.2.18