]> Creatis software - clitk.git/commitdiff
1/ some minor changes for compilation under windows / VC++ 2010 Express
authorrblanc <rblanc33@gmail.com>
Tue, 4 Dec 2012 14:15:29 +0000 (15:15 +0100)
committerrblanc <rblanc33@gmail.com>
Tue, 4 Dec 2012 14:15:29 +0000 (15:15 +0100)
2/ 1st prototype version of the sequence fusion visualization mode (not so clean, but it works)

25 files changed:
CMakeLists.txt
common/clitkCommon.h
common/rtkHndImageIO.cxx
common/vvImageReader.cxx
fast_make.sh [changed mode: 0755->0644]
make_meta.sh [changed mode: 0755->0644]
make_new_tool.sh [changed mode: 0755->0644]
tools/CMakeLists.txt
tools/make_new_tool.sh [changed mode: 0755->0644]
utilities/CxImage/CMakeLists.txt [changed mode: 0755->0644]
vv/CMakeLists.txt
vv/make_vv_class.sh [changed mode: 0755->0644]
vv/qt_ui/vvMainWindow.ui
vv/qt_ui/vvOverlayPanel.ui
vv/vv.cxx
vv/vvAnimatedGIFWriter.h
vv/vvMainWindow.cxx
vv/vvMainWindow.h
vv/vvOverlayPanel.cxx
vv/vvOverlayPanel.h
vv/vvSlicer.cxx
vv/vvSlicer.h
vv/vvSlicerManager.cxx
vv/vvSlicerManager.h
vv/vvToolBaseBase.h

index ca68aa390d608473f6c1968e34bc54242c7385d3..f64d0aa47e916c08cc921752550312deb4004ca5 100644 (file)
@@ -13,6 +13,11 @@ ENDIF(NOT DEFINED CLITK_SOURCE_DIR)
 
 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
 
