From 4ec79c878958e58d421b7c71b2c75053944982ef Mon Sep 17 00:00:00 2001 From: Vivien Delmon Date: Tue, 31 May 2011 16:06:01 +0200 Subject: [PATCH] [VV] New feature to jump on image origin --- vv/qt_ui/vvHelpDialog.ui | 3 ++- vv/vvSlicerManagerCommand.cxx | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/vv/qt_ui/vvHelpDialog.ui b/vv/qt_ui/vvHelpDialog.ui index 303a665..2917b13 100644 --- a/vv/qt_ui/vvHelpDialog.ui +++ b/vv/qt_ui/vvHelpDialog.ui @@ -65,7 +65,7 @@ p, li { white-space: pre-wrap; } <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } -</style></head><body style=" font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;"> +</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">space</span><span style=" font-size:12pt;">: Landmark</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600; text-decoration: underline;">Navigation</span></p> @@ -74,6 +74,7 @@ p, li { white-space: pre-wrap; } <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">u</span><span style=" font-size:12pt;">: </span><span style=" font-size:12pt; text-decoration: underline;">U</span><span style=" font-size:12pt;">pdate Image</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">f</span><span style=" font-size:12pt;">: </span><span style=" font-size:12pt; text-decoration: underline;">F</span><span style=" font-size:12pt;">ly To Mouse Position</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">g</span><span style=" font-size:12pt;">: </span><span style=" font-size:12pt; text-decoration: underline;">G</span><span style=" font-size:12pt;">o to Crosshair Position</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">o</span><span style=" font-size:12pt;">: Go to Image </span><span style=" font-size:12pt; text-decoration: underline;">O</span><span style=" font-size:12pt;">rigin</span></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">h</span><span style=" font-size:12pt;">: </span><span style=" font-size:12pt; text-decoration: underline;">H</span><span style=" font-size:12pt;">ide Crosshair and corner annotations</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:12pt;"></p> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:12pt; font-weight:600;">Up,Down</span><span style=" font-size:12pt;">: Change Slice</span></p> diff --git a/vv/vvSlicerManagerCommand.cxx b/vv/vvSlicerManagerCommand.cxx index ab0e5f8..09a9545 100644 --- a/vv/vvSlicerManagerCommand.cxx +++ b/vv/vvSlicerManagerCommand.cxx @@ -217,6 +217,12 @@ void vvSlicerManagerCommand::Execute(vtkObject *caller, this->SM->UpdateLinked(VisibleInWindow); return; } + if (KeyPress == "o") { + this->SM->GetSlicer(VisibleInWindow)->SetCurrentPosition(0,0,0,0); + this->SM->UpdateViews(1,VisibleInWindow); + this->SM->UpdateLinked(VisibleInWindow); + return; + } if (KeyPress == "F5") { this->SM->GetSlicer(VisibleInWindow)->FlipHorizontalView(); this->SM->GetSlicer(VisibleInWindow)->Render(); -- 2.45.1