]> Creatis software - clitk.git/commitdiff
Merge branch 'master' of /home/dsarrut/clitk3.server
authorDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Fri, 16 Sep 2011 09:18:50 +0000 (11:18 +0200)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Fri, 16 Sep 2011 09:18:50 +0000 (11:18 +0200)
33 files changed:
itk/itkRayCastInterpolateImageFunctionWithOrigin.txx
registration/clitkAffineRegistrationGenericFilter.cxx
registration/clitkBLUTDIRGenericFilter.cxx
registration/clitkGenericMetric.h
registration/clitkGenericMetric.txx
registration/clitkNormalizedCorrelationImageToImageMetric.h
registration/clitkNormalizedCorrelationImageToImageMetric.txx
registration/clitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h
registration/clitkNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx
registration/clitkOptNormalizedCorrelationImageToImageMetric.h
registration/clitkOptNormalizedCorrelationImageToImageMetric.txx
registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h
registration/clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx
registration/clitkShapedBLUTSpatioTemporalDIRGenericFilter.txx
registration/itkMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h
registration/itkMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx
registration/itkMeanSquaresImageToImageMetricFor3DBLUTFFD.h
registration/itkMeanSquaresImageToImageMetricFor3DBLUTFFD.txx
registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h
registration/itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx
registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h
registration/itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx
tests/tools/CMakeLists.txt
tests/tools/toolTestRunner.cxx
vv/CMakeLists.txt
vv/qt_ui/vvOverlayPanel.ui
vv/vvMainWindowBase.h
vv/vvOverlayPanel.cxx
vv/vvOverlayPanel.h
vv/vvSlicer.cxx
vv/vvSlicerManager.cxx
vv/vvToolBase.h
vv/vvToolWidgetBase.cxx