+IF(MSVC)
+  SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /bigobj" )
+  SET( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /bigobj" )
+ENDIF(MSVC)
+
 #=========================================================
 INCLUDE(${CLITK_SOURCE_DIR}/cmake/common.cmake)
 INCLUDE(${CLITK_SOURCE_DIR}/cmake/dependencies.cmake)
index 9eb36522004c172b9cfa6d8bb209f45821cb02f5..8f9ce0f0ee20fb8ad45b48f38876fc3d993695c5 100644 (file)
@@ -40,6 +40,7 @@
 #  include <sys/resource.h>
 #elif defined(_WIN32)
 #  include <windows.h>
+#  include <stdint.h>
 #endif
 
 //--------------------------------------------------------------------
index 8d59982f6d7d3819057f6812a1033ad45d9e3196..4791fd7920a56386435ae34accab7f578ace8631 100644 (file)
@@ -35,24 +35,24 @@ void rtk::HndImageIO::ReadImageInformation()
 
   size_t nelements = 0;
   nelements += fread ( (void *) hnd.sFileType, sizeof(char), 32, fp);
-  nelements += fread ( (void *) &hnd.FileLength, sizeof(uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.FileLength, sizeof(itk::uint32_t), 1, fp);
   nelements += fread ( (void *) hnd.sChecksumSpec, sizeof(char), 4, fp);
-  nelements += fread ( (void *) &hnd.nCheckSum, sizeof(uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.nCheckSum, sizeof(itk::uint32_t), 1, fp);
   nelements += fread ( (void *) hnd.sCreationDate, sizeof(char), 8, fp);
   nelements += fread ( (void *) hnd.sCreationTime, sizeof(char), 8, fp);
   nelements += fread ( (void *) hnd.sPatientID, sizeof(char), 16, fp);
-  nelements += fread ( (void *) &hnd.nPatientSer, sizeof(uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.nPatientSer, sizeof(itk::uint32_t), 1, fp);
   nelements += fread ( (void *) hnd.sSeriesID, sizeof(char), 16, fp);
-  nelements += fread ( (void *) &hnd.nSeriesSer, sizeof(uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.nSeriesSer, sizeof(itk::uint32_t), 1, fp);
   nelements += fread ( (void *) hnd.sSliceID, sizeof(char), 16, fp);
-  nelements += fread ( (void *) &hnd.nSliceSer, sizeof(uint32_t), 1, fp);
-  nelements += fread ( (void *) &hnd.SizeX, sizeof(uint32_t), 1, fp);
-  nelements += fread ( (void *) &hnd.SizeY, sizeof(uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.nSliceSer, sizeof(itk::uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.SizeX, sizeof(itk::uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.SizeY, sizeof(itk::uint32_t), 1, fp);
   nelements += fread ( (void *) &hnd.dSliceZPos, sizeof(double), 1, fp);
   nelements += fread ( (void *) hnd.sModality, sizeof(char), 16, fp);
-  nelements += fread ( (void *) &hnd.nWindow, sizeof(uint32_t), 1, fp);
-  nelements += fread ( (void *) &hnd.nLevel, sizeof(uint32_t), 1, fp);
-  nelements += fread ( (void *) &hnd.nPixelOffset, sizeof(uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.nWindow, sizeof(itk::uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.nLevel, sizeof(itk::uint32_t), 1, fp);
+  nelements += fread ( (void *) &hnd.nPixelOffset, sizeof(itk::uint32_t), 1, fp);
   nelements += fread ( (void *) hnd.sImageType, sizeof(char), 4, fp);
   nelements += fread ( (void *) &hnd.dGantryRtn, sizeof(double), 1, fp);
   nelements += fread ( (void *) &hnd.dSAD, sizeof(double), 1, fp);
@@ -95,7 +95,7 @@ void rtk::HndImageIO::ReadImageInformation()
   nelements += fread ( (void *) &hnd.dGating4DInfoZ, sizeof(double), 1, fp);
   nelements += fread ( (void *) &hnd.dGating4DInfoTime, sizeof(double), 1, fp);
 
-  if(nelements != /*char*/120 + /*uint32_t*/10 +  /*double*/41)
+  if(nelements != /*char*/120 + /*itk::uint32_t*/10 +  /*double*/41)
     itkGenericExceptionMacro(<< "Could not read header data in " << m_FileName);
 
   if(fclose (fp) != 0)
@@ -133,16 +133,16 @@ void rtk::HndImageIO::Read(void * buffer)
 {
   FILE *fp;
 
-  uint32_t*      buf = (uint32_t*)buffer;
+  itk::uint32_t*      buf = (itk::uint32_t*)buffer;
   unsigned char *pt_lut;
-  uint32_t       a;
+  itk::uint32_t       a;
   unsigned char  v;
   int            lut_idx, lut_off;
   size_t         num_read;
   char           dc;
   short          ds;
   long           dl, diff=0;
-  uint32_t       i;
+  itk::uint32_t       i;
 
   fp = fopen (m_FileName.c_str(), "rb");
   if (fp == NULL)
@@ -160,13 +160,13 @@ void rtk::HndImageIO::Read(void * buffer)
 
   /* Read first row */
   for (i = 0; i < GetDimensions(0); i++) {
-    if(1 != fread (&a, sizeof(uint32_t), 1, fp))
+    if(1 != fread (&a, sizeof(itk::uint32_t), 1, fp))
       itkGenericExceptionMacro(<< "Could not read first row in: " << m_FileName);
     buf[i] = a;
     }
 
   /* Read first pixel of second row */
-  if(1 != fread (&a, sizeof(uint32_t), 1, fp))
+  if(1 != fread (&a, sizeof(itk::uint32_t), 1, fp))
     itkGenericExceptionMacro(<< "Could not read first pixel of second row");
   buf[i++] = a;
 
@@ -174,7 +174,7 @@ void rtk::HndImageIO::Read(void * buffer)
   lut_idx = 0;
   lut_off = 0;
   while (i < GetDimensions(0) * GetDimensions(1) ) {
-    uint32_t r11, r12, r21;
+    itk::uint32_t r11, r12, r21;
 
     r11 = buf[i-GetDimensions(0)-1];
     r12 = buf[i-GetDimensions(0)];
@@ -211,7 +211,7 @@ void rtk::HndImageIO::Read(void * buffer)
         diff = ds;
         break;
       case 2:
-        num_read = fread (&dl, sizeof(uint32_t), 1, fp);
+        num_read = fread (&dl, sizeof(itk::uint32_t), 1, fp);
         if (num_read != 1) goto read_error;
         diff = dl;
         break;
index c795cd9299697c7a34c784c1973541c7012e777d..f4f1a907214912b61b4bbe295a1c2652c6359c8e 100644 (file)
@@ -77,13 +77,13 @@ void vvImageReader::Update(int dim,std::string inputPixelType, LoadedImageType t
   switch(mDim)     {
   case 2:
     UpdateWithDim<2>(mInputPixelType);
-    break;;
+    break;
   case 3:
     UpdateWithDim<3>(mInputPixelType);
-    break;;
+    break;
   case 4:
     UpdateWithDim<4>(mInputPixelType);
-    break;;
+    break;
   default:
     std::cerr << "dimension unknown in Update ! " << std::endl;
   }
@@ -193,9 +193,21 @@ void vvImageReader::ReadMatImageTransform()
     }
 
     // TODO SR and BP: check on the list of transforms and not the first only
-    mImage->GetTransform()[0]->PostMultiply();
+    mImage->GetTransform()[0]->PreMultiply();
     mImage->GetTransform()[0]->Concatenate(matrix);
     mImage->GetTransform()[0]->Update();
+
+    //for image sequences, apply the transform to each images of the sequence
+    if (mImage->IsTimeSequence())
+    {
+       for (unsigned i = 1 ; i<mImage->GetTransform().size() ; i++)
+        {
+            mImage->GetTransform()[i]->PreMultiply();
+            mImage->GetTransform()[i]->Concatenate(matrix);
+            mImage->GetTransform()[i]->Update();
+        }
+    }
+
   }
 }
 //------------------------------------------------------------------------------
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 9df72e16716cef85164834183d5d5b779ab735c0..505c2109f1d2a0b48ea66394cd629df46290ebd2 100644 (file)
@@ -233,7 +233,7 @@ IF (CLITK_BUILD_TOOLS)
   IF(CLITK_EXPERIMENTAL)
     WRAP_GGO(clitkBinaryImageToMesh_GGO_C clitkBinaryImageToMesh.ggo)
     ADD_EXECUTABLE(clitkBinaryImageToMesh clitkBinaryImageToMesh.cxx ${clitkBinaryImageToMesh_GGO_C})
-    TARGET_LINK_LIBRARIES(clitkBinaryImageToMesh itksys ${VTK_LIBRARIES})
+    TARGET_LINK_LIBRARIES(clitkBinaryImageToMesh itksys ${ITK_LIBRARIES} ${VTK_LIBRARIES})
     SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkBinaryImageToMesh)
 
     WRAP_GGO(clitkMeshToBinaryImage_GGO_C clitkMeshToBinaryImage.ggo)
@@ -243,7 +243,7 @@ IF (CLITK_BUILD_TOOLS)
 
     WRAP_GGO(clitkMeshViewer_GGO_C clitkMeshViewer.ggo)
     ADD_EXECUTABLE(clitkMeshViewer clitkMeshViewer.cxx ${clitkMeshViewer_GGO_C})
-    TARGET_LINK_LIBRARIES(clitkMeshViewer ${VTK_LIBRARIES})
+    TARGET_LINK_LIBRARIES(clitkMeshViewer ${ITK_LIBRARIES} ${VTK_LIBRARIES})
     SET(TOOLS_INSTALL ${TOOLS_INSTALL} clitkMeshViewer)
   ENDIF(CLITK_EXPERIMENTAL)
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index dbb360c6085f2a235ad89444e2d8c022498da6af..c37c3f606bebc1cc2d3386b0a6227b90d324eabb 100644 (file)
@@ -251,7 +251,7 @@ ENDIF(UNIX OR APPLE)
 
 IF(WIN32)
   #INCLUDE(InstallRequiredSystemLibraries)
-  INSTALL(FILES ${EXECUTABLE_OUTPUT_PATH}/vv.exe DESTINATION .)
+  INSTALL(TARGETS vv DESTINATION bin)
   #INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/icons/ducky.png DESTINATION .)
 ENDIF(WIN32)
 #=========================================================
old mode 100755 (executable)
new mode 100644 (file)
index 8d3d8ff90806dbd4810e7a111be8650f0dd300ea..07ddeb2eeb520f2b49f97cb3012842a96522b844 100644 (file)
          </sizepolicy>
         </property>
         <property name="currentIndex">
-         <number>0</number>
+         <number>1</number>
         </property>
         <widget class="QWidget" name="DataTab">
          <attribute name="title">
      <x>0</x>
      <y>0</y>
      <width>1008</width>
-     <height>25</height>
+     <height>29</height>
     </rect>
    </property>
    <property name="defaultUp">
     <addaction name="actionAdd_VF_to_current_Image"/>
     <addaction name="actionAdd_overlay_image_to_current_image"/>
     <addaction name="actionAdd_fusion_image"/>
+    <addaction name="actionAdd_USSequence_toCT"/>
    </widget>
    <widget class="QMenu" name="menuScreenshots">
     <property name="title">
     <bool>true</bool>
    </property>
   </action>
+  <action name="actionAdd_USSequence_toCT">
+   <property name="icon">
+    <iconset resource="../vvIcons.qrc">
+     <normaloff>:/common/icons/rotateright.png</normaloff>:/common/icons/rotateright.png</iconset>
+   </property>
+   <property name="text">
+    <string>Test / Fusion of US &amp; CT sequences</string>
+   </property>
+   <property name="iconVisibleInMenu">
+    <bool>true</bool>
+   </property>
+  </action>
  </widget>
  <customwidgets>
   <customwidget>
index dd7c83ded7af10ed2fa143eb76697e3d00c8f7d1..b7f73a2c0afdff08374fddad3bb203b03af18d9d 100644 (file)
@@ -6,8 +6,8 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>344</width>
-    <height>480</height>
+    <width>444</width>
+    <height>815</height>
    </rect>
   </property>
   <property name="sizePolicy">
@@ -36,6 +36,118 @@ p, li { white-space: pre-wrap; }
      </property>
     </widget>
    </item>
+   <item>
+    <widget class="QFrame" name="fCTUSFrame">
+     <property name="enabled">
+      <bool>true</bool>
+     </property>
+     <property name="sizePolicy">
+      <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
+     <property name="minimumSize">
+      <size>
+       <width>0</width>
+       <height>70</height>
+      </size>
+     </property>
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <widget class="QCheckBox" name="fCTUSActivateTimeSyncCheckBox">
+      <property name="enabled">
+       <bool>false</bool>
+      </property>
+      <property name="geometry">
+       <rect>
+        <x>270</x>
+        <y>10</y>
+        <width>80</width>
+        <height>17</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Temporal</string>
+      </property>
+     </widget>
+     <widget class="QCheckBox" name="fCTUSActivateSpaceSyncCheckBox">
+      <property name="geometry">
+       <rect>
+        <x>210</x>
+        <y>10</y>
+        <width>61</width>
+        <height>17</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Spatial</string>
+      </property>
+      <property name="checkable">
+       <bool>true</bool>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_13">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>0</y>
+        <width>31</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string/>
+      </property>
+      <property name="pixmap">
+       <pixmap resource="../vvIcons.qrc">:/common/icons/rotateright.png</pixmap>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_14">
+      <property name="geometry">
+       <rect>
+        <x>30</x>
+        <y>0</y>
+        <width>171</width>
+        <height>32</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>Synchronized fusion of sequences</string>
+      </property>
+     </widget>
+     <widget class="QLabel" name="label_15">
+      <property name="geometry">
+       <rect>
+        <x>0</x>
+        <y>30</y>
+        <width>121</width>
+        <height>29</height>
+       </rect>
+      </property>
+      <property name="text">
+       <string>  Browse fused sequence  </string>
+      </property>
+     </widget>
+     <widget class="QSlider" name="fCTUSSlider">
+      <property name="geometry">
+       <rect>
+        <x>130</x>
+        <y>36</y>
+        <width>181</width>
+        <height>20</height>
+       </rect>
+      </property>
+      <property name="orientation">
+       <enum>Qt::Horizontal</enum>
+      </property>
+     </widget>
+    </widget>
+   </item>
    <item>
     <widget class="QFrame" name="vFFrame">
      <property name="enabled">
index 47057e4a0ed335cc3720cec279c5ffcfab6f9c29..8ad9140ea628c1b488fb74b271fac18d6c394889 100644 (file)
--- a/vv/vv.cxx
+++ b/vv/vv.cxx
@@ -74,7 +74,7 @@ void open_sequence(vvMainWindow &window,
                    std::vector<std::string> &sequence_filenames,
                    int n_image_loaded)
 {
-  const std::string open_mode_names[] = {"base", "overlay", "fusion", "vf", "contour"};
+  const std::string open_mode_names[] = {"base", "overlay", "fusion", "vf", "contour", "fusionSequence"};
   if(open_mode==O_BASE)
     window.LoadImages(sequence_filenames, vvImageReader::MERGEDWITHTIME);
   else if (open_mode==O_OVERLAY)
index 2fde827b8e25c7457b35a7c834a5347d39075299..1baf2b9359b510807bf3b58cb112bc0550934df8 100644 (file)
@@ -8,7 +8,7 @@
 
 class vtkImageAppend;
 
-class VTK_IO_EXPORT vvAnimatedGIFWriter : public vtkGenericMovieWriter
+class vvAnimatedGIFWriter : public vtkGenericMovieWriter //test this if link error...
 {
 public:
   static vvAnimatedGIFWriter *New();
index 22041dffa23f3694b14d12f75d32012371666005..a1bdc964c87370cac31b167f5a53195826d2d16b 100644 (file)
@@ -181,6 +181,10 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   contextMenu.addAction(actionAdd_fusion_image);
   contextActions.push_back(actionAdd_fusion_image);
 
+  contextMenu.addAction(actionAdd_USSequence_toCT);
+  contextActions.push_back(actionAdd_USSequence_toCT);
+
+
   contextMenu.addSeparator();
   QAction* actionResetMatrix = contextMenu.addAction(QIcon(QString::fromUtf8(":/common/icons/identity.png")),
                                                       tr("Reset transformation to identity"));
@@ -234,6 +238,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   actionSave_As->setEnabled(0);
   actionAdd_VF_to_current_Image->setEnabled(0);
   actionAdd_fusion_image->setEnabled(0);
+  actionAdd_USSequence_toCT->setEnabled(0);
 
   //init the sliders
   verticalSliders.push_back(NOVerticalSlider);
@@ -281,10 +286,13 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   connect(actionExit,SIGNAL(triggered()),this,SLOT(close()));
   connect(actionAdd_VF_to_current_Image,SIGNAL(triggered()),this,SLOT(OpenField()));
   connect(actionAdd_fusion_image,SIGNAL(triggered()),this,SLOT(SelectFusionImage()));
-  connect(actionAdd_overlay_image_to_current_image,SIGNAL(triggered()), this,SLOT(SelectOverlayImage()));  connect(actionNavigation_Help,SIGNAL(triggered()),this,SLOT(ShowHelpDialog()));
+  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()));
   connect(actionDocumentation,SIGNAL(triggered()),this,SLOT(ShowDocumentation()));
   connect(actionRegister_vv,SIGNAL(triggered()),this,SLOT(PopupRegisterForm()));
 
+
   ///////////////////////////////////////////////
   connect(actionSegmentation,SIGNAL(triggered()),this,SLOT(SegmentationOnCurrentImage()));
   connect(actionSurface_Viewer,SIGNAL(triggered()),this,SLOT(SurfaceViewerLaunch()));
@@ -325,6 +333,10 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
           this,SLOT(SetFusionProperty(int,int,int,double,double, bool)));
   connect(landmarksPanel,SIGNAL(UpdateRenderWindows()),this,SLOT(UpdateRenderWindows()));
 
+  connect(overlayPanel,SIGNAL(FusionSequencePropertyUpdated(int, bool, unsigned int)),
+          this,SLOT(SetFusionSequenceProperty(int, bool,unsigned int)));
+
+
   playMode = 0;//pause
   mFrameRate = 10;
   playButton->setEnabled(0);
@@ -361,6 +373,7 @@ vvMainWindow::vvMainWindow():vvMainWindowBase()
   //timerMemory->setInterval(5);
   connect(timerMemory, SIGNAL(timeout()), this, SLOT(UpdateMemoryUsage()));
   timerMemory->start(2000);
+
 }
 //------------------------------------------------------------------------------
 void vvMainWindow::show()
@@ -904,6 +917,8 @@ void vvMainWindow::LoadImages(std::vector<std::string> files, vvImageReader::Loa
                 this, SLOT(OverlayChanged(int,double,double)));
         connect(mSlicerManagers.back(), SIGNAL(UpdateFusion(int, double)),
                 this, SLOT(FusionChanged(int,double)));
+        //connect(mSlicerManagers.back(), SIGNAL(UpdateFusionSequence(int, bool, unsigned int)),
+        //        this, SLOT(FusionSequenceChanged(int, bool, unsigned int)));
         connect(mSlicerManagers.back(), SIGNAL(WindowLevelChanged()),
                 this,SLOT(WindowLevelChanged()));
         connect(mSlicerManagers.back(), SIGNAL(UpdateSlice(int,int)),
@@ -1013,6 +1028,7 @@ void vvMainWindow::ImageInfoChanged()
   actionAdd_VF_to_current_Image->setEnabled(1);
   actionAdd_fusion_image->setEnabled(1);
   actionAdd_overlay_image_to_current_image->setEnabled(1);
+  actionAdd_USSequence_toCT->setEnabled(1);
   actionNorth_East_Window->setEnabled(1);
   actionNorth_West_Window->setEnabled(1);
   actionSouth_East_Window->setEnabled(1);
@@ -1028,13 +1044,14 @@ void vvMainWindow::ImageInfoChanged()
     colorMapComboBox->setEnabled(1);
     for (int i = 0; i < DataTree->topLevelItem(index)->childCount(); i++) {
       if (DataTree->topLevelItem(index)->child(i)->data(1,Qt::UserRole).toString() == "overlay" ||
-          DataTree->topLevelItem(index)->child(i)->data(1,Qt::UserRole).toString() == "fusion") {
+          DataTree->topLevelItem(index)->child(i)->data(1,Qt::UserRole).toString() == "fusion" ||
+          DataTree->topLevelItem(index)->child(i)->data(1,Qt::UserRole).toString() == "fusionSequence") {
         colorMapComboBox->setEnabled(0);
         break;
       }
     }
 
-    std::vector<double> origin;
+       std::vector<double> origin;
     std::vector<double> inputSpacing;
     std::vector<int> inputSize;
     std::vector<double> sizeMM;
@@ -1044,7 +1061,7 @@ void vvMainWindow::ImageInfoChanged()
     QString inputSizeInBytes;
     QString image = DataTree->selectedItems()[0]->data(COLUMN_IMAGE_NAME,Qt::DisplayRole).toString();
 
-    int nframes = mSlicerManagers[index]->GetSlicer(0)->GetTMax();
+       int nframes = mSlicerManagers[index]->GetSlicer(0)->GetTMax();
     if (nframes > 1 || playMode == 1) {
       playButton->setEnabled(1);
       frameRateLabel->setEnabled(1);
@@ -1058,7 +1075,7 @@ void vvMainWindow::ImageInfoChanged()
     //read image header
     int NPixel = 1;
 
-    int tSlice = 0;
+       int tSlice = 0;
     vvImage::Pointer imageSelected;
     if (DataTree->topLevelItem(index) == DataTree->selectedItems()[0]) {
       imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetImage();
@@ -1070,19 +1087,23 @@ void vvMainWindow::ImageInfoChanged()
       imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetOverlay();
       tSlice = mSlicerManagers[index]->GetSlicer(0)->GetOverlayTSlice();
     } else if (DataTree->selectedItems()[0]->data(1,Qt::UserRole).toString() == "fusion") {
-      imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetFusion();
-      tSlice = mSlicerManagers[index]->GetSlicer(0)->GetFusionTSlice();
+       imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetFusion();
+       tSlice = mSlicerManagers[index]->GetSlicer(0)->GetFusionTSlice();
     }
+    else if (DataTree->selectedItems()[0]->data(1,Qt::UserRole).toString() == "fusionSequence") {
+       imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetFusion();
+       tSlice = mSlicerManagers[index]->GetSlicer(0)->GetFusionTSlice();
+       }
     else if (DataTree->selectedItems()[0]->data(1,Qt::UserRole).toString() == "contour") {
-      imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetImage();
-      tSlice = mSlicerManagers[index]->GetSlicer(0)->GetTSlice();
+       imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetImage();
+       tSlice = mSlicerManagers[index]->GetSlicer(0)->GetTSlice();
     }
     else {
-      imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetImage();
-      tSlice = mSlicerManagers[index]->GetSlicer(0)->GetTSlice();
+       imageSelected = mSlicerManagers[index]->GetSlicer(0)->GetImage();
+       tSlice = mSlicerManagers[index]->GetSlicer(0)->GetTSlice();
     }
 
-    dimension = imageSelected->GetNumberOfDimensions();
+       dimension = imageSelected->GetNumberOfDimensions();
     origin.resize(dimension);
     inputSpacing.resize(dimension);
     inputSize.resize(dimension);
@@ -1096,7 +1117,7 @@ void vvMainWindow::ImageInfoChanged()
       NPixel *= inputSize[i];
     }
     inputSizeInBytes = GetSizeInBytes(imageSelected->GetActualMemorySize()*1000);
-    
+   
     QString dim = QString::number(dimension) + " (";
     dim += pixelType + ")";
 
@@ -1107,10 +1128,11 @@ void vvMainWindow::ImageInfoChanged()
     infoPanel->setOrigin(GetVectorDoubleAsString(origin));
     infoPanel->setSpacing(GetVectorDoubleAsString(inputSpacing));
     infoPanel->setNPixel(QString::number(NPixel)+" ("+inputSizeInBytes+")");
-    transformation = imageSelected->GetTransform()[tSlice]->GetMatrix();
+
+       transformation = imageSelected->GetTransform()[tSlice]->GetMatrix();
     infoPanel->setTransformation(Get4x4MatrixDoubleAsString(transformation));
 
-    landmarksPanel->SetCurrentLandmarks(mSlicerManagers[index]->GetLandmarks(),
+       landmarksPanel->SetCurrentLandmarks(mSlicerManagers[index]->GetLandmarks(),
                                         mSlicerManagers[index]->GetSlicer(0)->GetImage()->GetVTKImages().size());
     landmarksPanel->SetCurrentPath(mInputPathName.toStdString());
     landmarksPanel->SetCurrentImage(mSlicerManagers[index]->GetFileName().c_str());
@@ -1123,7 +1145,7 @@ void vvMainWindow::ImageInfoChanged()
       }
     }
 
-    infoPanel->setFileName(image);
+       infoPanel->setFileName(image);
     infoPanel->setDimension(dim);
     infoPanel->setSizePixel(GetVectorIntAsString(inputSize));
     infoPanel->setSizeMM(GetVectorDoubleAsString(sizeMM));
@@ -1143,10 +1165,11 @@ void vvMainWindow::ImageInfoChanged()
         break;
       }
     }
-    WindowLevelChanged();
+
+       WindowLevelChanged();
     slicingPresetComboBox->setCurrentIndex(mSlicerManagers[index]->GetSlicingPreset());
 
-    if (mSlicerManagers[index]->GetSlicer(0)->GetVF()) {
+       if (mSlicerManagers[index]->GetSlicer(0)->GetVF()) {
       overlayPanel->getVFName(mSlicerManagers[index]->GetVFName().c_str());
       overlayPanel->getVFProperty(mSlicerManagers[index]->GetSlicer(0)->GetVFSubSampling(),
                                   mSlicerManagers[index]->GetSlicer(0)->GetVFScale(),
@@ -1160,8 +1183,8 @@ void vvMainWindow::ImageInfoChanged()
     } else {
       overlayPanel->getOverlayName(mSlicerManagers[index]->GetOverlayName().c_str());
     }
-    
-    if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) {
+       if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) {
       overlayPanel->getFusionName(mSlicerManagers[index]->GetFusionName().c_str());
     } else {
       overlayPanel->getFusionName(mSlicerManagers[index]->GetFusionName().c_str());
@@ -1622,6 +1645,9 @@ void vvMainWindow::ReloadImage(QTreeWidgetItem* item, int column)
   else if (role == "fusion"){
     mSlicerManagers[index]->ReloadFusion();
   }
+  else if (role == "fusionSequence"){
+    mSlicerManagers[index]->ReloadFusionSequence(); //same as for standard fusion
+  }
   else{
     mSlicerManagers[index]->Reload();
   }
@@ -1680,15 +1706,22 @@ void vvMainWindow::WindowLevelChanged()
   else
     overlayPanel->getOverlayProperty(-1,0,0.,0.);
 
-  // Fusion image
-  if (mSlicerManagers[index]->GetSlicer(0)->GetFusion())
-    overlayPanel->getFusionProperty(mSlicerManagers[index]->GetFusionOpacity(),
-                                    mSlicerManagers[index]->GetFusionThresholdOpacity(),
-                                    mSlicerManagers[index]->GetFusionColorMap(),
-                                    mSlicerManagers[index]->GetFusionWindow(),
-                                    mSlicerManagers[index]->GetFusionLevel());
+  // Fusion & SequenceFusion image
+  if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) {
+         overlayPanel->getFusionProperty(mSlicerManagers[index]->GetFusionOpacity(),
+                 mSlicerManagers[index]->GetFusionThresholdOpacity(),
+                 mSlicerManagers[index]->GetFusionColorMap(),
+                 mSlicerManagers[index]->GetFusionWindow(),
+                 mSlicerManagers[index]->GetFusionLevel());
+         overlayPanel->getFusionSequenceProperty(mSlicerManagers[index]->GetFusionSequenceFrameIndex(),
+                 mSlicerManagers[index]->GetFusionSequenceSpatialSyncFlag(), 
+                 mSlicerManagers[index]->GetFusionSequenceNbFrames());
+  }
   else
-    overlayPanel->getFusionProperty(-1, -1, -1, -1, -1);
+  {
+         overlayPanel->getFusionProperty(-1, -1, -1, -1, -1);
+         overlayPanel->getFusionSequenceProperty(-1, false, 0);
+  }
 }
 //------------------------------------------------------------------------------
 
@@ -2013,7 +2046,8 @@ void vvMainWindow::SelectFusionImage()
 
   //check if one fusion image is added
   for (int child = 0; child < DataTree->topLevelItem(index)->childCount(); child++)
-    if (DataTree->topLevelItem(index)->child(child)->data(1,Qt::UserRole).toString() == "fusion") {
+    if ( (DataTree->topLevelItem(index)->child(child)->data(1,Qt::UserRole).toString() == "fusion") ||
+       (DataTree->topLevelItem(index)->child(child)->data(1,Qt::UserRole).toString() == "fusionSequence") ) {
       QString error = "Cannot add more than one fusion image\n";
       error += "Please remove first ";
       error += DataTree->topLevelItem(index)->child(child)->data(COLUMN_IMAGE_NAME,Qt::DisplayRole).toString();
@@ -2293,11 +2327,170 @@ void vvMainWindow::SetFusionProperty(int opacity, int thresOpacity, int colormap
     mSlicerManagers[index]->SetFusionLevel(level);
     mSlicerManagers[index]->SetFusionShowLegend(showLegend);
     mSlicerManagers[index]->SetColorMap(0);
-    mSlicerManagers[index]->Render();
+       mSlicerManagers[index]->Render();
   }
 }
 //------------------------------------------------------------------------------
 
+
+//------------------------------------------------------------------------------
+void vvMainWindow::SelectFusionSequence()
+{
+  int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
+  //check if one overlay image is added
+  for (int child = 0; child < DataTree->topLevelItem(index)->childCount(); child++)
+    if ( (DataTree->topLevelItem(index)->child(child)->data(1,Qt::UserRole).toString() == "fusion") ||
+       (DataTree->topLevelItem(index)->child(child)->data(1,Qt::UserRole).toString() == "fusionSequence") ) {
+      QString error = "Cannot add more than one compared image\n";
+      error += "Please remove first ";
+      error += DataTree->topLevelItem(index)->child(child)->data(COLUMN_IMAGE_NAME,Qt::DisplayRole).toString();
+      QMessageBox::information(this,tr("Problem adding compared image !"),error);
+      return;
+    }
+
+  QString Extensions = EXTENSIONS;
+  Extensions += ";;All Files (*)";
+  QStringList files = QFileDialog::getOpenFileNames(this,tr("Load Overlay image sequence"),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());
+  }
+  AddFusionSequence(index,vecFileNames,vvImageReader::MERGEDWITHTIME);
+}
+//------------------------------------------------------------------------------
+
+//------------------------------------------------------------------------------
+void vvMainWindow::AddFusionSequence(int index, std::vector<std::string> fileNames, vvImageReader::LoadedImageType type)
+{
+       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]->SetFusionSequence(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("fusionSequence"));
+
+                       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("fusionSequence").c_str());
+                       qApp->processEvents();
+                       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)),
+                                       this,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);
+
+                       //store the original transform matrix
+                       int indexParent = GetSlicerIndexFromItem( DataTree->topLevelItem(index) );
+                       mSlicerManagers[indexParent]->SetFusionSequenceMainTransformMatrix( mSlicerManagers[indexParent]->GetSlicer(0)->GetImage()->GetTransform()[0]->GetMatrix() );
+
+                       //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();
+                       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(this,tr("Problem reading fusion sequence !"),"File doesn't exist!");
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvMainWindow::SetFusionSequenceProperty(int fusionSequenceFrameIndex, bool spatialSyncFlag, unsigned int fusionSequenceNbFrames)
+{
+       int index = GetSlicerIndexFromItem(DataTree->selectedItems()[0]);
+       if (mSlicerManagers[index]->GetSlicer(0)->GetFusion()) {
+               int indexParent = GetSlicerIndexFromItem( DataTree->topLevelItem(index) );
+
+               mSlicerManagers[index]->SetFusionSequenceLength(fusionSequenceNbFrames);
+               mSlicerManagers[index]->SetFusionSequenceSpatialSyncFlag(spatialSyncFlag);
+               mSlicerManagers[index]->SetFusionSequenceFrameIndex(fusionSequenceFrameIndex);
+
+               if (spatialSyncFlag) { //reslice the CT
+                       //show the right frame of the US sequence
+                       mSlicerManagers[index]->SetFusionSequenceTSlice(fusionSequenceFrameIndex);
+
+                       //Set the transform matrix of the parent sequence (typically CT / 4DCT)
+                       vtkSmartPointer<vtkMatrix4x4> tmpMat = vtkSmartPointer<vtkMatrix4x4>::New();
+                       vtkMatrix4x4::Invert( mSlicerManagers[index]->GetFusionSequenceInitialTransformMatrixAtFrame(fusionSequenceFrameIndex), tmpMat );
+                       for ( unsigned i=0 ; i<mSlicerManagers[indexParent]->GetSlicer(0)->GetImage()->GetTransform().size() ; i++ ) {
+                               mSlicerManagers[indexParent]->GetSlicer(0)->GetImage()->GetTransform()[i]->SetMatrix( mSlicerManagers[index]->GetFusionSequenceMainTransformMatrix() );
+                               mSlicerManagers[indexParent]->GetSlicer(0)->GetImage()->GetTransform()[i]->PreMultiply();
+                               mSlicerManagers[indexParent]->GetSlicer(0)->GetImage()->GetTransform()[i]->Concatenate( tmpMat );
+                               mSlicerManagers[indexParent]->GetSlicer(0)->GetImage()->GetTransform()[i]->Update();
+                       }
+
+                       for (int i=0; i<mSlicerManagers[indexParent]->GetNumberOfSlicers(); i++) {
+                               mSlicerManagers[indexParent]->GetSlicer(i)->ForceUpdateDisplayExtent();
+                               mSlicerManagers[indexParent]->GetSlicer(i)->Render();
+                       }
+               }
+               else { //flag is off.
+                       //rather use a different method for switching on/off... or check whether the matrix is the same...
+                       //TODO: reset the CT to its original state, as well as the US
+               }
+
+               //TODO: recenter the view so that the US frame is visible?
+               //or when adding the sequence, also add the sequence as an independent image that is automatically linked, to guide the views...
+       }
+}
+//------------------------------------------------------------------------------
+
+
 //------------------------------------------------------------------------------
 void vvMainWindow::SaveAs()
 {
@@ -3142,7 +3335,9 @@ vvSlicerManager* vvMainWindow::AddImage(vvImage::Pointer image,std::string filen
   connect(mSlicerManagers.back(), SIGNAL(UpdateOverlay(int, double, double)),
           this, SLOT(OverlayChanged(int,double,double)));
   connect(mSlicerManagers.back(), SIGNAL(UpdateFusion(int, double)),
-          this, SLOT(FusionChanged(int,double)));
+                 this, SLOT(FusionChanged(int,double)));
+  //connect(mSlicerManagers.back(), SIGNAL(UpdateFusionSequence(int, bool, unsigned int)),
+               //  this, SLOT(FusionSequenceChanged(int, bool, unsigned int)));
   connect(mSlicerManagers.back(), SIGNAL(WindowLevelChanged()),
           this,SLOT(WindowLevelChanged()));
   connect(mSlicerManagers.back(), SIGNAL(UpdateSlice(int,int)),
index e308314c59620094e59ac7bb778856154089283c..f9e18b13826fc07d298a32374765fa2fa844b284 100644 (file)
@@ -57,6 +57,9 @@ class vvMainWindow: public vvMainWindowBase,
   void AddOverlayImage(int index, std::vector<std::string> fileNames, vvImageReader::LoadedImageType type);
   void AddFusionImage(int index, QString filename);
   void AddROI(int index, QString filename);
+  //Process the sequence for fusion:
+  void AddFusionSequence(int index, std::vector<std::string> fileNames, vvImageReader::LoadedImageType type);
+
   ///Adds a mesh to a SlicerManager, with optional warping by vector field
   void AddContour(int image_index, vvMesh::Pointer contour, bool propagation);
   ///This is used to show an image when opened or computed
@@ -107,6 +110,7 @@ public slots:
   void VectorChanged(int visibility, double x, double y, double z, double value);
   void OverlayChanged(int visibility, double valueOver, double valueRef);
   void FusionChanged(int visibility, double value);
+  //void FusionSequenceChanged(int visibility, double value);
   void SegmentationOnCurrentImage();
   void SurfaceViewerLaunch();
 
@@ -153,11 +157,15 @@ public slots:
   void OpenField();
   void SelectOverlayImage();
   void SelectFusionImage();
+  //select the file(s) from the disk containing the image sequence to fuse
+  void SelectFusionSequence();
+
   void ResetTransformationToIdentity();
 
   void SetVFProperty(int subsampling,int scale,int lut, int width, double r, double g, double b);
   void SetOverlayProperty(int color, int linked, double window, double level);
   void SetFusionProperty(int opacity, int tresOpacity, int colormap,double window,double level, bool showLegend);
+  void SetFusionSequenceProperty(int fusionSequenceFrameIndex, bool spatialSyncFlag, unsigned int fusionSequenceNbFrames);
 
   void GoToCursor();
   void PlayPause();
index 346bd2c49b7c5c4a5a9f705c7755b4e49941922f..e205c8770105857c7edf0a0a9424ffc819554b4c 100644 (file)
@@ -34,12 +34,14 @@ vvOverlayPanel::vvOverlayPanel(QWidget * parent):QWidget(parent)
   vFFrame->hide();
   compareFrame->hide();
   fusionFrame->hide();
+  fCTUSFrame->hide();
   subSamplingSpinBox->setEnabled(0);
   scaleSpinBox->setEnabled(0);
   lutCheckBox->hide();
   lutCheckBox->setEnabled(0);
   fusionShowLegendCheckBox->setChecked(false);
-  
+  fCTUSActivateSpaceSyncCheckBox->setChecked(true);
+
   connect(subSamplingSpinBox,SIGNAL(editingFinished()),this,SLOT(setVFProperty()));
   connect(scaleSpinBox,SIGNAL(editingFinished()),this,SLOT(setVFProperty()));
   connect(lutCheckBox,SIGNAL(clicked()),this,SLOT(setVFProperty()));
@@ -58,7 +60,11 @@ vvOverlayPanel::vvOverlayPanel(QWidget * parent):QWidget(parent)
   connect(overlayLevelSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setOverlayProperty()));
   connect(overlayLinkCheckBox,SIGNAL(stateChanged(int)),this,SLOT(setOverlayProperty()));
 
+  connect(fCTUSSlider,SIGNAL(valueChanged(int)),this,SLOT(setFusionSequenceProperty()));
+  connect(fCTUSActivateSpaceSyncCheckBox,SIGNAL(stateChanged(int)),this,SLOT(setFusionSequenceProperty()));
+
   disableFusionSignals = false;
+  disableFusionSequenceSignals = false;
 }
 
 void vvOverlayPanel::getCurrentImageName(QString name)
@@ -225,7 +231,7 @@ void vvOverlayPanel::setFusionProperty()
 {
   if (disableFusionSignals)
     return;
-  
+
   fusionOpacitySpin->setValue(opacityHorizontalSlider->value()); 
   fusionThresSpin->setValue(thresOpacityHorizontalSlider->value());
 
@@ -248,6 +254,41 @@ void vvOverlayPanel::getCurrentFusionInfo(int visibility,double value)
   valueFusionnedLabel->setText(fusionValue);
 }
 
+
+void vvOverlayPanel::getFusionSequenceProperty(int sequenceFrameIndex, bool spatialSync, unsigned int sequenceLenth)
+{
+       if (sequenceFrameIndex > -1) {
+               disableFusionSequenceSignals = true;
+               fCTUSFrame->show();             
+               fCTUSFrame->setEnabled(1);
+               fCTUSSlider->setEnabled(1);
+               fCTUSSlider->setValue(sequenceFrameIndex);
+               fCTUSSlider->setMaximum(sequenceLenth);
+               if (spatialSync) fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Checked);
+               else             fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Unchecked);
+               disableFusionSequenceSignals = false;
+               setFusionSequenceProperty();
+       } else {
+               fCTUSFrame->hide();
+               fCTUSFrame->setEnabled(0);
+               fCTUSSlider->setEnabled(0);
+               fCTUSSlider->setValue(0);
+               fCTUSSlider->setMaximum(0);
+               fCTUSActivateSpaceSyncCheckBox->setCheckState(Qt::Unchecked);
+       }
+}
+
+
+void vvOverlayPanel::setFusionSequenceProperty()
+{
+       if (disableFusionSequenceSignals)
+               return;
+
+       emit FusionSequencePropertyUpdated(fCTUSSlider->value(), fCTUSActivateSpaceSyncCheckBox->isChecked(), fCTUSSlider->maximum());
+}
+
+
+
 void vvOverlayPanel::VFColorChangeRequest()
 {
   QColor color(vfColorButton->palette().color(QPalette::Background));
index bd9e9722771ed599d358fc70f2898fab73151ec2..69abbc2a2c067bfcb95f9bb927108e541782b385 100644 (file)
@@ -44,9 +44,12 @@ public:
     void getFusionProperty(int opacity, int thresOpacity, int colormap, double window, double level);
     void getFusionName(QString name);
 
-    void getCurrentVectorInfo(int visibility, double x, double y, double z, double value);
+    void getFusionSequenceProperty(int sequenceFrameIndex, bool spatialSync, unsigned int sequenceLength);
+
+       void getCurrentVectorInfo(int visibility, double x, double y, double z, double value);
     void getCurrentOverlayInfo(int visibility,double valueOver, double valueRef);
     void getCurrentFusionInfo(int visibility,double value);
+    //void getCurrentFusionSequenceInfo(int visibility,double value);
     
     bool getShowLegend();
 
@@ -56,15 +59,18 @@ public slots:
     void setFusionProperty();
     void setFusionSpinProperty();
     void VFColorChangeRequest();
+    void setFusionSequenceProperty();
 
 signals:
     void VFPropertyUpdated(int subsampling, int scale, int log, int width, double r, double g, double b);
     void OverlayPropertyUpdated(int color, int linked, double window, double level);
     void FusionPropertyUpdated(int opacity, int thresOpacity, int colormap, double window, double level, bool showLegend);
+    void FusionSequencePropertyUpdated(int sequenceFrameIndex, bool spatialSync, unsigned int sequenceLength);
 
     
 private:
     bool disableFusionSignals;
+       bool disableFusionSequenceSignals;
     
 }; // end class vvOverlayPanel
 //====================================================================
