]> Creatis software - bbtk.git/blobdiff - packages/itk/src/bbitkImageProperties.cxx
#3497 Bug in std VectorFilterString
[bbtk.git] / packages / itk / src / bbitkImageProperties.cxx
index 2304ba8d3168087d4e1d40b8529a768a1fefda3a..d2f8890faafc347cdaee1b8d20a66f61b87fa467 100644 (file)
@@ -83,12 +83,11 @@ namespace bbitk
 
     itkImageType* im = bbGetInputIn().get<itkImageType*>();
     unsigned int dim = im->GetImageDimension();
-
     bbSetOutputTypeName(bbtk::TypeName<typename itkImageType::PixelType>());
     bbSetOutputDimension(dim);
     const typename itkImageType::RegionType& r =im->GetLargestPossibleRegion();
     bbSetOutputLargestPossibleRegion(r);
-
+      
     const typename itkImageType::IndexType& ind = r.GetIndex();
     std::vector<int> vind;
     for (unsigned int i=0;i<dim;++i) 
@@ -99,7 +98,7 @@ namespace bbitk
     std::vector<int> vsz;
     for (unsigned int i=0;i<dim;++i) 
        vsz.push_back(sz[i]);
-    
+
   // brute hack to avoid failure of most black boxes that expects 3D images. // JPR
    if (dim==2)
         vsz.push_back(1);
@@ -117,9 +116,9 @@ namespace bbitk
     bbSetOutputOrigin(vog);
 
     typename itkImageType::SpacingType sp = im->GetSpacing();
-    std::vector<float> vsp;
+    std::vector<double> vsp;
     for (unsigned int i=0;i<dim;++i) 
-       vsp.push_back(sp[i]);
+       vsp.push_back(double(sp[i]));
        
  // brute hack to avoid failure of most black boxes that expects 3D images. // JPR
     if (dim==2)
@@ -137,10 +136,11 @@ namespace bbitk
          vminmax.push_back( (float) (minMaxCalculator->GetMinimum()) );
          vminmax.push_back( (float) (minMaxCalculator->GetMaximum()) );          
          bbSetOutputMinMax(vminmax);
-         
-    bbtkDebugDecTab("Core",9);
+
+      bbtkDebugDecTab("Core",9);
   }
-}
-// eo namespace bbtk
+
+
+} // eo namespace bbtk
 
 #endif