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

Generated on Sat Dec 4 17:12:12 2004 for trees by  doxygen 1.3.9.1