index 1e1245f425b787523aeb69d7e9cf87c7086c851d..1ace5c2ee89bf3cfa6131f5c7a13263cc7fe0b52 100644 (file)
@@ -475,7 +475,7 @@ bool vvSlicer::GetActorVisibility(const std::string& actor_type, int overlay_ind
   else if (actor_type == "overlay") {
     vis = this->mOverlayActor->GetVisibility();
   }
-  else if (actor_type == "fusion") {
+  else if ( (actor_type == "fusion") || (actor_type == "fusionSequence") ){
     vis = this->mFusionActor->GetVisibility();
   }
   else if (actor_type == "contour")
@@ -497,7 +497,7 @@ void vvSlicer::SetActorVisibility(const std::string& actor_type, int overlay_ind
   else if (actor_type == "overlay") {
     this->mOverlayActor->SetVisibility(vis);
   }
-  else if (actor_type == "fusion") {
+  else if ( (actor_type == "fusion") || (actor_type == "fusionSequence") ){
     this->mFusionActor->SetVisibility(vis);
   }
   else if (actor_type == "contour")
@@ -641,7 +641,7 @@ void vvSlicer::RemoveActor(const std::string& actor_type, int overlay_index)
     mOverlayActor = NULL;
     mOverlayMapper = NULL;
   }
-  if (actor_type == "fusion") {
+  if ( (actor_type == "fusion") || (actor_type == "fusionSequence") ) {
     Renderer->RemoveActor(mFusionActor);
     mFusion = NULL;
     mFusionActor = NULL;
@@ -726,6 +726,7 @@ void vvSlicer::SetTSlice(int t)
     if (mVF->GetVTKImages().size() > (unsigned int)mCurrentTSlice)
       mVOIFilter->SetInput(mVF->GetVTKImages()[mCurrentTSlice]);
   }
+//also temporarilly disabled...
   if (mOverlay && mOverlayActor->GetVisibility()) {
     if (mOverlay->GetVTKImages().size() > (unsigned int)t) {
       mCurrentOverlayTSlice = t;
@@ -737,6 +738,32 @@ void vvSlicer::SetTSlice(int t)
       mConcatenatedOverlayTransform->Concatenate(mSlicingTransform);
     }
   }
+//temporarilly disabled for testing fusionSequence
+  //if (mFusion && mFusionActor->GetVisibility()) {
+  //  if (mFusion->GetVTKImages().size() > (unsigned int)t) {
+  //    mCurrentFusionTSlice = t;
+  //    mFusionReslice->SetInput( mFusion->GetVTKImages()[mCurrentFusionTSlice]);
+
+  //    // Update fusion transform
+  //    mConcatenatedFusionTransform->Identity();
+  //    mConcatenatedFusionTransform->Concatenate(mFusion->GetTransform()[mCurrentFusionTSlice]);
+  //    mConcatenatedFusionTransform->Concatenate(mSlicingTransform);
+  //  }
+  //}
+  if (mSurfaceCutActors.size() > 0)
+    for (std::vector<vvMeshActor*>::iterator i=mSurfaceCutActors.begin();
+         i!=mSurfaceCutActors.end(); i++)
+      (*i)->SetTimeSlice(mCurrentTSlice);
+  UpdateDisplayExtent();
+}
+//------------------------------------------------------------------------------
+
+
+//------------------------------------------------------------------------------
+void vvSlicer::SetFusionSequenceTSlice(int t)
+{
+//QMessageBox::information(NULL, "vvSlicer::SetFusionSequenceTSlice", "ENTER, t = " + QString::number(t) + ", currentFusionTSlice = " + QString::number(mCurrentFusionTSlice));
+  //fusionSequence data is stored behind standard fusion data...
   if (mFusion && mFusionActor->GetVisibility()) {
     if (mFusion->GetVTKImages().size() > (unsigned int)t) {
       mCurrentFusionTSlice = t;
@@ -748,10 +775,7 @@ void vvSlicer::SetTSlice(int t)
       mConcatenatedFusionTransform->Concatenate(mSlicingTransform);
     }
   }
-  if (mSurfaceCutActors.size() > 0)
-    for (std::vector<vvMeshActor*>::iterator i=mSurfaceCutActors.begin();
-         i!=mSurfaceCutActors.end(); i++)
-      (*i)->SetTimeSlice(mCurrentTSlice);
+
   UpdateDisplayExtent();
 }
 //------------------------------------------------------------------------------
@@ -770,8 +794,9 @@ int vvSlicer::GetMaxCurrentTSlice()
   int t = mCurrentTSlice;
   if(mOverlay)
     t = std::max(t, mCurrentOverlayTSlice);
-  if(mFusion)
-    t = std::max(t, mCurrentFusionTSlice);
+  //TODO temporarily desactivated...
+  //if(mFusion)
+  //  t = std::max(t, mCurrentFusionTSlice);
   return t;
 }
 //------------------------------------------------------------------------------
@@ -1008,7 +1033,6 @@ void vvSlicer::UpdateDisplayExtent()
       }
     }
   }
