From: dsarrut <dsarrut>
Date: Tue, 22 Mar 2011 15:48:15 +0000 (+0000)
Subject: Remove old MaximumIntensityProjection (menu and callback)
X-Git-Tag: v1.2.0~139
X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d2da68d0db9e40a3053d8482aecabf08d6a56cc0;p=clitk.git

Remove old MaximumIntensityProjection (menu and callback)
---

diff --git a/vv/qt_ui/vvMainWindow.ui b/vv/qt_ui/vvMainWindow.ui
index c5005dd..5560a9e 100644
--- a/vv/qt_ui/vvMainWindow.ui
+++ b/vv/qt_ui/vvMainWindow.ui
@@ -828,12 +828,6 @@
     <addaction name="actionSouth_West_Window"/>
     <addaction name="actionSouth_East_Window"/>
    </widget>
-   <widget class="QMenu" name="menuTools">
-    <property name="title">
-     <string>Tools</string>
-    </property>
-    <addaction name="actionMaximum_Intensity_Projection"/>
-   </widget>
    <widget class="QMenu" name="menuExperimental">
     <property name="title">
      <string>Experimental</string>
@@ -844,6 +838,11 @@
     <addaction name="actionWarp_image_with_vector_field"/>
     <addaction name="actionCompute_mid_position_image"/>
    </widget>
+   <widget class="QMenu" name="menuTools">
+    <property name="title">
+     <string>Tools</string>
+    </property>
+   </widget>
    <addaction name="menuFile"/>
    <addaction name="menuOverlay"/>
    <addaction name="menuScreenshots"/>
diff --git a/vv/vvMainWindow.cxx b/vv/vvMainWindow.cxx
index 772cdea..760fa75 100644
--- a/vv/vvMainWindow.cxx
+++ b/vv/vvMainWindow.cxx
@@ -38,7 +38,6 @@
 #include "vvDeformationDialog.h"
 #include "vvImageWarp.h"
 #include "vvUtils.h"
-#include "vvMaximumIntensityProjection.h"
 #include "vvMidPosition.h"
 #include "vvMesh.h"
 #include "vvStructSelector.h"
@@ -231,7 +230,6 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   connect(SEHorizontalSlider,SIGNAL(valueChanged(int)),this,SLOT(SEHorizontalSliderMoved()));
 
   //connect everything
-  connect(actionMaximum_Intensity_Projection,SIGNAL(triggered()),this,SLOT(ComputeMIP()));
   connect(actionCompute_mid_position_image,SIGNAL(triggered()),this,SLOT(ComputeMidPosition()));
   connect(actionDeformable_Registration,SIGNAL(triggered()),this,SLOT(ComputeDeformableRegistration()));
   connect(actionWarp_image_with_vector_field,SIGNAL(triggered()),this,SLOT(WarpImage()));
@@ -344,19 +342,6 @@ void vvMainWindow::UpdateMemoryUsage()
 //------------------------------------------------------------------------------
 
 
-//------------------------------------------------------------------------------
-void vvMainWindow::ComputeMIP()
-{
-  vvMaximumIntensityProjection mip;
-  vvSlicerManager* selected_slicer = mSlicerManagers[GetSlicerIndexFromItem(DataTree->selectedItems()[0])];
-  QFileInfo info(selected_slicer->GetFileName().c_str());
-  mip.Compute(selected_slicer);
-  if (!mip.error)
-    AddImage(mip.GetOutput(),info.path().toStdString()+"/"+info.completeBaseName().toStdString()+"_mip.mhd");
-}
-//------------------------------------------------------------------------------
-
-
 //------------------------------------------------------------------------------
 void vvMainWindow::ComputeMidPosition()
 {
@@ -2750,7 +2735,7 @@ vvSlicerManager* vvMainWindow::AddImage(vvImage::Pointer image,std::string filen
   //create an item in the tree with good settings
   QTreeWidgetItem *item = new QTreeWidgetItem();
   item->setData(0,Qt::UserRole,slicer_manager->GetFileName().c_str());//files[i].c_str());
-  item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,filename.c_str());
+  item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,slicer_manager->GetFileName().c_str());//filename.c_str());
   qApp->processEvents();
 
   for (int j = 1; j <= 4; j++) item->setData(j,Qt::CheckStateRole,1);
@@ -2781,7 +2766,8 @@ vvSlicerManager* vvMainWindow::AddImage(vvImage::Pointer image,std::string filen
   item->setData(COLUMN_IMAGE_NAME,Qt::UserRole,id.toStdString().c_str());
   mSlicerManagers.back()->SetId(id.toStdString());
 
-  linkPanel->addImage(filename, id.toStdString());
+  linkPanel->addImage(slicer_manager->GetFileName().c_str()// filename
+                      , id.toStdString());
 
   connect(mSlicerManagers.back(), SIGNAL(currentImageChanged(std::string)),
           this, SLOT(CurrentImageChanged(std::string)));
diff --git a/vv/vvMainWindow.h b/vv/vvMainWindow.h
index 7918d0f..fa61855 100644
--- a/vv/vvMainWindow.h
+++ b/vv/vvMainWindow.h
@@ -68,8 +68,6 @@ class vvMainWindow: public vvMainWindowBase,
 public slots:
   ///Allows the user to open and select various surfaces contained in a dicom-struct file
   void OpenDCStructContour();
-  ///Computes the MIP of the currently selected image and displays it
-  void ComputeMIP();
   ///Computes the midposition image of a 4D sequence with a VF and displays it
   void ComputeMidPosition();
   void OpenImages();