summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2017-11-29 22:03:58 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2017-11-29 22:03:58 (GMT)
commitb19712ef18730dd44ec250ffa3a8c3edb0b375b3 (patch)
treea6959f996d093f3731694b084fa6107b0468c2c1
parent218bcc3293086d26d4b822cfb4a1b11237759a08 (diff)
downloadblt-b19712ef18730dd44ec250ffa3a8c3edb0b375b3.zip
blt-b19712ef18730dd44ec250ffa3a8c3edb0b375b3.tar.gz
blt-b19712ef18730dd44ec250ffa3a8c3edb0b375b3.tar.bz2
update AST WCS
-rw-r--r--tksao/frame/frame3dbase.C11
-rw-r--r--tksao/frame/frame3dbase.h3
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;