-  
 }
 //----------------------------------------------------------------------------
 
index a738a788b192db47fb40859f233b5e31853a8569..793b5f38bba477c6ea96e83ec917af186496a785 100644 (file)
@@ -20,6 +20,9 @@
 #include <iostream>
 #include <vector>
 
+#include <QString> //TODO delete
+#include <QMessageBox>
+
 #include "vvLandmarks.h"
 #include "vvImage.h"
 #include "vvMesh.h"
@@ -98,6 +101,9 @@ public:
 
   void SetLandmarks(vvLandmarks* landmarks);
   void SetTSlice(int t);
+
+  void SetFusionSequenceTSlice(int t);
+
   void SetSliceOrientation(int orientation);
   void AdjustResliceToSliceOrientation(vtkImageReslice *reslice);
   int GetTSlice();
index b175c46ccc642665487641e20c102b2e8c8e5d37..b3cd57e91a380d2e5e5ab0d14a83682e6fec84a2 100644 (file)
@@ -40,7 +40,6 @@
 #include <vtkCamera.h>
 
 #include <qfileinfo.h>
-
 //----------------------------------------------------------------------------
 vvSlicerManager::vvSlicerManager(int numberOfSlicers)
 {
@@ -63,6 +62,10 @@ vvSlicerManager::vvSlicerManager(int numberOfSlicers)
   mFusionLevel = 1000;
   mFusionShowLegend = true;
   
+  mFusionSequenceFrameIndex = -1;
+  mFusionSequenceSpatialSyncFlag = false;
+  mFusionSequenceNbFrames = 0;
+
   mLandmarks = NULL;
   mLinkedId.resize(0);
 
@@ -73,6 +76,8 @@ vvSlicerManager::vvSlicerManager(int numberOfSlicers)
   mPreviousSlice.resize(numberOfSlicers);
   mPreviousTSlice.resize(numberOfSlicers);
   mSlicingPreset = WORLD_SLICING;
+
+  
 }
 //----------------------------------------------------------------------------
 
