]> Creatis software - clitk.git/commitdiff
Merge branch 'master' into wipe
authortbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 19 Jan 2017 08:06:34 +0000 (09:06 +0100)
committertbaudier <thomas.baudier@creatis.insa-lyon.fr>
Thu, 19 Jan 2017 08:06:34 +0000 (09:06 +0100)
vv/CMakeLists.txt
vv/extensions.h [new file with mode: 0644]
vv/icons/wipe.png [new file with mode: 0644]
vv/qt_ui/vvMainWindow.ui
vv/qt_ui/vvWipeImage.ui [new file with mode: 0644]
vv/vvIcons.qrc
vv/vvMainWindow.cxx
vv/vvMainWindow.h
vv/vvWipeImage.cxx [new file with mode: 0644]
vv/vvWipeImage.h [new file with mode: 0644]

index 14b441ee0d752656c17647ef4522cf63593b8db4..7d74f721cadc1d815ebcef9803b13145d13ab98c 100644 (file)
@@ -69,6 +69,7 @@ set(vv_COMMON_WITH_UI
   vvToolSimpleInputSelectorWidget
   vvToolInputSelectorWidget
   vvRegisterForm
+  vvWipeImage
 )
 
 # All others sources
diff --git a/vv/extensions.h b/vv/extensions.h
new file mode 100644 (file)
index 0000000..c09ad87
--- /dev/null
@@ -0,0 +1,5 @@
+#ifdef CLITK_PRIVATE_FEATURES
+#define EXTENSIONS "Images ( *.bmp *.dcm *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz *.usf *.svl)"
+#else
+#define EXTENSIONS "Images ( *.bmp *.dcm *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz)"
+#endif
diff --git a/vv/icons/wipe.png b/vv/icons/wipe.png
new file mode 100644 (file)
index 0000000..6944f39
Binary files /dev/null and b/vv/icons/wipe.png differ
index ec4051a3b58bfc22032c84286e8acacc6de3f2a5..10c8400cf89eb43aa870c2edde34df15f169d90e 100644 (file)
     <addaction name="actionAdd_overlay_image_to_current_image"/>
     <addaction name="actionAdd_fusion_image"/>
     <addaction name="actionAdd_USSequence_toCT"/>
+    <addaction name="actionAdd_wipe_image"/>
    </widget>
    <widget class="QMenu" name="menuScreenshots">
     <property name="title">
     <bool>true</bool>
    </property>
   </action>
+  <action name="actionAdd_wipe_image">
+   <property name="icon">
+    <iconset resource="../vvIcons.qrc">
+     <normaloff>:/common/icons/wipe.png</normaloff>:/common/icons/wipe.png</iconset>
+   </property>
+   <property name="text">
+    <string>Add wipe Image</string>
+   </property>
+   <property name="iconVisibleInMenu">
+    <bool>true</bool>
+   </property>
+  </action>
   <action name="actionConnect_Pacs">
    <property name="text">
     <string>Connect Pacs</string>
    </property>
   </action>
+   </property>
+  </action>
  </widget>
  <customwidgets>
   <customwidget>
