From b19712ef18730dd44ec250ffa3a8c3edb0b375b3 Mon Sep 17 00:00:00 2001 From: William Joye Date: Wed, 29 Nov 2017 17:03:58 -0500 Subject: update AST WCS --- tksao/frame/frame3dbase.C | 11 +++++------ tksao/frame/frame3dbase.h | 3 --- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/tksao/frame/frame3dbase.C b/tksao/frame/frame3dbase.C index b977ecd..889918a 100644 --- a/tksao/frame/frame3dbase.C +++ b/tksao/frame/frame3dbase.C @@ -36,9 +36,6 @@ Frame3dBase::Frame3dBase(Tcl_Interp* i, Tk_Canvas c, Tk_Item* item) highliteColorName_ = dupstr("cyan"); cropsl_ =0; - - imageToData3d = Translate3d(-.5, -.5, -.5); - dataToImage3d = Translate3d( .5, .5, .5); } Frame3dBase::~Frame3dBase() @@ -533,7 +530,7 @@ void Frame3dBase::centerImage() // always center to center of pixel, even for even sized image Vector3d bb = (aa*Translate3d(.5,.5,.5)).floor(); // vp_ is in REF coords - vp_ = bb*imageToData3d; + vp_ = bb*Translate3d(-.5, -.5, -.5); } else vp_ = Vector(); @@ -551,7 +548,8 @@ Vector3d Frame3dBase::imageCenter3d(FrScale::SecMode mode) // Note: imageCenter() is in IMAGE coords return Vector3d((pp->xmax - pp->xmin)/2.+pp->xmin, (pp->ymax - pp->ymin)/2.+pp->ymin, - (zz->zmax - zz->zmin)/2.+zz->zmin) * dataToImage3d; + (zz->zmax - zz->zmin)/2.+zz->zmin) * + Translate3d( .5, .5, .5); } Vector3d Frame3dBase::imageSize3d(FrScale::SecMode mode ) @@ -905,7 +903,8 @@ void Frame3dBase::updateMagnifierMatrices() void Frame3dBase::updatePannerMatrices() { - Vector3d center = imageCenter3d(FrScale::IMGSEC) * imageToData3d; + // imageToData3d + Vector3d center = imageCenter3d(FrScale::IMGSEC) * Translate3d(-.5, -.5, -.5); // refToUser3d Matrix3d refToUser3d = diff --git a/tksao/frame/frame3dbase.h b/tksao/frame/frame3dbase.h index 2d2312d..2d3b8a0 100644 --- a/tksao/frame/frame3dbase.h +++ b/tksao/frame/frame3dbase.h @@ -45,9 +45,6 @@ class Frame3dBase : public Base { double cropsl_; - Matrix3d dataToImage3d; - Matrix3d imageToData3d; - Matrix3d refToUser3d; Matrix3d userToRef3d; Matrix3d refToWidget3d; -- cgit v0.12