@@ -139,6 +144,8 @@ std::string vvSlicerManager::GetListOfAbsoluteFilePathInOneString(const std::str
     reader = mFusionReader;
   else if(actorType=="vector")
     reader = mVectorReader;
+  else if(actorType=="fusionSequence")
+       reader = mFusionSequenceReader;
 
   if(!reader)
     return "";
@@ -298,6 +305,54 @@ bool vvSlicerManager::SetFusion(std::string filename,int dim, std::string compon
 }
 //----------------------------------------------------------------------------
 
+//----------------------------------------------------------------------------
+bool vvSlicerManager::SetFusionSequence(std::vector<std::string> filenames,int dim, std::string component, vvImageReader::LoadedImageType type)
+{
+  mFusionName = filenames[0];
+  mFusionComponent = component;
+
+  if (dim > mImage->GetNumberOfDimensions()) {
+    mLastError = " Fusion Sequence dimension cannot be greater than reference image!";
+    return false;
+  }
+
+  if (mFusionSequenceReader.IsNull())
+    mFusionSequenceReader = vvImageReader::New();
+
+  mFusionSequenceReader->SetInputFilenames(filenames);
+  mFusionSequenceReader->Update(type);
+
+  //store the initial transform matrices of each frame, and reset them to identity
+  mFusionSequenceListInitialTransformMatrices.clear();
+  for (unsigned i=0 ; i<mFusionSequenceReader->GetOutput()->GetTransform().size() ; i++) {
+         AddFusionSequenceInitialTransformMatrices( mFusionSequenceReader->GetOutput()->GetTransform()[i]->GetMatrix() );
+         mFusionSequenceReader->GetOutput()->GetTransform()[i]->Identity();
+         mFusionSequenceReader->GetOutput()->GetTransform()[i]->Update();
+  }
+
+  //adjust the time slider in the overlay panel
+  mFusionSequenceNbFrames = mFusionSequenceReader->GetOutput()->GetTransform().size()-1; //actually, this is the maximum index...
+  if (mFusionSequenceFrameIndex>=mFusionSequenceNbFrames) {
+         mFusionSequenceFrameIndex=0;
+  }
+
+
+  if (mFusionSequenceReader->GetLastError().size() == 0) {
+    for ( unsigned int i = 0; i < mSlicers.size(); i++) {
+      mSlicers[i]->SetFusion(mFusionSequenceReader->GetOutput());
+    }
+  } else {
+    mLastError = mFusionSequenceReader->GetLastError();
+    return false;
+  }
+  double *fusRange = mFusionSequenceReader->GetOutput()->GetVTKImages()[0]->GetScalarRange();
+  mFusionLevel = (fusRange[0]+fusRange[1])/2;
+  mFusionWindow = fusRange[1]-fusRange[0];
+
+  return true;
+}
+//----------------------------------------------------------------------------
+
 
 //----------------------------------------------------------------------------
 bool vvSlicerManager::SetVF(std::string filename)
@@ -468,6 +523,17 @@ void vvSlicerManager::SetTSlice(int slice)
 //----------------------------------------------------------------------------
 
 
+//----------------------------------------------------------------------------
+void vvSlicerManager::SetFusionSequenceTSlice(int slice)
+{
+       for ( unsigned int i = 0; i < mSlicers.size(); i++) {
+               mSlicers[i]->SetFusionSequenceTSlice(slice);
+               UpdateTSlice(i);
+       }
+}
+//----------------------------------------------------------------------------
+
+
 //----------------------------------------------------------------------------
 void vvSlicerManager::SetNextTSlice(int originating_slicer)
 {
@@ -810,6 +876,9 @@ void vvSlicerManager::ResetTransformationToIdentity(const std::string actorType)
   else if(actorType == "fusion")
     for(unsigned int i=0; i<this->GetImage()->GetTransform().size(); i++)
       this->GetSlicer(0)->GetFusion()->GetTransform()[i]->Identity();
+  else if(actorType == "fusionSequence") //TODO: Check what should really be done here
+    for(unsigned int i=0; i<this->GetImage()->GetTransform().size(); i++)
+      this->GetSlicer(0)->GetFusion()->GetTransform()[i]->Identity();
   else if(actorType == "vf")
     for(unsigned int i=0; i<this->GetImage()->GetTransform().size(); i++)
       this->GetVF()->GetTransform()[i]->Identity();
@@ -851,6 +920,7 @@ void vvSlicerManager::Reload()
   for ( unsigned int i = 0; i < mSlicers.size(); i++) {
     mSlicers[i]->SetImage(mImage);
   }
+  //TODO: check if this image is involved in a fusion sequence, then the main transform matrix should be updated.
 }
 //----------------------------------------------------------------------------
 
@@ -867,6 +937,33 @@ void vvSlicerManager::ReloadFusion()
 }
 //----------------------------------------------------------------------------
 
