]> Creatis software - bbtk.git/blobdiff - packages/itk/src/bbitkImageProperties.cxx
Issue #1967 fixed
[bbtk.git] / packages / itk / src / bbitkImageProperties.cxx
index 458531f91ed39e83a063441cf44a87c2732d8bf6..2304ba8d3168087d4e1d40b8529a768a1fefda3a 100644 (file)
@@ -104,6 +104,17 @@ namespace bbitk
    if (dim==2)
         vsz.push_back(1);
     bbSetOutputSize(vsz);
+    
+    const typename itkImageType::PointType& orgn = im->GetOrigin();
+    std::vector<float> vog;
+    for (unsigned int i=0;i<dim;++i) 
+       vog.push_back(orgn[i]);
+       
+ // brute hack to avoid failure of most black boxes that expects 3D images. // EC
+    if (dim==2)
+       vog.push_back(1.0);
+  
+    bbSetOutputOrigin(vog);
 
     typename itkImageType::SpacingType sp = im->GetSpacing();
     std::vector<float> vsp;