Changeset 23242 for trunk/psModules/src/extras
- Timestamp:
- Mar 9, 2009, 4:19:37 PM (17 years ago)
- Location:
- trunk/psModules
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
src/extras/pmVisual.c (modified) (8 diffs)
-
src/extras/pmVisual.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/cnb_branches/cnb_branch_20090215/psModules merged eligible /branches/cnb_branch_20090215/psModules 21495-22685
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/psModules/src/extras/pmVisual.c
r21422 r23242 18 18 #include "pmHDU.h" 19 19 #include "pmFPA.h" 20 #include "pmFPAfile.h" 20 21 #include "pmAstrometryObjects.h" 22 #include "pmSubtractionStamps.h" 23 #include "pmTrend2D.h" 21 24 #include "pmFPAExtent.h" 22 25 … … 28 31 # define KAPAY 700 29 32 33 #include "pmAstrometryVisual.h" 34 #include "pmSubtractionVisual.h" 35 #include "pmStackVisual.h" 36 #include "pmSourceVisual.h" 37 38 //#define TESTING 39 40 static bool isVisual = false; 41 42 43 bool pmVisualSetVisual(bool value) { 44 isVisual = value; 45 return true; 46 } 47 48 49 bool pmVisualIsVisual(void) {return isVisual;} 50 51 bool pmVisualClose(void) { 52 pmAstromVisualClose(); 53 pmSubtractionVisualClose(); 54 pmStackVisualClose(); 55 pmSourceVisualClose(); 56 //XXX handle psphot 57 // psphotVisualClose(); 58 return true; 59 } 30 60 31 61 bool pmVisualInitWindow (int *kapid, char *name) { … … 34 64 if (*kapid == -1) { 35 65 fprintf (stderr, "Failure to open kapa.\n"); 66 isVisual = false; 36 67 return false; 37 68 } … … 52 83 53 84 54 bool pmVisualAskUser(bool *plotFlag , bool *packageFlag)85 bool pmVisualAskUser(bool *plotFlag) 55 86 { 56 87 char key[10]; … … 63 94 } 64 95 if (key[0] == 'a') { 65 *packageFlag= false;96 isVisual = false; 66 97 } 67 98 return true; … … 182 213 183 214 bool pmVisualScaleImage(int kapaFD, psImage *inImage, const char *name, int channel, bool clip) { 184 185 215 KiiImage image; 186 216 KapaImageData data; 187 217 Coords coords; 188 218 189 //make sure we have a compatible image type 219 //make sure we have a compatible image 220 if (inImage == NULL) { 221 fprintf(stderr, "Image is NULL, and cannot be displayed\n"); 222 return false; 223 } 224 190 225 if(inImage->type.type != PS_TYPE_F32) { 191 226 fprintf(stderr, "Cannot display this image (imcompatible data type)\n"); … … 194 229 195 230 strcpy (coords.ctype, "RA---TAN"); 231 196 232 197 233 double min, max, stdev, mean; … … 304 340 305 341 #else 306 342 bool pmVisualSetVisual(bool value) {return true;} 343 bool pmVisualIsVisual(void) {return false;} 344 bool pmVisualClose(void) {return true;} 307 345 bool pmVisualInitWindow(int *kapid, char *name){return true;} 308 346 bool pmVisualInitGraph (int kapa, void *section, void *graphdata){return true;} 309 347 310 bool pmVisualAskUser(bool *plotFlag , bool *packageFlag){return true;}348 bool pmVisualAskUser(bool *plotFlag){return true;} 311 349 bool pmVisualImStats(psImage *image, double *mean, 312 350 double *stdev, double *min, double *max){return true;} -
trunk/psModules/src/extras/pmVisual.h
r21422 r23242 10 10 11 11 #if (HAVE_KAPA) 12 13 14 /** Globally enable or disable plotting 15 * @param value - true to enable plotting 16 * @return true 17 */ 18 bool pmVisualSetVisual(bool value); 19 20 21 /** Check whether plotting is enabled 22 * @retrun true if plots should be generated 23 */ 24 bool pmVisualIsVisual(void); 25 26 27 /** Destroy plotting windows at the end of a run 28 * @return true for success */ 29 bool pmVisualClose(void); 12 30 13 31 … … 32 50 * At the user's request, this will disable diagnostic plotting. 33 51 * @param plotFlag, set to false if this plot should be disabled in the future 34 * @param packageFlag, set to false if all plots from this package (e.g. psastro, pmSubtraction)35 * should be disabled.36 52 */ 37 bool pmVisualAskUser(bool *plotFlag , bool *packageFlag);53 bool pmVisualAskUser(bool *plotFlag); 38 54 39 55 … … 115 131 116 132 // kapa-specific data types are changed to void 133 bool pmVisualSetVisual(bool value); 134 bool pmVisualIsVisual(void); 135 bool pmVisualClose(void); 117 136 bool pmVisualInitWindow (int *kapid, char *name); 118 137 bool pmVisualInitGraph (int kapa, void *section, void *graphdata); 119 bool pmVisualAskUser(bool *plotFlag , bool *packageFlag);138 bool pmVisualAskUser(bool *plotFlag); 120 139 bool pmVisualScaleImage(int kapaFD, psImage *inImage, 121 140 const char *name, int channel, bool clip);
Note:
See TracChangeset
for help on using the changeset viewer.
