]> Creatis software - clitk.git/commitdiff
Merge branch 'master' of git.creatis.insa-lyon.fr:clitk
authorDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Fri, 10 Mar 2017 09:32:46 +0000 (10:32 +0100)
committerDavid Sarrut <david.sarrut@creatis.insa-lyon.fr>
Fri, 10 Mar 2017 09:32:46 +0000 (10:32 +0100)
cmake/dependencies.cmake
common/clitkMemoryUsage.cxx
common/vvImage.cxx
vv/qt_ui/vvInfoPanel.ui
vv/vvMainWindow.cxx
vv/vvSlicer.cxx

index bdd63163dd9f99822bef2e5d4743d0817d840f3e..a871fecd0d19523b2fa28823856adcf5637c32ed 100644 (file)
@@ -44,15 +44,15 @@ find_package(Gengetopt)
 
 #=========================================================
 # Find libstatgrab is installed, add clitkMemoryUsage.cxx in the library
-#if(NOT DEFINED CLITK_MEMORY_INFO OR CLITK_MEMORY_INFO)
-#  find_library(LIBSTATGRAB NAMES statgrab PATHS)
-#  if(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+if(NOT DEFINED CLITK_MEMORY_INFO OR CLITK_MEMORY_INFO)
+  find_library(LIBSTATGRAB NAMES statgrab PATHS)
+  if(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
 #  message("Install libstatgrab (http://www.i-scream.org/libstatgrab/) for memory usage information")
     set(CLITK_MEMORY_INFO OFF)
-#  else(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
-#    set(CLITK_MEMORY_INFO ON)
-#  endif(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
-#endif()
+  else(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+    set(CLITK_MEMORY_INFO ON)
+  endif(${LIBSTATGRAB} MATCHES "LIBSTATGRAB-NOTFOUND")
+endif()
 #=========================================================
 
 
index e2a095dab5e080dae4e058b2517be8233c450a45..c95c2859b925e7f7dfa24575e4b53d28d88f53b6 100644 (file)
@@ -49,7 +49,7 @@ double clitk::GetMemoryUsageInMb()
   // Search the current pid in the list of processes
   while (stat[i].pid != getpid()) i++;
   // Display total memory size 
-  double mem = stat[i].proc_resident/1024/1024; // in Mb
+  double mem = stat[i].proc_resident/1000/1000; // in MB
   return mem;
 #else
   return 0.0;
index 47a0e3464bd1d6e995b8a3103bab742566a5459b..c7e13cc60b12fe9b98193efb232c8b1792802371 100644 (file)
@@ -196,7 +196,7 @@ unsigned long vvImage::GetActualMemorySize()
 {
   unsigned long size = 0;
   for (unsigned int i = 0; i < mVtkImages.size(); i++) {
-    size += mVtkImages[i]->GetActualMemorySize();
+    size += mVtkImages[i]->GetActualMemorySize()*1024;
   }
   return size;
 }
index b0b8d39d879bbff1b9faed78be1c21baaf00dfdb..8eb2d87606b2a1142619fd3be4a39180559d3141 100644 (file)
@@ -401,13 +401,6 @@ p, li { white-space: pre-wrap; }
            <verstretch>0</verstretch>
           </sizepolicy>
          </property>
-         <property name="toolTip">
-          <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
-&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
-p, li { white-space: pre-wrap; }
-&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;in mebibytes (2&lt;span style=&quot; vertical-align:super;&quot;&gt;20&lt;/span&gt; bytes, not 10&lt;span style=&quot; vertical-align:super;&quot;&gt;6&lt;/span&gt;)&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
-         </property>
          <property name="text">
           <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
index a3d2000cbd9da993edcd9adccbd3b1130eaf9358..aa10ded56d9944dcb11d86c8f39085e3bf95f96e 100644 (file)
@@ -416,7 +416,7 @@ void vvMainWindow::UpdateMemoryUsage()
 { 
   //  clitk::PrintMemory(true);
   if (clitk::GetMemoryUsageInMb() == 0) infoPanel->setMemoryInMb("NA");
-  else infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" MiB");
+  else infoPanel->setMemoryInMb(QString::number(clitk::GetMemoryUsageInMb())+" MB");
 }
 //------------------------------------------------------------------------------
 
@@ -1173,7 +1173,7 @@ void vvMainWindow::ImageInfoChanged()
       sizeMM[i] = inputSize[i]*inputSpacing[i];
       NPixel *= inputSize[i];
     }
-    inputSizeInBytes = GetSizeInBytes(imageSelected->GetActualMemorySize()*1000);
+    inputSizeInBytes = GetSizeInBytes(imageSelected->GetActualMemorySize());
 
     QString dim = QString::number(dimension) + " (";
     dim += pixelType + ")";
@@ -1374,15 +1374,15 @@ QString vvMainWindow::GetSizeInBytes(unsigned long size)
   if (size > 1000000000) {
     size /= 1000000000;
     result += QString::number(size);
-    result += "Gb";//)";
+    result += "GB";//)";
   } else if (size > 1000000) {
     size /= 1000000;
     result += QString::number(size);
-    result += "Mb";//)";
+    result += "MB";//)";
   } else if (size > 1000) {
     size /= 1000;
     result += QString::number(size);
-    result += "kb";//)";
+    result += "kB";//)";
   }
   return result;
 }
index 46139cd75fa1b6d7bb3a3b66a0d873d25ee6cdbf..9a19cdf330ce9dda2ca9fa878112cdb9e5c7133c 100644 (file)
@@ -393,7 +393,7 @@ void vvSlicer::SetImage(vvImage::Pointer image)
     mImageReslice->GetOutput()->SetUpdateExtent(extent);
     mImageReslice->GetOutput()->Update();
 #else
-    //mImageReslice->SetUpdateExtent(extent);
+    mImageReslice->SetUpdateExtent(extent);
     mImageReslice->Update();
 #endif