From: srit Date: Mon, 28 Feb 2011 18:24:52 +0000 (+0000) Subject: New functionality: button apply windowing to all images X-Git-Tag: v1.2.0~226 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=77ed5552a569a557a4ebbda7477a8f452f7b1dcf;p=clitk.git New functionality: button apply windowing to all images --- diff --git a/vv/qt_ui/vvMainWindow.ui b/vv/qt_ui/vvMainWindow.ui index 089d0b1..c5005dd 100644 --- a/vv/qt_ui/vvMainWindow.ui +++ b/vv/qt_ui/vvMainWindow.ui @@ -67,7 +67,7 @@ 2 - + Qt::Horizontal @@ -325,7 +325,7 @@ - + @@ -351,7 +351,7 @@ - + Qt::Vertical @@ -378,6 +378,25 @@ + + + + true + + + + 24 + 16777215 + + + + Apply windowing to all images + + + All + + + diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx index f621988..456e9bd 100644 --- a/vv/vvMainWindow.cxx +++ b/vv/vvMainWindow.cxx @@ -268,6 +268,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase() connect(colorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateColorMap())); connect(presetComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(UpdateWindowLevel())); connect(inverseButton,SIGNAL(clicked()),this,SLOT(SwitchWindowLevel())); + connect(applyWindowLevelToAllButton,SIGNAL(clicked()),this,SLOT(ApplyWindowLevelToAllImages())); connect(this,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(ShowContextMenu(QPoint))); @@ -1616,6 +1617,20 @@ void vvMainWindow::SwitchWindowLevel() } //------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ +void vvMainWindow::ApplyWindowLevelToAllImages() +{ + for (unsigned int i = 0; i < mSlicerManagers.size(); i++) { + if (mSlicerManagers[i] == NULL) + continue; + mSlicerManagers[i]->SetColorWindow(windowSpinBox->value()); + mSlicerManagers[i]->SetColorLevel(levelSpinBox->value()); + mSlicerManagers[i]->SetPreset(6); + mSlicerManagers[i]->Render(); + } +} +//------------------------------------------------------------------------------ + //------------------------------------------------------------------------------ void vvMainWindow::UpdateLinkManager(std::string id, int slicer, double x, double y, double z, int temps) { diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h index c219397..87765a9 100644 --- a/vv/vvMainWindow.h +++ b/vv/vvMainWindow.h @@ -104,6 +104,7 @@ public slots: void UpdateColorMap(); void UpdateWindowLevel(); void SwitchWindowLevel(); + void ApplyWindowLevelToAllImages(); void UpdateLinkManager(std::string id, int slicer, double x, double y, double z, int temps); void UpdateLinkedNavigation(std::string id, vvSlicerManager *sm); void AddLink(QString image1,QString image2);