diff options
Diffstat (limited to 'tksao/frame/frame3dbase.C')
-rw-r--r-- | tksao/frame/frame3dbase.C | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/tksao/frame/frame3dbase.C b/tksao/frame/frame3dbase.C index 8b16a3b..eec777a 100644 --- a/tksao/frame/frame3dbase.C +++ b/tksao/frame/frame3dbase.C @@ -162,27 +162,11 @@ void Frame3dBase::getInfoWCS(char* var, Vector3d& rr, FitsImage* sptr) Coord::CoordSystem www = (Coord::CoordSystem)(Coord::WCS+ii); if (hasWCS(www)) { - char buff[128]; - sptr->pix2wcs(img, www, wcsSkyFrame_, wcsSkyFormat_, buff); + VectorStr3d out = sptr->mapFromRef(img, www, wcsSkyFrame_, wcsSkyFormat_); - int argc; - const char** argv; - Tcl_SplitList(interp, buff, &argc, &argv); - - if (argc > 0 && argv && argv[0]) - Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",x"),argv[0],0); - else - Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",x"),"",0); - - if (argc > 1 && argv && argv[1]) - Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",y"),argv[1],0); - else - Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",y"),"",0); - - if (argc > 2 && argv && argv[2]) - Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",z"),argv[2],0); - else - Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",z"),"",0); + Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",x"),out[0],0); + Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",y"),out[1],0); + Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",z"),out[2],0); char* xsym = (char*)sptr->getWCSAxisSymbol(www,0); if (xsym) @@ -208,8 +192,6 @@ void Frame3dBase::getInfoWCS(char* var, Vector3d& rr, FitsImage* sptr) Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",sys"),domain,0); else Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",sys"),coord.coordSystemStr(www),0); - - Tcl_Free((char*)argv); } else { Tcl_SetVar2(interp,var,varcat(buf,(char*)"wcs",ww,(char*)",x"),"",0); |