]> Creatis software - bbtk.git/blobdiff - packages/itk/src/bbitkImageProperties.cxx
Merge branch 'master' of ssh://git.creatis.insa-lyon.fr/bbtk
[bbtk.git] / packages / itk / src / bbitkImageProperties.cxx
index 8004f5c087e3e01f73baa2417314eb9d14094707..7e5f47dbd62272fd195bd9c26da125fb560b9abe 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<double> vsp;