00001 00016 #ifndef __preview_h 00017 #define __preview_h 1 00018 #define IMAGE_WIDTH preview_width 00019 #define IMAGE_HEIGHT preview_height 00020 #define WORDS_PER_PACKET 1024 00021 #include "semaphore.h" 00022 #include "acquisition.h" 00023 struct image_statistics_struct{ 00024 double median; // the median of the preview; 00025 double percent95; // the 95th percentile of the preview 00026 double fwhm; // the median of the fwhm of the full image (calculated with sextractor) in degresss 00027 double overmean; // mean of the overscan region 00028 double overstddev; // standard deviantion of the overscan region 00029 struct acquisition_struct acq; 00030 char filter[1000]; 00031 long filenum; 00032 char comment[1000]; 00033 int status; 00034 }; 00035 00036 enum imstat_status {imstat_void,imstat_running,imstat_done}; 00037 00038 extern volatile int preview_width; 00039 extern volatile int preview_height; 00040 extern volatile int preview_max_width; 00041 extern volatile int preview_max_height; 00042 00043 extern volatile struct image_statistics_struct image_statistics; 00044 void preview_fill_buffer( unsigned char *data, int size ); 00045 extern sem_t preview_sem; 00046 void preview_set_max_dimensions(int x,int y); 00047 void preview_set_enable(int in); 00048 void preview_send_data(); 00049 void preview_readout_finished() ; 00050 void init_imstat(); 00051 extern void ui_preview_data( unsigned char *data, unsigned long size ); 00052 extern void ui_preview_reset(int width,int height ); 00053 extern void ui_image_statistics_changed(struct image_statistics_struct input); 00054 extern sem_t imstat_sem; 00055 #endif