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;
+ 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)