+//----------------------------------------------------------------------------
+void vvSlicerManager::ReloadFusionSequence()
+{
+  mFusionSequenceReader->Update(mImage->GetNumberOfDimensions(),mFusionComponent.c_str(),vvImageReader::MERGEDWITHTIME);
+
+  for ( unsigned int i = 0; i < mSlicers.size(); i++) {
+    mSlicers[i]->SetFusion(mFusionSequenceReader->GetOutput());
+    mSlicers[i]->Render();
+  }
+
+  //Update the slider
+  mFusionSequenceNbFrames = mFusionSequenceReader->GetOutput()->GetTransform().size();
+  if (mFusionSequenceFrameIndex>=mFusionSequenceNbFrames) {
+         mFusionSequenceFrameIndex=0;
+  }
+
+  //Update the list of initial transforms
+  //Warning, the main transform will not be updated on reload.........
+  mFusionSequenceListInitialTransformMatrices.clear();
+  for (unsigned i=0 ; i<mFusionSequenceNbFrames ; i++) {
+         this->AddFusionSequenceInitialTransformMatrices( mFusionSequenceReader->GetOutput()->GetTransform()[i]->GetMatrix() );
+  }
+
+  //emit UpdateFusionSequence(mFusionSequenceFrameIndex, mFusionSequenceSpatialSyncFlag, mFusionSequenceNbFrames);
+}
+//----------------------------------------------------------------------------
+
 
 //----------------------------------------------------------------------------
 void vvSlicerManager::ReloadOverlay()
