From e4d9a407d7804f9e0c023b7a9dcf044d3c99a3f3 Mon Sep 17 00:00:00 2001 From: geay Date: Mon, 28 Apr 2014 18:46:19 +0200 Subject: [PATCH] writeVTK for image grid --- src/MEDCoupling/MEDCouplingIMesh.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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"; -- 2.39.2