From: geay Date: Mon, 28 Apr 2014 16:46:19 +0000 (+0200) Subject: writeVTK for image grid X-Git-Tag: V7_4_0rc1~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;ds=sidebyside;h=f05ca501ce4e94494fc648243ca3d4a280caea30;hp=-c;p=tools%2Fmedcoupling.git writeVTK for image grid --- f05ca501ce4e94494fc648243ca3d4a280caea30 diff --git a/src/MEDCoupling/MEDCouplingIMesh.cxx b/src/MEDCoupling/MEDCouplingIMesh.cxx index 6ef737b8e..43dd40d2c 100644 --- a/src/MEDCoupling/MEDCouplingIMesh.cxx +++ b/src/MEDCoupling/MEDCouplingIMesh.cxx @@ -670,15 +670,15 @@ void MEDCouplingIMesh::unserialization(const std::vector& tinyInfoD, con void MEDCouplingIMesh::writeVTKLL(std::ostream& ofs, const std::string& cellData, const std::string& pointData, DataArrayByte *byteData) const { checkCoherency(); - std::ostringstream extent; + std::ostringstream extent,origin,spacing; for(int i=0;i<3;i++) { if(i<_space_dim) - { extent << "0 " << _structure[i]-1 << " "; } + { extent << "0 " << _structure[i]-1 << " "; origin << _origin[i] << " "; spacing << _dxyz[i] << " "; } else - { extent << "0 0 "; } + { extent << "0 0 "; origin << "0 "; spacing << "0 "; } } - ofs << " <" << getVTKDataSetType() << " WholeExtent=\"" << extent.str() << "\">\n"; + ofs << " <" << getVTKDataSetType() << " WholeExtent=\"" << extent.str() << "\" Origin=\"" << origin.str() << "\" Spacing=\"" << spacing.str() << "\">\n"; ofs << " \n"; ofs << " \n" << pointData << std::endl; ofs << " \n";