@@ -902,6 +999,10 @@ void vvSlicerManager::RemoveActor(const std::string& actor_type, int overlay_ind
   if (actor_type =="fusion")
     mFusionReader = NULL;
 
+  if (actor_type =="fusionSequence") {
+    mFusionSequenceReader = NULL;
+  }
+
   for (unsigned int i = 0; i < mSlicers.size(); i++)
     mSlicers[i]->RemoveActor(actor_type,overlay_index);
 
@@ -984,14 +1085,17 @@ void vvSlicerManager::UpdateInfoOnCursorPosition(int slicer)
       double Zover = (z - overlay->GetOrigin()[2]) / overlay->GetSpacing()[2];
       valueOver = this->GetScalarComponentAsDouble(overlay, Xover, Yover, Zover);
     }
-    if (mSlicers[slicer]->GetFusionActor() ) {
-      displayFus = 1;
-      vtkImageData *fusion = dynamic_cast<vtkImageData*>(mSlicers[slicer]->GetFusionMapper()->GetInput());
-      double Xover = (x - fusion->GetOrigin()[0]) / fusion->GetSpacing()[0];
-      double Yover = (y - fusion->GetOrigin()[1]) / fusion->GetSpacing()[1];
-      double Zover = (z - fusion->GetOrigin()[2]) / fusion->GetSpacing()[2];
-      valueFus = this->GetScalarComponentAsDouble(fusion, Xover, Yover, Zover);
-    }
+\r
+       if (mSlicers[slicer]->GetFusionActor() ) {\r
+               displayFus = 1;\r
+               vtkImageData *fusion = dynamic_cast<vtkImageData*>(mSlicers[slicer]->GetFusionMapper()->GetInput());\r
+               double Xover = (x - fusion->GetOrigin()[0]) / fusion->GetSpacing()[0];\r
+               double Yover = (y - fusion->GetOrigin()[1]) / fusion->GetSpacing()[1];\r
+               double Zover = (z - fusion->GetOrigin()[2]) / fusion->GetSpacing()[2];\r
+               valueFus = this->GetScalarComponentAsDouble(fusion, Xover, Yover, Zover);\r
+       }\r
+
+
     emit UpdatePosition(mSlicers[slicer]->GetCursorVisibility(),
                         x,y,z,X,Y,Z,value);
     emit UpdateVector(displayVec,xVec, yVec, zVec, valueVec);