diff --git a/vv/qt_ui/vvWipeImage.ui b/vv/qt_ui/vvWipeImage.ui
new file mode 100644 (file)
index 0000000..856bbc8
--- /dev/null
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>vvWipeImage</class>
+ <widget class="QWidget" name="vvWipeImage">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>314</width>
+    <height>197</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Wipe image</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout_3">
+     <item>
+      <layout class="QGridLayout" name="gridLayout_2">
+       <item row="2" column="2">
+        <widget class="vvIntensityValueSlider" name="mThresholdSlider2" native="true">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1">
+        <widget class="QLabel" name="label_2">
+         <property name="text">
+          <string>Foreground (FG) is greater than : </string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="2">
+        <widget class="vvIntensityValueSlider" name="mThresholdSlider1" native="true"/>
+       </item>
+       <item row="2" column="1">
+        <widget class="QRadioButton" name="mRadioButtonLowerThan">
+         <property name="text">
+          <string>and lower than</string>
+         </property>
+         <property name="autoExclusive">
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout_2">
+     <item>
+      <widget class="Line" name="line_2">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QLabel" name="label">
+       <property name="text">
+        <string>Resulting wipe image:</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout_4">
+       <item>
+        <widget class="QCheckBox" name="mCheckBoxUseFG">
+         <property name="text">
+          <string>Use FG</string>
+         </property>
+         <property name="checked">
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="vvIntensityValueSlider" name="mFGSlider" native="true">
+         <property name="enabled">
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </item>
+     <item>
+      <layout class="QHBoxLayout" name="horizontalLayout_5">
+       <item>
+        <widget class="QCheckBox" name="mCheckBoxUseBG">
+         <property name="text">
+          <string>Use BG</string>
+         </property>
+         <property name="checked">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="vvIntensityValueSlider" name="mBGSlider" native="true"/>
+       </item>
+      </layout>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="Line" name="line_3">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QCheckBox" name="mCheckBoxInteractiveDisplay">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="text">
+      <string>Interactive (unchek to disable on the fly contours drawing)</string>
+     </property>
+     <property name="checked">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <customwidgets>
+  <customwidget>
+   <class>vvIntensityValueSlider</class>
+   <extends>QWidget</extends>
+   <header>vvIntensityValueSlider.h</header>
+   <container>1</container>
+  </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections>
+  <connection>
+   <sender>mRadioButtonLowerThan</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>mThresholdSlider2</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>85</x>
+     <y>129</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>305</x>
+     <y>129</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>mCheckBoxUseBG</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>mBGSlider</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>79</x>
+     <y>203</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>395</x>
+     <y>225</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>mCheckBoxUseFG</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>mFGSlider</receiver>
+   <slot>setEnabled(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>63</x>
+     <y>177</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>242</x>
+     <y>177</y>
+    </hint>
+   </hints>
+  </connection>
+ </connections>
+</ui>
index a5e31ccdfbfc6853ade30da993a50c4498b868ee..dba9116341b25d23cb79b4c97c5cdc317df8e1f9 100644 (file)
@@ -41,6 +41,7 @@
     <file>icons/standardbutton-apply-16.png</file>
     <file>icons/standardbutton-cancel-16.png</file>
     <file>icons/identity.png</file>
+    <file>icons/wipe.png</file>
        <file>icons/basket_download.png</file>
        <file>icons/edit.png</file>
        <file>icons/bullet_info.png</file>
index e70269cbda681d32292cb37f291d633f65546ed9..335177a5327969bf87d6f0de12d20056330a25d2 100644 (file)
@@ -110,11 +110,7 @@ It is distributed under dual licence
 #define COLUMN_RELOAD_IMAGE 6
 #define COLUMN_IMAGE_NAME 7
 
-#ifdef CLITK_PRIVATE_FEATURES
-#define EXTENSIONS "Images ( *.bmp *.dcm *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz *.usf *.svl)"
-#else
-#define EXTENSIONS "Images ( *.bmp *.dcm *.png *.jpeg *.jpg *.tif *.mhd *.mha *.hdr *.vox *.his *.xdr *.SCAN *.nii *.nrrd *.nhdr *.refscan *.nii.gz)"
-#endif
+#include <extensions.h>
 
 
 /*Data Tree values
@@ -200,6 +196,9 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   contextActions.push_back(actionAdd_USSequence_toCT);
 #endif
 
+  contextMenu.addAction(actionAdd_wipe_image);
+  contextActions.push_back(actionAdd_wipe_image);
+
 
   contextMenu.addSeparator();
   QAction* actionResetMatrix = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/identity.png")),
@@ -243,6 +242,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   actionAdd_VF_to_current_Image->setEnabled(0);
   actionAdd_fusion_image->setEnabled(0);
   actionAdd_USSequence_toCT->setEnabled(0);
+  actionAdd_wipe_image->setEnabled(0);
 
   //init the sliders
   verticalSliders.push_back(NOVerticalSlider);
@@ -292,6 +292,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   connect(actionRead_saved_state,SIGNAL(triggered()),this,SLOT(ReadSavedState()));
   connect(actionExit,SIGNAL(triggered()),this,SLOT(close()));
   connect(actionAdd_VF_to_current_Image,SIGNAL(triggered()),this,SLOT(OpenField()));
+  connect(actionAdd_wipe_image,SIGNAL(triggered()),this,SLOT(SelectWipeImage()));
   connect(actionAdd_fusion_image,SIGNAL(triggered()),this,SLOT(SelectFusionImage()));
   connect(actionAdd_overlay_image_to_current_image,SIGNAL(triggered()), this,SLOT(SelectOverlayImage()));
   connect(actionAdd_USSequence_toCT,SIGNAL(triggered()), this,SLOT(SelectFusionSequence()));
@@ -1082,6 +1083,7 @@ void vvMainWindow::ImageInfoChanged()
   actionSave_As->setEnabled(1);
   actionAdd_VF_to_current_Image->setEnabled(1);
   actionAdd_fusion_image->setEnabled(1);
+  actionAdd_wipe_image->setEnabled(1);
   actionAdd_overlay_image_to_current_image->setEnabled(1);
   actionAdd_USSequence_toCT->setEnabled(1);
   actionNorth_East_Window->setEnabled(1);
@@ -2168,6 +2170,42 @@ void vvMainWindow::AddROI(int index, QString file)
 }
 //------------------------------------------------------------------------------
 
+//------------------------------------------------------------------------------
+void vvMainWindow::SelectWipeImage()
+{ 
+  int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
+  
+
+  if (!(CheckAddedImage(index, "wipe")))
+    return;
+
+  vvWipeImage::Pointer wipeImage = vvWipeImage::New();
+  wipeImage->Initialize(mInputPathName, mSlicerManagers);
+  wipeImage->selectWipeImage(index, GetTree());
+  QTreeWidgetItem *item = DataTree->itemAt(index, COLUMN_CLOSE_IMAGE);
+  //connect(item,SIGNAL(clickedInto(QTreeWidgetItem*, int)), this,SLOT(CloseImage(QTreeWidgetItem*, int)));
+  UpdateTree();
+  ImageInfoChanged();
+  for(int i=0; i<4; i++)
+        DisplaySliders(index, i);
+  WindowLevelChanged();
+
+  /*QString Extensions = EXTENSIONS;
+  Extensions += ";;All Files (*)";
+  QStringList files = QFileDialog::getOpenFileNames(this,tr("Load Wipe image"),mInputPathName,Extensions);
+  if (files.isEmpty())
+    return;
+
+  std::vector<std::string> vecFileNames;
+  for (int i = 0; i < files.size(); i++) {
+    vecFileNames.push_back(files[i].toStdString());
+  }*/
+
+  //AddWipeImage(index,vecFileNames,vvImageReader::IMAGE);
+}
+//------------------------------------------------------------------------------
+
+
 //------------------------------------------------------------------------------
 void vvMainWindow::SelectFusionImage()
 { 
index 8908b24004ca7fca8bae8c6f0e3d76fa5f9968a1..81bc7c42705fa310d5ec72425c9e6c6e5ea5be3e 100644 (file)
@@ -26,6 +26,7 @@
 #include "vvToolManager.h"
 #include "vvImageReader.h"
 #include "vvMesh.h"
+#include "vvWipeImage.h"
 #include "clitkMemoryUsage.h"
 
 #include "vtkSmartPointer.h"
@@ -164,6 +165,7 @@ public slots:
   void ReloadImage();
   void OpenField();
   void SelectOverlayImage();
+  void SelectWipeImage();
   void SelectFusionImage();
   //select the file(s) from the disk containing the image sequence to fuse
   void SelectFusionSequence();
@@ -187,6 +189,8 @@ public slots:
   void UpdateMemoryUsage();
   void show();
   
+  static vvMainWindow* Instance(){return mSingleton;}
+  
 protected:
   
   void createRecentlyOpenedFilesMenu();
@@ -199,6 +203,8 @@ private:
   vvHelpDialog *help_dialog;
   vvDocumentation *documentation;
   vvDicomSeriesSelector *dicomSeriesSelector;
+  
+  vvWipeImage::Pointer mWipeImage;
 
 #if CLITK_USE_PACS_CONNECTION
   vvQPacsConnection *PacsConnection;
@@ -240,7 +246,7 @@ private:
   // vvMainWindowToolInfo * mCurrentToolInfo;
   // std::vector<vvToolCreatorBase*> mListOfRunningTool;
 
-  static vvMainWindow * mSingleton;
+  static vvMainWindow* mSingleton;
 
   int mCurrentTime;
   
diff --git a/vv/vvWipeImage.cxx b/vv/vvWipeImage.cxx
new file mode 100644 (file)
index 0000000..6729c98
--- /dev/null
@@ -0,0 +1,209 @@
+/*=========================================================================
+  Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
+
+  Authors belong to:
+  - University of LYON              http://www.universite-lyon.fr/
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
+  - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
+
+  This software is distributed WITHOUT ANY WARRANTY; without even
+  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+  PURPOSE.  See the copyright notices for more information.
+
+  It is distributed under dual licence
+
+  - BSD        See included LICENSE.txt file
+  - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+===========================================================================**/
+
+// vv
+#include "vvWipeImage.h"
+#include "vvSlicer.h"
+#include "vvMainWindow.h"
+
+// clitk
+#include "clitkCropImage_ggo.h"
+#include "clitkCropImageGenericFilter.h"
+#include "clitkExceptionObject.h"
+
+// qt
+#include <QComboBox>
+#include <QCursor>
+#include <QApplication>
+#include <QMessageBox>
+#include <QSignalMapper>
+#include <QFileDialog>
+
+// vtk
+#include <vtkVersion.h>
+#include <vtkStreamingDemandDrivenPipeline.h>
+#include <vtkInformation.h>
+#include <vtkImageData.h>
+#include <vtkSmartPointer.h>
+
+
+#include <extensions.h>
+
+#define COLUMN_TREE 0
+#define COLUMN_UL_VIEW 1
+#define COLUMN_UR_VIEW 2
+#define COLUMN_DL_VIEW 3
+#define COLUMN_DR_VIEW 4
+#define COLUMN_CLOSE_IMAGE 5
+#define COLUMN_RELOAD_IMAGE 6
+#define COLUMN_IMAGE_NAME 7
+
+//------------------------------------------------------------------------------
+vvWipeImage::vvWipeImage():
+  Ui::vvWipeImage()
+{
+    vtkSmartPointer<vtkImageRectilinearWipe> mWipe = vtkSmartPointer<vtkImageRectilinearWipe>::New();
+    mWipe->SetWipe(0);
+    mWipe->SetPosition(256,256);
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+vvWipeImage::~vvWipeImage()
+{
+}
+//------------------------------------------------------------------------------
+
+void vvWipeImage::Initialize(QString inputPathName, std::vector<vvSlicerManager*> slicerManagers)
+{
+  mInputPathName = inputPathName;
+  mSlicerManagers = slicerManagers;
+}
+
+//------------------------------------------------------------------------------
+void vvWipeImage::setInputImage(int number, vvImage::Pointer image)
+{
+  if (image->GetVTKImages().size()) {
+    mImage = image;
+    mWipe->SetInputData(number, mImage->GetVTKImages()[0]); //[0] pour du 4D ?
+  }
+}
+//------------------------------------------------------------------------------
+
+
+
+//------------------------------------------------------------------------------
+void vvWipeImage::crossPointerChanged()
+{
+  mWipe->SetPosition(256,256);
+  UpdateWipe();
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvWipeImage::UpdateWipe()
+{
+
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvWipeImage::selectWipeImage(int index, QTreeWidget* DataTree)
+{ 
+
+  QString Extensions = EXTENSIONS;
+  Extensions += ";;All Files (*)";
+  QStringList files = QFileDialog::getOpenFileNames(NULL,tr("Load Wipe image"),mInputPathName,Extensions);
+  if (files.isEmpty())
+    return;
+
+  std::vector<std::string> vecFileNames;
+  for (int i = 0; i < files.size(); i++) {
+    vecFileNames.push_back(files[i].toStdString());
+  }
+
+  AddWipeImage(index,vecFileNames,vvImageReader::IMAGE, DataTree);
+}
+//------------------------------------------------------------------------------
+
+void vvWipeImage::AddWipeImage(int index, std::vector<std::string> fileNames, vvImageReader::LoadedImageType type, QTreeWidget* DataTree)
+{ 
+  QString file(fileNames[0].c_str());
+  if (QFile::exists(file))
+  {
+    mInputPathName = itksys::SystemTools::GetFilenamePath(file.toStdString()).c_str();
+    itk::ImageIOBase::Pointer reader = itk::ImageIOFactory::CreateImageIO(
+      file.toStdString().c_str(), itk::ImageIOFactory::ReadMode);
+    reader->SetFileName(fileNames[0].c_str());
+    reader->ReadImageInformation();
+    std::string component = reader->GetComponentTypeAsString(reader->GetComponentType());
+    int dimension = reader->GetNumberOfDimensions();
+    QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
+    vvProgressDialog progress("Opening " + file.toStdString());
+    qApp->processEvents();
+
+    std::string filename = itksys::SystemTools::GetFilenameWithoutExtension(file.toStdString()).c_str();
+//    if (mSlicerManagers[index]->SetOverlay(fileNames,dimension, component,type)) {
+      //create an item in the tree with good settings
+      QTreeWidgetItem *item = new QTreeWidgetItem();
+      item->setData(0,Qt::UserRole,file.toStdString().c_str());
+      item->setData(1,Qt::UserRole,tr("wipe"));
+      QFileInfo fileinfo(file); //Do not show the path
+      item->setData(COLUMN_IMAGE_NAME,Qt::DisplayRole,fileinfo.fileName());
+      item->setToolTip(COLUMN_IMAGE_NAME, mSlicerManagers[index]->GetListOfAbsoluteFilePathInOneString("wipe").c_str());
+      qApp->processEvents();
+#if VTK_MAJOR_VERSION > 5
+      for ( unsigned int i = 0; i < mSlicerManagers[index]->GetNumberOfSlicers(); i++)
+        mSlicerManagers[index]->GetSlicer(i)->ForceUpdateDisplayExtent();
+#endif
+
+      for (int j = 1; j <= 4; j++) {
+        item->setData(j,Qt::CheckStateRole,DataTree->topLevelItem(index)->data(j,Qt::CheckStateRole));
+      }
+
+      //Create the buttons for reload and close
+      qApp->processEvents();
+      QTreePushButton* cButton = new QTreePushButton;
+      cButton->setItem(item);
+      cButton->setColumn(COLUMN_CLOSE_IMAGE);
+      cButton->setToolTip(tr("close image"));
+      cButton->setIcon(QIcon(QString::fromUtf8(":/common/icons/exit.png")));
+      connect(cButton,SIGNAL(clickedInto(QTreeWidgetItem*, int)),
+        vvMainWindow::Instance(),SLOT(CloseImage(QTreeWidgetItem*, int)));
+
+      QTreePushButton* rButton = new QTreePushButton;
+      rButton->setItem(item);
+      rButton->setColumn(COLUMN_RELOAD_IMAGE);
+      rButton->setToolTip(tr("reload image"));
+      rButton->setIcon(QIcon(QString::fromUtf8(":/common/icons/rotateright.png")));
+      //connect(rButton,SIGNAL(clickedInto(QTreeWidgetItem*, int)),
+      //  this,SLOT(ReloadImage(QTreeWidgetItem*, int)));
+
+      DataTree->topLevelItem(index)->setExpanded(1);
+      DataTree->topLevelItem(index)->addChild(item);
+      DataTree->setItemWidget(item, COLUMN_CLOSE_IMAGE, cButton);
+      DataTree->setItemWidget(item, COLUMN_RELOAD_IMAGE, rButton);
+
+      //set the id of the image
+      QString id = DataTree->topLevelItem(index)->data(COLUMN_IMAGE_NAME,Qt::UserRole).toString();
+      item->setData(COLUMN_IMAGE_NAME,Qt::UserRole,id.toStdString().c_str());
+      //UpdateTree(DataTree);
+      qApp->processEvents();
+      //ImageInfoChanged();
+      QApplication::restoreOverrideCursor();
+
+      // Update the display to update, e.g., the sliders
+//      for(int i=0; i<4; i++)
+//        DisplaySliders(index, i);
+/*    } else {
+      QApplication::restoreOverrideCursor();
+      QString error = "Cannot import the new image.\n";
+      error += mSlicerManagers[index]->GetLastError().c_str();
+      QMessageBox::information(this,tr("Problem reading image !"),error);
+    } */
+    //WindowLevelChanged();
+  }
+  else
+    QMessageBox::information(NULL,tr("Problem reading wipe Image !"),"File doesn't exist!");
+}
+//------------------------------------------------------------------------------
+
+
diff --git a/vv/vvWipeImage.h b/vv/vvWipeImage.h
new file mode 100644 (file)
index 0000000..76b9eb3
--- /dev/null
@@ -0,0 +1,77 @@
+/*=========================================================================
+  Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
+
+  Authors belong to: 
+  - University of LYON              http://www.universite-lyon.fr/
+  - Léon Bérard cancer center       http://www.centreleonberard.fr
+  - CREATIS CNRS laboratory         http://www.creatis.insa-lyon.fr
+
+  This software is distributed WITHOUT ANY WARRANTY; without even
+  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+  PURPOSE.  See the copyright notices for more information.
+
+  It is distributed under dual licence
+
+  - BSD        See included LICENSE.txt file
+  - CeCILL-B   http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+===========================================================================**/
+#ifndef VVWIPEIMAGE_H
+#define VVWIPEIMAGE_H
+
+//qt
+#include <QtGlobal>
+#include <QtDesigner/QDesignerExportWidget>
+#include <QDialog>
+#include <QSlider>
+#include <QMessageBox>
+#include "QTreePushButton.h"
+// vv
+#include "vvImage.h"
+#include "vvImageReader.h"
+#include "vvProgressDialog.h"
+#include "vvSlicerManager.h"
+#include "ui_vvWipeImage.h"
+//vtk
+#include <vtkTransform.h>
+#include <vtkImageRectilinearWipe.h>
+//itk
+#include <itkLightObject.h>
+
+//------------------------------------------------------------------------------
+class vvWipeImage:
+  public QObject,
+  public itk::LightObject,
+  private Ui::vvWipeImage
+{
+  Q_OBJECT
+    public:
+        
+  typedef vvWipeImage Self;
+  typedef itk::SmartPointer<Self> Pointer;
+  typedef itk::ProcessObject::Pointer ConverterPointer;
+  
+  itkNewMacro(Self);
+  vvWipeImage();
+  ~vvWipeImage();
+
+  void Initialize(QString inputPathName, std::vector<vvSlicerManager*> slicerManagers);
+  void selectWipeImage(int index, QTreeWidget* DataTree);
+  void setInputImage(int number, vvImage::Pointer image);
+  void AddWipeImage(int index, std::vector<std::string> fileNames, vvImageReader::LoadedImageType type, QTreeWidget* DataTree);
+
+public slots:
+  void crossPointerChanged();
+
+ protected:
+  vtkSmartPointer<vtkImageRectilinearWipe> mWipe;
+  void UpdateWipe();
+  vtkSmartPointer<vtkMatrix4x4> mConcatenedTransform;
+  vvImage::Pointer mImage;
+  QString mInputPathName;
+  std::vector<vvSlicerManager*> mSlicerManagers;
+
+}; // end class vvWipeImage
+//------------------------------------------------------------------------------
+
+#endif
+