]> Creatis software - clitk.git/commitdiff
Merge branch 'master' of /home/dsarrut/clitk3.server
authorRomulo Pinho <pinho@lyon.fnclcc.fr>
Mon, 6 Jun 2011 12:40:03 +0000 (14:40 +0200)
committerRomulo Pinho <pinho@lyon.fnclcc.fr>
Mon, 6 Jun 2011 12:40:03 +0000 (14:40 +0200)
vv/qt_ui/vvHelpDialog.ui
vv/vvMainWindow.cxx
vv/vvSlicer.cxx
vv/vvSlicerManager.cxx
vv/vvSlicerManagerCommand.cxx

index 303a665961753183f141624ae79af50d27d487bf..2917b136dad1aba84f047f5943ce6dc407a213e0 100644 (file)
@@ -65,7 +65,7 @@ p, li { white-space: pre-wrap; }
         <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
 p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
+&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;space&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: Landmark&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600; text-decoration: underline;&quot;&gt;Navigation&lt;/span&gt;&lt;/p&gt;
@@ -74,6 +74,7 @@ p, li { white-space: pre-wrap; }
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;u&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline;&quot;&gt;U&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;pdate Image&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;f&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline;&quot;&gt;F&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;ly To Mouse Position&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;g&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline;&quot;&gt;G&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;o to Crosshair Position&lt;/span&gt;&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;o&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: Go to Image &lt;/span&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline;&quot;&gt;O&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;rigin&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;h&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: &lt;/span&gt;&lt;span style=&quot; font-size:12pt; text-decoration: underline;&quot;&gt;H&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;ide Crosshair and corner annotations&lt;/span&gt;&lt;/p&gt;
 &lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;
 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:12pt; font-weight:600;&quot;&gt;Up,Down&lt;/span&gt;&lt;span style=&quot; font-size:12pt;&quot;&gt;: Change Slice&lt;/span&gt;&lt;/p&gt;
index 7f23d51afb3d1f208196921e8119988ff7d2ab00..c60c04da4771dd2c4ec64c753449161ae410189c 100644 (file)
@@ -1383,7 +1383,7 @@ void vvMainWindow::DisplayChanged(QTreeWidgetItem *clickedItem, int column)
       mSlicerManagers[slicerManagerIndex]->UpdateInfoOnCursorPosition(column-1);
       DisplaySliders(slicerManagerIndex, column-1);
       if(clickedParentItem == clickedItem) {
-        // Toggle or force visibility if it was not on this branch so far
+        // Toggle
         vis = !draw || !vis;
       }
       clickedSlicer->SetActorVisibility("image", 0, vis);
index af3f0e6d864f06ca90203c4b4419599f131dfa5a..43583571456b3d12d6253bc27e7fb17449eb893a 100644 (file)
@@ -1243,7 +1243,9 @@ void vvSlicer::Render()
       int ix, iy, iz;
       double value = this->GetScalarComponentAsDouble(this->GetInput(), X, Y, Z, ix, iy, iz);
 
-      worldPos << "data value : " << value << std::endl;
+      if(ImageActor->GetVisibility())
+        worldPos << "data value : " << value << std::endl;
+
       worldPos << "mm : " << lrint(mCurrent[0]) << ' '
                           << lrint(mCurrent[1]) << ' '
                           << lrint(mCurrent[2]) << ' '
@@ -1303,13 +1305,11 @@ void vvSlicer::Render()
 //----------------------------------------------------------------------------
 void vvSlicer::UpdateCursorPosition()
 {
-  if (this->GetImageActor()->GetVisibility()) {
-    pdmA->SetVisibility(true);
-    mCursor[0] = mCurrent[0];
-    mCursor[1] = mCurrent[1];
-    mCursor[2] = mCurrent[2];
-    mCursor[3] = mCurrentTSlice;
-  }
+  pdmA->SetVisibility(true);
+  mCursor[0] = mCurrent[0];
+  mCursor[1] = mCurrent[1];
+  mCursor[2] = mCurrent[2];
+  mCursor[3] = mCurrentTSlice;
 }
 //----------------------------------------------------------------------------
 