@@ -1204,6 +1308,7 @@ void vvSlicerManager::SetLocalColorWindowing(const int slicer, const bool bCtrlK
 void vvSlicerManager::SetColorMap(int colormap)
 {
   double range[2];
+
   range[0] = mSlicers[0]->GetInput()->GetScalarRange()[0];
   range[1] = mSlicers[0]->GetInput()->GetScalarRange()[1];
 
@@ -1261,12 +1366,17 @@ void vvSlicerManager::SetColorMap(int colormap)
   }
   vtkWindowLevelLookupTable* fusLUT = NULL;
   if (mSlicers[0]->GetFusion()) { // && mFusionColorMap >= 0) {
-    fusLUT = vtkWindowLevelLookupTable::New();
+       fusLUT = vtkWindowLevelLookupTable::New();
     double fusRange [2];
     fusRange[0] = mFusionLevel - mFusionWindow/2;
     fusRange[1] = mFusionLevel + mFusionWindow/2;
-    double* frange = mFusionReader->GetOutput()->GetVTKImages()[0]->GetScalarRange();
-    fusLUT->SetTableRange(frange);
+
+       //check whether it is actually a fusionSequence or a fusion, before invoking mFusionReader...
+       double* frange;
+       if (mFusionReader.IsNull()) frange = mFusionSequenceReader->GetOutput()->GetVTKImages()[0]->GetScalarRange();
+    else                        frange = mFusionReader->GetOutput()->GetVTKImages()[0]->GetScalarRange();
+
+       fusLUT->SetTableRange(frange);
     fusLUT->SetValueRange(1,1);
     fusLUT->SetSaturationRange(1,1);
     fusLUT->SetAlphaRange(1, 1);
index 4fc274c5e4723ce460984cc7850de60ea60dbc58..ffaea7822b7938944ad7bc0863b90baf9f211450 100644 (file)
@@ -66,6 +66,7 @@ class vvSlicerManager : public QObject {
 
   bool SetOverlay(std::vector<std::string> filenames, int dim, std::string component, vvImageReader::LoadedImageType type);
   bool SetFusion(std::string filename, int dim, std::string component);
+  bool SetFusionSequence(std::vector<std::string> filenames, int dim, std::string component, vvImageReader::LoadedImageType type);
   ///Set a VF by loading it from the disk
   bool SetVF(std::string filename);
   ///Set a VF from memory
@@ -114,6 +115,8 @@ class vvSlicerManager : public QObject {
   void SetPreviousTSlice(int originating_slicer);
   void SetTSliceInSlicer(int tslice, int slicer);
 
+  void SetFusionSequenceTSlice(int slice);
+
   void GenerateDefaultLookupTable();
   void SetColorWindow(double s);
   void SetColorLevel(double s);
@@ -146,6 +149,30 @@ class vvSlicerManager : public QObject {
     mFusionShowLegend = show;
   }
 
+
+  //set/get fusionSequence related data
+  void SetFusionSequenceFrameIndex(int sequenceFrameIndex) { mFusionSequenceFrameIndex = sequenceFrameIndex; }
+  void SetFusionSequenceSpatialSyncFlag(bool spatialSync) { mFusionSequenceSpatialSyncFlag = spatialSync; }
+  void SetFusionSequenceLength(unsigned int fusionSequenceNbFrames) { mFusionSequenceNbFrames = fusionSequenceNbFrames; }
+  void SetFusionSequenceMainTransformMatrix(vtkSmartPointer<vtkMatrix4x4> mat) { 
+         mFusionSequenceMainTransform = vtkSmartPointer<vtkMatrix4x4>::New();
+         mFusionSequenceMainTransform->DeepCopy(mat);
+  }
+  void AddFusionSequenceInitialTransformMatrices(vtkSmartPointer<vtkMatrix4x4> mat) { 
+               vtkSmartPointer<vtkMatrix4x4> tmpMat = vtkSmartPointer<vtkMatrix4x4>::New();
+               tmpMat->DeepCopy(mat);
+               mFusionSequenceListInitialTransformMatrices.push_back( tmpMat );
+  }
+
+  int GetFusionSequenceFrameIndex() { return mFusionSequenceFrameIndex; }
+  bool GetFusionSequenceSpatialSyncFlag() { return mFusionSequenceSpatialSyncFlag; }
+  unsigned int GetFusionSequenceNbFrames() { return mFusionSequenceNbFrames; }
+  const vtkSmartPointer<vtkMatrix4x4>& GetFusionSequenceMainTransformMatrix() {return mFusionSequenceMainTransform;}
+  const std::vector< vtkSmartPointer<vtkMatrix4x4> >& GetFusionSequenceInitialTransformMatrices() {return mFusionSequenceListInitialTransformMatrices;}
+  const vtkSmartPointer<vtkMatrix4x4>& GetFusionSequenceInitialTransformMatrixAtFrame(unsigned i) {
+         return mFusionSequenceListInitialTransformMatrices[i];
+  }
+
   double GetColorWindow() const;
   double GetColorLevel() const;
   double GetOverlayColorWindow() const;
@@ -179,6 +206,7 @@ class vvSlicerManager : public QObject {
     return mFusionLevel;
   }
 
+
   void SetCursorAndCornerAnnotationVisibility(int s);
   void UpdateViews(int current, int slicer);
   void UpdateLinked(int slicer);
@@ -207,6 +235,7 @@ class vvSlicerManager : public QObject {
   void Reload();
   void ReloadOverlay();
   void ReloadFusion();
+  void ReloadFusionSequence();
   void ReloadVF();
 
   void Activated();
@@ -236,6 +265,7 @@ signals :
   void UpdateVector(int display, double x, double y, double z, double value);
   void UpdateOverlay(int display, double valueOver, double valueRef);
   void UpdateFusion(int display, double valueFus);
+  void UpdateFusionSequence(int fusionSequenceFrameIndex, bool fusionSequenceSpatialSyncFlag, unsigned int fusionSequenceNbFrames);
   void MousePositionUpdatedSignal(int slicer);
   void KeyPressedSignal(std::string KeyPressed);
   void UpdateOrientation(int slicer, int orientation);
@@ -256,6 +286,7 @@ protected:
   vvImageReader::Pointer mReader;
   vvImageReader::Pointer mOverlayReader;
   vvImageReader::Pointer mFusionReader;
+  vvImageReader::Pointer mFusionSequenceReader;
   vvImageReader::Pointer mVectorReader;
   vvImage::Pointer mImage;
   vvImage::Pointer mVF;
@@ -269,6 +300,13 @@ protected:
   double mFusionLevel;
   bool mFusionShowLegend;
 
+  //fusionSequence related data
+  int mFusionSequenceFrameIndex;
+  bool mFusionSequenceSpatialSyncFlag;
+  unsigned int mFusionSequenceNbFrames;
+  vtkSmartPointer<vtkMatrix4x4> mFusionSequenceMainTransform;
+  std::vector< vtkSmartPointer<vtkMatrix4x4> > mFusionSequenceListInitialTransformMatrices;
+  
   int mPreset;
   SlicingPresetType mSlicingPreset;
   vvImageReader::LoadedImageType mType;
index 37d974a38db900711df65315a4578f992fa00f76..fa93d14d7e8085588c11d30aa69d0c139621a2b4 100644 (file)
@@ -19,6 +19,7 @@
 #ifndef VVTOOLBASEBASE_H
 #define VVTOOLBASEBASE_H
 
+#include <algorithm>
 #include "vvMainWindowBase.h"
 #include "vvToolCreatorBase.h"
 class QXmlStreamWriter;