]> Creatis software - clitk.git/commitdiff
Windows compilation
authorSimon Rit <simon.rit@gmail.com>
Thu, 15 Mar 2018 09:14:26 +0000 (10:14 +0100)
committerSimon Rit <simon.rit@gmail.com>
Thu, 15 Mar 2018 09:14:26 +0000 (10:14 +0100)
Remove error due to M_PI
Remove error due to and
Remove warning due to unused variables

common/clitkCommon.cxx
common/clitkDicomRT_Contour.cxx
tools/clitkBinarizeImageGenericFilter.cxx
tools/clitkMaskOfIntegratedIntensityGenericFilter.txx

index af462a481173b96646efe832bab7fc311153a7df..c71bd5078fbf5598e7982eb81287204c1c26c694 100644 (file)
 
 #include <itksys/SystemTools.hxx>
 
-#ifndef _WIN32
+#ifdef _WIN32
   #define _USE_MATH_DEFINES
   #include <cmath>
+  const double M_PI = std::acos(-1.0);
 #endif
 
 // clitk include 
index 4bd4598316a77fb1788851bade1cf883b44d3146..bcff817af994ab2fd80b27acf8b4d567e6f5b393 100644 (file)
@@ -271,11 +271,12 @@ void clitk::DicomRT_Contour::ComputeMeshFromDataPoints()
   mMesh->SetPoints(mPoints);
   vtkIdType ids[2];
   for (unsigned int idx=0 ; idx<mNbOfPoints ; idx++) {
-    double pointIn[4], pointOut[4];
+    double pointIn[4];
     for (unsigned int j=0 ; j<3; ++j)
       pointIn[j] = mData->GetPoint(idx)[j];
     pointIn[4] = 1.0;
-    /*mTransformMatrix->MultiplyPoint(pointIn, pointOut);
+    /*double pointOut[4];
+    mTransformMatrix->MultiplyPoint(pointIn, pointOut);
     std::cout << pointOut[0] << " " << pointOut[1] << " " << pointOut[2] << " " << pointOut[3] << std::endl;
     mMesh->GetPoints()->InsertNextPoint(pointOut[0],
                                         pointOut[1],
index 6affce00b4fb59bf535e06288b0cfd005e906d81..f94cf1a09206c0404fc2ba004a2195638b9b1cec 100644 (file)
@@ -214,7 +214,7 @@ BinarizeImageGenericFilter::MaskOfIntegratedIntensity()
   int n = input->GetLargestPossibleRegion().GetNumberOfPixels();
   std::vector<int> should_keep(values.size());;
   std::fill(should_keep.begin(), should_keep.end(), 0);
-  while (current<max and i<n) { // loop by decreasing pixel values
+  while (current<max && i<n) { // loop by decreasing pixel values
     current += values[indices[i]];
     should_keep[indices[i]] = 1.0;
     ++i;
index c6e2cc9a5b087682642ec054303e77c434a1f991..f80dc9910408a7378e18e2642837f2666a8cf27a 100644 (file)
@@ -137,7 +137,7 @@ namespace clitk
     int n = input->GetLargestPossibleRegion().GetNumberOfPixels();
     std::vector<int> should_keep(values.size());;
     std::fill(should_keep.begin(), should_keep.end(), 0);
-    while (current<max and i<n) { // loop by decreasing pixel values
+    while (current<max && i<n) { // loop by decreasing pixel values
       current += values[indices[i]];
       should_keep[indices[i]] = 1.0;
       ++i;