IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 9, 2009, 4:19:37 PM (17 years ago)
Author:
beaumont
Message:

merging from cnb_branch_20090215

Location:
trunk/psModules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules

  • trunk/psModules/src/extras/pmVisual.c

    r21422 r23242  
    1818#include "pmHDU.h"
    1919#include "pmFPA.h"
     20#include "pmFPAfile.h"
    2021#include "pmAstrometryObjects.h"
     22#include "pmSubtractionStamps.h"
     23#include "pmTrend2D.h"
    2124#include "pmFPAExtent.h"
    2225
     
    2831# define KAPAY 700
    2932
     33#include "pmAstrometryVisual.h"
     34#include "pmSubtractionVisual.h"
     35#include "pmStackVisual.h"
     36#include "pmSourceVisual.h"
     37
     38//#define TESTING
     39
     40static bool isVisual = false;
     41
     42
     43bool pmVisualSetVisual(bool value) {
     44    isVisual = value;
     45    return true;
     46}
     47
     48
     49bool pmVisualIsVisual(void) {return isVisual;}
     50
     51bool pmVisualClose(void) {
     52    pmAstromVisualClose();
     53    pmSubtractionVisualClose();
     54    pmStackVisualClose();
     55    pmSourceVisualClose();
     56    //XXX handle psphot
     57    //    psphotVisualClose();
     58    return true;
     59}
    3060
    3161bool pmVisualInitWindow (int *kapid, char *name) {
     
    3464        if (*kapid == -1) {
    3565            fprintf (stderr, "Failure to open kapa.\n");
     66            isVisual = false;
    3667            return false;
    3768        }
     
    5283
    5384
    54 bool pmVisualAskUser(bool *plotFlag, bool *packageFlag)
     85bool pmVisualAskUser(bool *plotFlag)
    5586{
    5687    char key[10];
     
    6394    }
    6495    if (key[0] == 'a') {
    65         *packageFlag = false;
     96        isVisual = false;
    6697    }
    6798    return true;
     
    182213
    183214bool pmVisualScaleImage(int kapaFD, psImage *inImage, const char *name, int channel, bool clip) {
    184 
    185215    KiiImage image;
    186216    KapaImageData data;
    187217    Coords coords;
    188218
    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
    190225    if(inImage->type.type != PS_TYPE_F32) {
    191226        fprintf(stderr, "Cannot display this image (imcompatible data type)\n");
     
    194229
    195230    strcpy (coords.ctype, "RA---TAN");
     231
    196232
    197233    double min, max, stdev, mean;
     
    304340
    305341#else
    306 
     342bool pmVisualSetVisual(bool value) {return true;}
     343bool pmVisualIsVisual(void) {return false;}
     344bool pmVisualClose(void) {return true;}
    307345bool pmVisualInitWindow(int *kapid, char *name){return true;}
    308346bool pmVisualInitGraph (int kapa, void *section, void *graphdata){return true;}
    309347
    310 bool pmVisualAskUser(bool *plotFlag, bool *packageFlag){return true;}
     348bool pmVisualAskUser(bool *plotFlag){return true;}
    311349bool pmVisualImStats(psImage *image, double *mean,
    312350                     double *stdev, double *min, double *max){return true;}
Note: See TracChangeset for help on using the changeset viewer.