From 9bca3279547234921425e1311a118e1e3ad39568 Mon Sep 17 00:00:00 2001 From: tbaudier Date: Fri, 5 Feb 2016 15:24:13 +0100 Subject: [PATCH] Change the name of the axis in the profile tool 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 | 8 ++++---- vv/vvImageContour.cxx | 4 ++-- vv/vvMainWindow.cxx | 9 +++++++++ vv/vvSlicer.cxx | 4 ++-- vv/vvToolProfile.cxx | 9 ++++++--- 5 files changed, 23 insertions(+), 11 deletions(-) diff --git a/vv/qt_ui/vvMainWindow.ui b/vv/qt_ui/vvMainWindow.ui index 5cf4b33..ec68254 100644 --- a/vv/qt_ui/vvMainWindow.ui +++ b/vv/qt_ui/vvMainWindow.ui @@ -810,7 +810,7 @@ 0 0 1008 - 20 + 27 @@ -1177,12 +1177,12 @@ Navigation Help - - F1 - true + + QAction::NormalPriority + diff --git a/vv/vvImageContour.cxx b/vv/vvImageContour.cxx index 1c265f3..2ece6c5 100644 --- a/vv/vvImageContour.cxx +++ b/vv/vvImageContour.cxx @@ -124,7 +124,7 @@ void vvImageContour::SetColor(double r, double g, double b) { for(unsigned int i=0; iGetProperty()->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); diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index 2914da1..f0b737a 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -23,6 +23,7 @@ It is distributed under dual licence #include "QTreePushButton.h" #include #include +#include // 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())); diff --git a/vv/vvSlicer.cxx b/vv/vvSlicer.cxx index dc7bea7..b2f3969 100644 --- a/vv/vvSlicer.cxx +++ b/vv/vvSlicer.cxx @@ -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(); } diff --git a/vv/vvToolProfile.cxx b/vv/vvToolProfile.cxx index f0fbf8c..ff0e220 100644 --- a/vv/vvToolProfile.cxx +++ b/vv/vvToolProfile.cxx @@ -26,6 +26,7 @@ #include "vvToolInputSelectorWidget.h" // vtk +#include #include #include #include @@ -248,7 +249,7 @@ void vvToolProfile::computeProfile() vtkSmartPointer arrY = vtkSmartPointer::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 lineActor = vtkSmartPointer::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;iGetNumberOfSlicers(); 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); -- 2.47.1