]> Creatis software - clitk.git/commitdiff
Change the name of the axis in the profile tool
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 5 Feb 2016 14:24:13 +0000 (15:24 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Fri, 5 Feb 2016 14:24:13 +0000 (15:24 +0100)
Add comments for the SetOpacity(0.995)
Try to debug the focus problem with Mac and with the F1 shortcut

vv/qt_ui/vvMainWindow.ui
vv/vvImageContour.cxx
vv/vvMainWindow.cxx
vv/vvSlicer.cxx
vv/vvToolProfile.cxx

index 5cf4b33b473fdff99dead3057a7ea2bd0babc21d..ec68254bd471c4aaddef81bfaaf72a4907525e1f 100644 (file)
      <x>0</x>
      <y>0</y>
      <width>1008</width>
-     <height>20</height>
+     <height>27</height>
     </rect>
    </property>
    <property name="defaultUp">
    <property name="text">
     <string>Navigation Help</string>
    </property>
-   <property name="shortcut">
-    <string>F1</string>
-   </property>
    <property name="iconVisibleInMenu">
     <bool>true</bool>
    </property>
+   <property name="priority">
+    <enum>QAction::NormalPriority</enum>
+   </property>
   </action>
   <action name="actionOpen_Dicom_Struct">
    <property name="icon">
index 1c265f3aabe97682c264df479e372ee6c0d40204..2ece6c5f33a85cd20c589231bb288475df70c902 100644 (file)
@@ -124,7 +124,7 @@ void vvImageContour::SetColor(double r, double g, double b)
 { 
   for(unsigned int i=0; i<mSquaresActorList.size(); i++) {
     mSquaresActorList[i]->GetProperty()->SetColor(r,g,b);
-    mSquaresActorList[i]->GetProperty()->SetOpacity(0.995);
+    mSquaresActorList[i]->GetProperty()->SetOpacity(0.995); //in order to get VTK to turn on the alpha-blending in OpenGL
   }
 }
 //------------------------------------------------------------------------------
@@ -337,7 +337,7 @@ void vvImageContour::CreateNewActor(int numImage)
   squaresMapper->ScalarVisibilityOff();
   squaresActor->SetMapper(squaresMapper);
   squaresActor->GetProperty()->SetColor(1.0,0,0);
-  squaresActor->GetProperty()->SetOpacity(0.995);
+  squaresActor->GetProperty()->SetOpacity(0.995); //in order to get VTK to turn on the alpha-blending in OpenGL
   squaresActor->SetPickable(0);
   squaresActor->VisibilityOff();
   mSlicer->GetRenderer()->AddActor(squaresActor);
index 2914da18d2086be793c79ac81e7395a13fb074f6..f0b737a6bcd0993f6d080269accc5ee44a928b5c 100644 (file)
@@ -23,6 +23,7 @@ It is distributed under dual licence
 #include "QTreePushButton.h"
 #include <QUrl>
 #include <QSettings>
+#include <QShortcut>
 
 // VV include
 #include "vvMainWindow.h"
@@ -127,6 +128,9 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
 { 
   setupUi(this); // this sets up the GUI
 
+  //Qt::WindowFlags flags = windowFlags();
+  //setWindowFlags(flags | Qt::WindowStaysOnTopHint);
+
   mInputPathName = "";
   mMenuTools = menuTools;
   //  mMenuSegmentation = menuSegmentation;
@@ -296,6 +300,11 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   connect(actionAdd_overlay_image_to_current_image,SIGNAL(triggered()), this,SLOT(SelectOverlayImage()));
   connect(actionAdd_USSequence_toCT,SIGNAL(triggered()), this,SLOT(SelectFusionSequence()));
   connect(actionNavigation_Help,SIGNAL(triggered()),this,SLOT(ShowHelpDialog()));
+
+  QShortcut *shortcutHelp = new QShortcut(QKeySequence(QKeySequence::HelpContents),this);
+  shortcutHelp->setContext(Qt::ApplicationShortcut);
+  QObject::connect(shortcutHelp, SIGNAL(activated()), this, SLOT(ShowHelpDialog()));
+
   connect(actionDocumentation,SIGNAL(triggered()),this,SLOT(ShowDocumentation()));
   connect(actionRegister_vv,SIGNAL(triggered()),this,SLOT(PopupRegisterForm()));
 
index dc7bea75eab2d265885a1f6fd9330562cb353408..b2f3969582480229524a31374d405c1cece85189 100644 (file)
@@ -692,7 +692,7 @@ void vvSlicer::SetLandmarks(vvLandmarks* landmarks)
     //mLandMapper->ScalarVisibilityOff();
 
     mLandActor->SetMapper(mLandMapper);
-    mLandActor->GetProperty()->SetOpacity(0.995);
+    mLandActor->GetProperty()->SetOpacity(0.995);  //in order to get VTK to turn on the alpha-blending in OpenGL
     mLandActor->GetProperty()->SetColor(255,10,212);
     mLandActor->SetPickable(0);
     mLandActor->SetVisibility(true);
@@ -1184,7 +1184,7 @@ void vvSlicer::UpdateDisplayExtent()
     mGlyphFilter->SetOrientation(orientation[0], orientation[1], orientation[2]);
     position[this->SliceOrientation] += offset;
     mVFActor->SetPosition(position);
-    mVFActor->GetProperty()->SetOpacity(0.995);
+    mVFActor->GetProperty()->SetOpacity(0.995); //in order to get VTK to turn on the alpha-blending in OpenGL
     mVFMapper->Update();
 
   }
index f0fbf8c1fa2c1dcad1c19e54a958f8333578b1b2..ff0e220a7e9a70b81cee564d8eb08dee4ea44201 100644 (file)
@@ -26,6 +26,7 @@
 #include "vvToolInputSelectorWidget.h"
 
 // vtk
+#include <vtkAxis.h>
 #include <vtkImageActor.h>
 #include <vtkCamera.h>
 #include <vtkImageClip.h>
@@ -248,7 +249,7 @@ void vvToolProfile::computeProfile()
     vtkSmartPointer<vtkFloatArray> arrY = vtkSmartPointer<vtkFloatArray>::New();
     arrX = mFilter->GetArrayX();
     arrY = mFilter->GetArrayY();
-    arrX->SetName("Voxel");
+    arrX->SetName("Distance (mm)");
     arrY->SetName("Intensity");
     table->AddColumn(arrX);
     table->AddColumn(arrY);
@@ -267,6 +268,8 @@ void vvToolProfile::computeProfile()
 #endif
     line->SetColor(0, 255, 0, 255);
     line->SetWidth(1.0);
+    chart->GetAxis(vtkAxis::LEFT)->SetTitle("Intensity");
+    chart->GetAxis(vtkAxis::BOTTOM)->SetTitle("Distance (mm)");
     
     this->ProfileWidget->GetRenderWindow()->GetRenderers()->RemoveAllItems();
     this->ProfileWidget->GetRenderWindow()->AddRenderer(mView->GetRenderer());
@@ -577,7 +580,7 @@ void vvToolProfile::DisplayLine()
 #endif
           vtkSmartPointer<vtkActor> lineActor = vtkSmartPointer<vtkActor>::New();
           lineActor->SetMapper(lineMapper);
-          lineActor->GetProperty()->SetOpacity(0.995);
+          lineActor->GetProperty()->SetOpacity(0.995);  //in order to get VTK to turn on the alpha-blending in OpenGL
         
           for(int i=0;i<mCurrentSlicerManager->GetNumberOfSlicers(); i++) {
               mCurrentSlicerManager->GetSlicer(i)->GetRenderer()->AddActor(lineActor);
@@ -588,7 +591,7 @@ void vvToolProfile::DisplayLine()
               mOverlayActors.push_back(vvBinaryImageOverlayActor::New());
               mOverlayActors[i]->SetImage(mImageLine, 0);
               mOverlayActors[i]->SetColor(1,0,0);
-              mOverlayActors[i]->SetOpacity(0.995);
+              mOverlayActors[i]->SetOpacity(0.995); //in order to get VTK to turn on the alpha-blending in OpenGL
               mOverlayActors[i]->SetSlicer(mCurrentSlicerManager->GetSlicer(i));
               mOverlayActors[i]->Initialize(true);
               mOverlayActors[i]->SetDepth(1);