Changeset 20938 for trunk/psphot/src/psphotVisual.c
- Timestamp:
- Dec 7, 2008, 4:52:04 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/psphot/src/psphotVisual.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotVisual.c
r20594 r20938 26 26 27 27 isVisual = mode; 28 return true; 29 } 30 31 bool psphotVisualShowMask (int kapaFD, psImage *inImage, const char *name, int channel) { 32 33 KiiImage image; 34 KapaImageData data; 35 Coords coords; 36 37 strcpy (coords.ctype, "RA---TAN"); 38 39 psStats *stats = psStatsAlloc (PS_STAT_ROBUST_MEDIAN | PS_STAT_ROBUST_STDEV); 40 psRandom *rng = psRandomAlloc(PS_RANDOM_TAUS, 0); 41 if (!psImageBackground(stats, NULL, inImage, NULL, 0, rng)) { 42 fprintf (stderr, "failed to get background values\n"); 43 return false; 44 } 45 46 image.Nx = inImage->numCols; 47 image.Ny = inImage->numRows; 48 49 ALLOCATE (image.data2d, float *, image.Ny); 50 for (int iy = 0; iy < image.Ny; iy++) { 51 ALLOCATE (image.data2d[iy], float, image.Nx); 52 for (int ix = 0; ix < image.Nx; ix++) { 53 image.data2d[iy][ix] = inImage->data.U8[iy][ix]; 54 } 55 } 56 57 strcpy (data.name, name); 58 strcpy (data.file, name); 59 data.zero = -1; 60 data.range = 32; 61 data.logflux = 0; 62 63 KiiSetChannel (kapaFD, channel); 64 KiiNewPicture2D (kapaFD, &image, &data, &coords); 65 66 for (int iy = 0; iy < image.Ny; iy++) { 67 free (image.data2d[iy]); 68 } 69 free (image.data2d); 70 71 psFree (stats); 72 psFree (rng); 73 28 74 return true; 29 75 } … … 1336 1382 } 1337 1383 1338 bool psphotVisualShowSourceSize (p sArray *sources) {1384 bool psphotVisualShowSourceSize (pmReadout *readout, psArray *sources) { 1339 1385 1340 1386 int Noverlay, NOVERLAY; … … 1398 1444 KiiLoadOverlay (kapa, overlay, Noverlay, "blue"); 1399 1445 FREE (overlay); 1446 1447 psphotVisualShowMask (kapa, readout->mask, "mask", 2); 1400 1448 1401 1449 // pause and wait for user input:
Note:
See TracChangeset
for help on using the changeset viewer.