index e89579e0f7d5500f98958542417c4871dac0249a..ebf73cfc2d363c215b302be2c6cdd66c45bd6802 100644 (file)
@@ -1,4 +1,4 @@
-/*=========================================================================
+/*========================================================================
   Program:   vv                     http://www.creatis.insa-lyon.fr/rio/vv
 
   Authors belong to:
index 0c93f78e624716eb218987557382489769c0eeab..3f0145eca9d10064044db55d8908f4aebc458633 100644 (file)
@@ -176,7 +176,7 @@ void AffineRegistrationGenericFilter::UpdateWithInputImageType()
 //typedef typename InputImageType::ImageDimension Dimension;
 
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
   bool threadsGiven=m_ArgsInfo.threads_given;
   int threads=m_ArgsInfo.threads_arg;
 #endif
@@ -396,7 +396,7 @@ void AffineRegistrationGenericFilter::UpdateWithInputImageType()
   typename  MetricType::Pointer metric=genericMetric->GetMetricPointer();
   if (movingMask) metric->SetMovingImageMask(movingMask);
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
   if (threadsGiven) metric->SetNumberOfThreads( threads );
 #else
   if (m_Verbose) std::cout<<"Not setting the number of threads (not compiled with USE_OPTIMIZED_REGISTRATION_METHODS)..."<<std::endl;
index 39c1d3d53b529d263947edeca5715f2bcc66326c..3f78b4125e4aaf8378f4619b81b4f969767f9f9d 100644 (file)
@@ -387,6 +387,9 @@ namespace clitk
         // Crop the fixedImage to the bounding box to facilitate multi-resolution
         typedef itk::ExtractImageFilter<FixedImageType,FixedImageType> ExtractImageFilterType;
         typename ExtractImageFilterType::Pointer extractImageFilter=ExtractImageFilterType::New();
+#if ITK_VERSION_MAJOR == 4
+        extractImageFilter->SetDirectionCollapseToSubmatrix();
+#endif
         extractImageFilter->SetInput(fixedImage);
         extractImageFilter->SetExtractionRegion(transformRegion);
         extractImageFilter->Update();
@@ -627,7 +630,7 @@ namespace clitk
       typename  MetricType::Pointer metric=genericMetric->GetMetricPointer();
       if (movingMask) metric->SetMovingImageMask(movingMask);
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
       if (threadsGiven) {
         metric->SetNumberOfThreads( threads );
         if (m_Verbose) std::cout<< "Using " << threads << " threads." << std::endl;
index 5f6eb5175bbbdd595894bc3b3a0a275ca3b82e1a..ad03c7144f5611ac493007b2d2242eb2f278798e 100644 (file)
@@ -143,7 +143,7 @@ private:
   typename FixedImageType::Pointer m_FixedImage;
   typename FixedImageMaskType::ConstPointer m_FixedImageMask;
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
   FixedImagePixelType m_FixedImageSamplesIntensityThreshold;
   bool m_UseFixedImageSamplesIntensityThreshold;
 #endif
index e73644c5dc80f496861710400c526a2228ca4579..cbbcaa04a81ed6a02e088a4f364a7f7c0292c36f 100644 (file)
@@ -35,7 +35,7 @@ GenericMetric<args_info_type, FixedImageType, MovingImageType>::GenericMetric()
   m_Maximize=false;
   m_Verbose=false;
   m_FixedImageRegionGiven=false;
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
   m_FixedImageSamplesIntensityThreshold=0;
   m_UseFixedImageSamplesIntensityThreshold=false;
 #endif
@@ -274,7 +274,7 @@ GenericMetric<args_info_type,FixedImageType, MovingImageType>::GetMetricPointer(
   //m_Metric->SetFixedImageRegion(mask_region);
 
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 
   //============================================================================
   // Set the lower intensity threshold
index 053a4976518ddcbc1a123273bdf8908bd0b5b21f..e6b704b39967fa9744e26e12b5fe1211226c164c 100644 (file)
@@ -24,7 +24,7 @@
 // gets integrated into the main directories.
 #include "itkConfigure.h"
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 #include "clitkOptNormalizedCorrelationImageToImageMetric.h"
 #else
 
index d87bd0bed08b28adb8f69bd5595e1b5490c8f183..69aa81fc2a1e282e4ed0e261905cd9c0e7ec0376 100644 (file)
@@ -24,7 +24,7 @@
 // gets integrated into the main directories.
 #include "itkConfigure.h"
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 #include "clitkOptNormalizedCorrelationImageToImageMetric.txx"
 #else
 
index f7a40df8f528d42f1e6b86852055544aceed56eb..7a7d2b18e99d276f76dabf5d08dc61b8a0e109c4 100644 (file)
@@ -24,7 +24,7 @@
 // gets integrated into the main directories.
 #include "itkConfigure.h"
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 #include "clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.h"
 #else
 
index 8aa553fd2bf14aca714bd29ecb56b1a502e1d00d..16ecec4ee09fb9dbe0075ffb11b5d672b2f12cab 100644 (file)
@@ -24,7 +24,7 @@
 // gets integrated into the main directories.
 #include "itkConfigure.h"
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 #include "clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD.txx"
 #else
 
index 6ea6572ff3931414946e8b4cbc34540d8deaa974..83448afee1ea403bda7ba1dbe83553f5272d89c5 100644 (file)
 #ifndef __clitkOptNormalizedCorrelationImageToImageMetric_h
 #define __clitkOptNormalizedCorrelationImageToImageMetric_h
 
-#include "itkOptImageToImageMetric.h"
+#if ITK_VERSION_MAJOR >= 4
+  #include "itkImageToImageMetric.h"
+#else
+  #include "itkOptImageToImageMetric.h"
+#endif
 #include "itkCovariantVector.h"
 #include "itkPoint.h"
 #include "itkIndex.h"
index ea5d9a5d048dfb88824865a53700ef3f8a6e39a0..e8d4c271316e9b735b1657cfec59203a65222fe8 100644 (file)
@@ -381,8 +381,13 @@ NormalizedCorrelationImageToImageMetric<TFixedImage,TMovingImage>
   }
 
   // Jacobian should be evaluated at the unmapped (fixed image) point.
+#if ITK_VERSION_MAJOR >= 4
+  TransformJacobianType jacobian;
+  transform->ComputeJacobianWithRespectToParameters(fixedImagePoint, jacobian);
+#else
   const TransformJacobianType & jacobian = transform
       ->GetJacobian( fixedImagePoint );
+#endif
 
   for(unsigned int par=0; par<this->m_NumberOfParameters; par++) {
     RealType sumF = itk::NumericTraits< RealType >::Zero;
index 69ac6f1ef17049811f6f0a2f061527c0f337002b..65559c2fcbb9d94b705ed7eb5c87c1bc234875df 100644 (file)
 #ifndef __clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD_h
 #define __clitkOptNormalizedCorrelationImageToImageMetricFor3DBLUTFFD_h
 
-#include "itkOptImageToImageMetric.h"
+#if ITK_VERSION_MAJOR >= 4
+  #include "itkImageToImageMetric.h"
+#else
+  #include "itkOptImageToImageMetric.h"
+#endif
 #include "itkCovariantVector.h"
 #include "itkPoint.h"
 #include "itkIndex.h"
index de0366e1d998baadc051fafa9d89051dec7f1947..643b8020f751979f3a6abd5ebf5e4d2cbe2d8fca 100644 (file)
@@ -381,7 +381,12 @@ NormalizedCorrelationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
   }
 
   // Jacobian should be evaluated at the unmapped (fixed image) point.
+#if ITK_VERSION_MAJOR >= 4
+  TransformJacobianType jacobian;
+  transform->ComputeJacobianWithRespectToParameters( fixedImagePoint, jacobian );
+#else
   const TransformJacobianType & jacobian = transform->GetJacobian( fixedImagePoint );
+#endif
 
 //          for(unsigned int par=0; par<this->m_NumberOfParameters; par++)
 //            {
index 963fb7811cbc5f0d24d5298c6478ec01aac4d218..0ef06ab69267e988f01b9821dc44ee6e31485a14 100644 (file)
@@ -623,7 +623,7 @@ namespace clitk
     typename  MetricType::Pointer metric=genericMetric->GetMetricPointer();
     if (movingMask) metric->SetMovingImageMask(movingMask);
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
     if (threadsGiven) metric->SetNumberOfThreads( threads );
 #else
     if (m_Verbose) std::cout<<"Not setting the number of threads (not compiled with USE_OPTIMIZED_REGISTRATION_METHODS)..."<<std::endl;
index 091e36cb57f5eac7a56e58a381475806e97a88e2..c941b05d37e366de82e192eead7dfc4ccc323963 100644 (file)
@@ -40,7 +40,7 @@
 // gets integrated into the main directories.
 #include "itkConfigure.h"
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 #include "itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.h"
 #else
 
index 7e50dc9cdd7a452ca3dc6f5d148668362d202bc6..9391dc23898a7045fec8c1c55475695c9399dc6e 100644 (file)
@@ -41,7 +41,7 @@
 // gets integrated into the main directories.
 #include "itkConfigure.h"
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 #include "itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD.txx"
 #else
 
index e2cfdbddb0ec65e444185cc0025806b72dc51760..f6d745dec64d4cc96ec18440f34d7649026ffc06 100644 (file)
@@ -40,7 +40,7 @@
 // gets integrated into the main directories.
 #include "itkConfigure.h"
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 #include "itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.h"
 #else
 
index 89343e922e86b9f3940bb0be4a91fe9152cc698f..d6793e58e18fe1a9106f3ad3b4633058266462f3 100644 (file)
@@ -40,7 +40,7 @@
 // gets integrated into the main directories.
 #include "itkConfigure.h"
 
-#ifdef ITK_USE_OPTIMIZED_REGISTRATION_METHODS
+#if defined(ITK_USE_OPTIMIZED_REGISTRATION_METHODS) || ITK_VERSION_MAJOR >= 4
 #include "itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD.txx"
 #else
 
index d29260a2988ee865283ba82f1121cd32482fb91f..7cfe51e203aa30af2ef6c6c65c8bc2a3e03369e6 100644 (file)
 #ifndef __itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD_h
 #define __itkOptMattesMutualInformationImageToImageMetricFor3DBLUTFFD_h
 
-#include "itkOptImageToImageMetric.h"
+#if ITK_VERSION_MAJOR >= 4
+  #include "itkImageToImageMetric.h"
+#else
+  #include "itkOptImageToImageMetric.h"
+#endif
 #include "itkCovariantVector.h"
 #include "itkPoint.h"
 #include "itkIndex.h"
index 724f2bfd4c5d19bc57146e0954316ef1639bb0fc..9099ca46fb72876dc3e4a120f71d65ed6ea2e82c 100644 (file)
@@ -1152,8 +1152,13 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
       transform = this->m_Transform;
     }
 
+#if ITK_VERSION_MAJOR >= 4
+    JacobianType jacobian;
+    transform->ComputeJacobianWithRespectToParameters(this->m_FixedImageSamples[sampleNumber].point, jacobian);
+#else
     const JacobianType& jacobian =
       transform->GetJacobian( this->m_FixedImageSamples[sampleNumber].point );
+#endif
 
     //     for ( unsigned int mu = 0; mu < this->m_NumberOfParameters; mu++ )
     //       {
@@ -1221,9 +1226,15 @@ MattesMutualInformationImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
         indicesHelper = &(this->m_BSplineTransformIndices);
       }
 
+#if ITK_VERSION_MAJOR >= 4
+      this->m_BSplineTransform->ComputeJacobianFromBSplineWeightsWithRespectToPosition(
+        this->m_FixedImageSamples[sampleNumber].point,
+        *weightsHelper, *indicesHelper );
+#else
       this->m_BSplineTransform->GetJacobian(
         this->m_FixedImageSamples[sampleNumber].point,
         *weightsHelper, *indicesHelper );
+#endif
     }
 
     for( unsigned int dim = 0; dim < Superclass::FixedImageDimension; dim++ ) {
index 4e8208537db3dc720c70d11d07a639c257a6b7ca..acb0b1b3aa4065be0e402fda51a3ecc0dabea788 100644 (file)
 #ifndef __itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD_h
 #define __itkOptMeanSquaresImageToImageMetricFor3DBLUTFFD_h
 
-#include "itkOptImageToImageMetric.h"
+#if ITK_VERSION_MAJOR >= 4
+  #include "itkImageToImageMetric.h"
+#else
+  #include "itkOptImageToImageMetric.h"
+#endif
 #include "itkCovariantVector.h"
 #include "itkPoint.h"
 #include "itkIndex.h"
index dcc98f6bdb07bb797180306bee54974dd9a6fd47..feaeaaff1f0370ad233ac40c18e79daccbe3c1f2 100644 (file)
@@ -213,7 +213,12 @@ MeanSquaresImageToImageMetricFor3DBLUTFFD<TFixedImage,TMovingImage>
   }
 
   // Jacobian should be evaluated at the unmapped (fixed image) point.
+#if ITK_VERSION_MAJOR >= 4
+  TransformJacobianType jacobian;
+  transform->ComputeJacobianWithRespectToParameters(this->m_FixedImageSamples[fixedImageSample].point, jacobian);
+#else
   const TransformJacobianType & jacobian = transform ->GetJacobian( this->m_FixedImageSamples[fixedImageSample].point );
+#endif
   //double sum;
   unsigned int par, dim;
   for( par=0; par<this->m_NumberOfParameters; par+=3) {
index 3d5e87f63900a6220e18e2f8eaa380113fada321..9ceb93c30a23be861c6d366b791ee5f26456ef43 100644 (file)
@@ -19,7 +19,6 @@ ADD_EXECUTABLE(toolTestRunner ${srcs})
 TARGET_LINK_LIBRARIES(toolTestRunner vvLib ${vvExternalLibs})
 SET(exe ${EXECUTABLE_OUTPUT_PATH}/toolTestRunner) 
 SET(p ${CLITK_TEST_DATA_PATH})
-SET(tmpFile "feve51zd")
 #=========================================================
 # clitkImageInfo
 ADD_TEST(clitkImageInfo_4d    ${exe} clitkImageInfo ${p}Deformation4D.mhd ${p}Deformation4D_ref.info)
@@ -45,6 +44,6 @@ ADD_TEST(clitkGetDirection_3d ${exe} clitkGetDirection -i ${p}Lung3D.mhd      ${p}Lu
 ADD_TEST(clitkBinarizeBGl0.1356_4d ${exe} clitkBinarizeImage -i ${p}Deformation4D.mhd --mode BG -l 0.1356 -o Deformation4D_ref.binarizeBGl0.1356.mhd ${p}Deformation4D_ref.binarizeBGl0.1356)
 ADD_TEST(clitkBinarizeFGl0.1556_3d ${exe} clitkBinarizeImage -i ${p}Lung3D.mhd        --mode FG -l 0.1556 -o Lung3D_ref.binarizeFGl0.1556.mhd ${p}Lung3D_ref.binarizeFGl0.1556)
 
-UNSET(tmpFile)
 UNSET(exe)
-UNSET(p)
\ No newline at end of file
+UNSET(p)
+
index 42226b781d9634bc1919c97d16391b3bd0da49e5..8a49c43e1cedb0561fe41068877fa7b7d23ecd6f 100644 (file)
@@ -57,6 +57,27 @@ void assertFalse(int fail, const std::string &message=""){
     exit(1);
   }
 }
+
+#ifdef _WIN32
+void dosToUnixFile(std::string dosFile, std::string unixedFile){
+               
+       std::ifstream ifile(dosFile.c_str(),std::ios::binary);
+       ifile.seekg(0,std::ios_base::end);
+       long s=ifile.tellg();
+       char *buffer=new char[s];
+       ifile.seekg(0);
+       ifile.read(buffer,s);
+       ifile.close();
+       std::string txt(buffer,s);
+       delete[] buffer;
+       size_t off=0;
+       while ((off=txt.find("\r\n",off))!=std::string::npos)
+               txt.replace(off,sizeof("\r\n")-1,"\n");
+       std::ofstream ofile(unixedFile.c_str());
+       ofile.write(txt.c_str(),txt.size());
+       
+}
+#endif
 /**
  * argv
  * [1] executable
@@ -91,15 +112,23 @@ int main(int argc, char** argv){
   //run the command line
   system(cmd_line.str().c_str());
   
-  //compare source files
-  assertFalse((itksys::SystemTools::FilesDiffer(outFile.c_str(), refFile)), "Source Files are different");
   
-  //eventually raw files associated
-  //should be passed as a boolean to check also for raw or not
+       //compare source files
+#ifdef _WIN32
+       std::string unixedOutFile= getTmpFileName();
+       //replace \r\n
+       dosToUnixFile(outFile, unixedOutFile);
+       assertFalse((itksys::SystemTools::FilesDiffer(unixedOutFile.c_str(), refFile)), "Generated mhd file != ref File");
+  remove(unixedOutFile.c_str());
+#else
+  assertFalse((itksys::SystemTools::FilesDiffer(outFile.c_str(), refFile)), "Generated mhd file != ref File");
+#endif
   
+       
+       //eventually raw files associated
+  //should be passed as a boolean to check also for raw or not
   std::string refRawFile = std::string(refFile)+".raw";
-  
-  
+   
   int found=outFile.find_last_of(".");
   std::string rawFile = outFile.substr(0, found)+".raw";
   if((itksys::SystemTools::FileExists(refRawFile.c_str(), true))){
@@ -117,3 +146,5 @@ int main(int argc, char** argv){
   //success
   return 0;
 }
+
+
index 3198e7edbbf147c6e44d2b055b3ff872c5d6e8eb..ec1529e310227620d5390e5aba827a9690530242 100644 (file)
@@ -19,7 +19,7 @@ SET(vv_TOOLS
   vvToolResample
 #   vvToolExtractPatient
 #  vvToolExtractLung
-  vvToolStructureSetManager
+#vvToolStructureSetManager
   vvToolMIP
   vvToolConvert ## with dummy vvToolConvert.ui
   
@@ -93,7 +93,7 @@ SET(vv_SRCS
   vvThreadedFilter.cxx
   vvImageContour.cxx
   vvBinaryImageOverlayActor.cxx
-  vvStructureSetActor.cxx
+  #vvStructureSetActor.cxx
   vvROIActor.cxx
   vvBlendImageActor.cxx
   vvToolManager.cxx
@@ -112,7 +112,7 @@ QT4_WRAP_CPP(vv_SRCS
   vvQDicomSeriesSelector.h 
   vvSlicerManager.h
   vvThreadedFilter.h
-  vvStructureSetActor.h
+  #vvStructureSetActor.h
   vvROIActor.h
   vvToolCreatorBase.h
   )
index eab2f23388823d0fc8e12a961cedc9d01dd2d8f8..ef00277a607422d80eada75b340040ef3b86c5ed 100644 (file)
@@ -6,7 +6,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>342</width>
+    <width>344</width>
     <height>480</height>
    </rect>
   </property>
@@ -405,7 +405,7 @@ p, li { white-space: pre-wrap; }
      <property name="frameShadow">
       <enum>QFrame::Raised</enum>
      </property>
-     <layout class="QGridLayout" name="fusionGridLayout">
+     <layout class="QGridLayout" name="gridLayout">
       <item row="0" column="0">
        <widget class="QLabel" name="label_5">
         <property name="maximumSize">
@@ -422,7 +422,7 @@ p, li { white-space: pre-wrap; }
         </property>
        </widget>
       </item>
-      <item row="0" column="1" colspan="2">
+      <item row="0" column="1">
        <widget class="QLabel" name="dataFusionnedLabel">
         <property name="sizePolicy">
          <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@@ -435,7 +435,7 @@ p, li { white-space: pre-wrap; }
         </property>
        </widget>
       </item>
-      <item row="1" column="0" colspan="3">
+      <item row="1" column="0" colspan="2">
        <widget class="QLabel" name="opacityLabel">
         <property name="text">
          <string>Global Opacity :</string>
@@ -455,6 +455,25 @@ p, li { white-space: pre-wrap; }
         </property>
        </widget>
       </item>
+      <item row="1" column="6">
+       <widget class="QDoubleSpinBox" name="fusionOpacitySpin">
+        <property name="decimals">
+         <number>2</number>
+        </property>
+        <property name="minimum">
+         <double>0.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>100.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>100.000000000000000</double>
+        </property>
+       </widget>
+      </item>
       <item row="2" column="0" colspan="3">
        <widget class="QLabel" name="thresOpacityLabel">
         <property name="toolTip">
@@ -484,6 +503,25 @@ p, li { white-space: pre-wrap; }
         </property>
        </widget>
       </item>
+      <item row="2" column="6">
+       <widget class="QDoubleSpinBox" name="fusionThresSpin">
+        <property name="decimals">
+         <number>2</number>
+        </property>
+        <property name="minimum">
+         <double>0.000000000000000</double>
+        </property>
+        <property name="maximum">
+         <double>100.000000000000000</double>
+        </property>
+        <property name="singleStep">
+         <double>1.000000000000000</double>
+        </property>
+        <property name="value">
+         <double>0.000000000000000</double>
+        </property>
+       </widget>
+      </item>
       <item row="3" column="0" colspan="2">
        <widget class="QLabel" name="label_6">
         <property name="sizePolicy">
@@ -562,7 +600,7 @@ p, li { white-space: pre-wrap; }
         </property>
        </widget>
       </item>
-      <item row="4" column="5">
+      <item row="4" column="5" colspan="2">
        <widget class="QDoubleSpinBox" name="fusionLevelSpinBox">
         <property name="decimals">
          <number>4</number>
@@ -614,7 +652,6 @@ p, li { white-space: pre-wrap; }
  </widget>
  <resources>
   <include location="../vvIcons.qrc"/>
-  <include location="vvIcons.qrc"/>
  </resources>
  <connections/>
 </ui>
index 9aaf79c64e6749dcd03702deb96789844c7ff343..3b99565378d3604704b25c072aec0dfe850aa1ce 100644 (file)
@@ -25,6 +25,7 @@
 
 class vvSlicerManager;
 class QMenu;
+class QTabWidget;
 
 //------------------------------------------------------------------------------
 class vvMainWindowBase : public QMainWindow
index eb2eaa1c7b2d27950d27551ea8943884fb366f8d..4d2bcf246901af90bb55d2eb413646695a87a687 100644 (file)
@@ -49,6 +49,8 @@ vvOverlayPanel::vvOverlayPanel(QWidget * parent):QWidget(parent)
   connect(fusionColorMapComboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(setFusionProperty()));
   connect(fusionWindowSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setFusionProperty()));
   connect(fusionLevelSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setFusionProperty()));
+  connect(fusionOpacitySpin,SIGNAL(valueChanged(double)),this,SLOT(setFusionSpinProperty()));
+  connect(fusionThresSpin,SIGNAL(valueChanged(double)),this,SLOT(setFusionSpinProperty()));
   connect(overlayWindowSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setOverlayProperty()));
   connect(overlayLevelSpinBox,SIGNAL(valueChanged(double)),this,SLOT(setOverlayProperty()));
   connect(overlayLinkCheckBox,SIGNAL(stateChanged(int)),this,SLOT(setOverlayProperty()));
@@ -217,10 +219,19 @@ void vvOverlayPanel::setFusionProperty()
   if (disableFusionSignals)
     return;
   
+  fusionOpacitySpin->setValue(opacityHorizontalSlider->value()); 
+  fusionThresSpin->setValue(thresOpacityHorizontalSlider->value());
+
   emit FusionPropertyUpdated(opacityHorizontalSlider->value(), thresOpacityHorizontalSlider->value(), fusionColorMapComboBox->currentIndex(),
                              fusionWindowSpinBox->value(), fusionLevelSpinBox->value());
 }
 
+void vvOverlayPanel::setFusionSpinProperty()
+{
+  opacityHorizontalSlider->setValue(fusionOpacitySpin->value()); 
+  thresOpacityHorizontalSlider->setValue(fusionThresSpin->value());
+}
+
 void vvOverlayPanel::getCurrentFusionInfo(int visibility,double value)
 {
   QString fusionValue = "<b>Pixel value in image 2 : </b>";
index 63bad7bc633c3461ad19d39e1b3b5f51ab2342b5..4a89a1f8f6f0f2587474ffdb1ad891aa13140649 100644 (file)
@@ -52,6 +52,7 @@ public slots:
     void setVFProperty();
     void setOverlayProperty();
     void setFusionProperty();
+    void setFusionSpinProperty();
     void VFColorChangeRequest();
 
 signals:
index 8141ccd5729d479ce39405f4266c04c0c5f00cd6..92cb2686d25cdb543f188a7112c101220c9712d2 100644 (file)
@@ -1108,7 +1108,7 @@ void vvSlicer::SetColorWindow(double window)
   vtkLookupTable* LUT = static_cast<vtkLookupTable*>(this->GetWindowLevel()->GetLookupTable());
   if ( LUT ) {
     double level = this->GetWindowLevel()->GetLevel();
-    LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4);
+    LUT->SetTableRange(level-fabs(window)/2,level+fabs(window)/2);
     LUT->Build();
   }
   this->vtkImageViewer2::SetColorWindow(window);
@@ -1121,7 +1121,7 @@ void vvSlicer::SetColorLevel(double level)
   vtkLookupTable* LUT = static_cast<vtkLookupTable*>(this->GetWindowLevel()->GetLookupTable());
   if ( LUT ) {
     double window = this->GetWindowLevel()->GetWindow();
-    LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4);
+    LUT->SetTableRange(level-fabs(window)/2,level+fabs(window)/2);
     LUT->Build();
   }
   this->vtkImageViewer2::SetColorLevel(level);
index c38496e5ab50b2389311eb4788f8f8ee428a0178..853d4c0b711bdb9f21095e621116c5f7568af673 100644 (file)
@@ -1198,7 +1198,7 @@ void vvSlicerManager::SetColorMap(int colormap)
     break;
   }
   if (LUT) {
-    LUT->SetTableRange(level-fabs(window)/4,level+fabs(window)/4);
+    LUT->SetTableRange(level-fabs(window)/2,level+fabs(window)/2);
     LUT->Build();
   }
   vtkWindowLevelLookupTable* fusLUT = NULL;
index c636a8dd5d4e0e69bed59f8170c202dd49423c68..3cd4fbfd2acc55b466b98d435c5db46b0ee0715a 100644 (file)
@@ -21,6 +21,7 @@
 
 #include "vvToolBaseBase.h"
 #include "vvToolCreator.h"
+#include <QIcon>
 
 //------------------------------------------------------------------------------
 template<class ToolType>
index d3cecbdc5de0926447e076452505c5933b1e85b1..c780768e9c86e3502cf7ade0edb86f902806db51 100644 (file)
@@ -25,6 +25,7 @@
 #include <QMessageBox>
 #include <QKeyEvent>
 #include <QDockWidget>
+#include <QTabWidget>
 
 //------------------------------------------------------------------------------
 // Static initialisation