From: geay Date: Mon, 28 Apr 2014 16:46:19 +0000 (+0200) Subject: writeVTK for image grid X-Git-Tag: V7_4_0rc1~14 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e4d9a407d7804f9e0c023b7a9dcf044d3c99a3f3;p=modules%2Fmed.git writeVTK for image grid --- 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";