index 08d8f5ac329af1d10a29645ab93c4e779fc411b3..871c818a64acf3083e4706a5519ce56ae5d6eb33 100644 (file)
@@ -433,7 +433,6 @@ void vvSlicerManager::SetTSlice(int slice)
   for ( unsigned int i = 0; i < mSlicers.size(); i++) {
     if (slice != mSlicers[i]->GetTSlice()) {
       mSlicers[i]->SetTSlice(slice);
-      if (mSlicers[i]->GetImageActor()->GetVisibility())
         UpdateTSlice(i);
     }
   }
@@ -495,8 +494,7 @@ void vvSlicerManager::SetTSliceInSlicer(int tslice, int slicer)
   if (mSlicers[slicer]->GetTSlice() == tslice) return;
 
   mSlicers[slicer]->SetTSlice(tslice);
-  if (mSlicers[slicer]->GetImageActor()->GetVisibility())
-    UpdateTSlice(slicer);
+  UpdateTSlice(slicer);
 }
 //----------------------------------------------------------------------------
 
@@ -576,7 +574,8 @@ void vvSlicerManager::UpdateViews(int current,int slicer)
     mSlicers[slicer]->Render();
 
     for ( unsigned int i = 0; i < mSlicers.size(); i++) {
-      if (i != (unsigned int)slicer && mSlicers[i]->GetImageActor()->GetVisibility()
+      if (i != (unsigned int)slicer
+          && mSlicers[i]->GetRenderer()->GetDraw()
           && mSlicers[i]->GetRenderWindow()->GetSize()[0] > 2
           && mSlicers[i]->GetRenderWindow()->GetSize()[1] > 2) {
         mSlicers[i]->SetCurrentPosition(mSlicers[slicer]->GetCurrentPosition()[0],
@@ -865,7 +864,7 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer)
       Z <= mSlicers[slicer]->GetInput()->GetWholeExtent()[5]) {
     value = this->GetScalarComponentAsDouble(mSlicers[slicer]->GetInput(), X, Y, Z);
 
-    if (mSlicers[slicer]->GetVFActor() && mSlicers[slicer]->GetVFActor()->GetVisibility()) {
+    if (mSlicers[slicer]->GetVFActor() ) {
       displayVec = 1;
       unsigned int currentTime = mSlicers[slicer]->GetTSlice();
       vtkImageData *vf = NULL;
@@ -885,7 +884,7 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer)
         valueVec = sqrt(xVec*xVec + yVec*yVec + zVec*zVec);
       }
     }
-    if (mSlicers[slicer]->GetOverlayActor() && mSlicers[slicer]->GetOverlayActor()->GetVisibility()) {
+    if (mSlicers[slicer]->GetOverlayActor() ) {
       displayOver = 1;
       vtkImageData *overlay = dynamic_cast<vtkImageData*>(mSlicers[slicer]->GetOverlayMapper()->GetInput());
       double Xover = (x - overlay->GetOrigin()[0]) / overlay->GetSpacing()[0];
@@ -893,7 +892,7 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer)
       double Zover = (z - overlay->GetOrigin()[2]) / overlay->GetSpacing()[2];
       valueOver = this->GetScalarComponentAsDouble(overlay, Xover, Yover, Zover);
     }
-    if (mSlicers[slicer]->GetFusionActor() && mSlicers[slicer]->GetFusionActor()->GetVisibility()) {
+    if (mSlicers[slicer]->GetFusionActor() ) {
       displayFus = 1;
       vtkImageData *fusion = dynamic_cast<vtkImageData*>(mSlicers[slicer]->GetFusionMapper()->GetInput());
       double Xover = (x - fusion->GetOrigin()[0]) / fusion->GetSpacing()[0];
@@ -906,12 +905,6 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer)
     emit UpdateVector(displayVec,xVec, yVec, zVec, valueVec);
     emit UpdateOverlay(displayOver,valueOver,value);
     emit UpdateFusion(displayFus,valueFus);
-    for (unsigned int i = 0; i < mSlicers.size(); i++) {
-      if (mSlicers[i]->GetImageActor()->GetVisibility() == 1)
-        emit UpdateWindows(i,mSlicers[i]->GetSliceOrientation(),mSlicers[i]->GetSlice());
-      else
-        emit UpdateWindows(i,-1,-1);
-    }
   }
 }
 //----------------------------------------------------------------------------
index ab0e5f8b8835b0440a2fe170472d796cb9b9cc11..09a95456a2a1fc574933b63ca3349fb3c81615ff 100644 (file)
@@ -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();