From: Eduardo DAVILA Date: Wed, 21 Oct 2015 13:50:12 +0000 (+0200) Subject: #2711 creaVtk Feature New Normal - new Box ReadMHDPlane X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=8ae7e0ddb2938899b2bd062ca42db0124699d912;p=creaVtk.git #2711 creaVtk Feature New Normal - new Box ReadMHDPlane --- diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx index c5c2dcd..42f6292 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx @@ -58,9 +58,13 @@ void ReadMHDPlane::Process() newHeaderSize = sx*sy*bbGetInputSlice(); if (bbGetInputSlice()>=sz) {ok=false;} } // if + if (strncmp("ElementType = MET_CHAR",mystring,24)==0) { newHeaderSize=newHeaderSize*1; } + if (strncmp("ElementType = MET_UCHAR",mystring,24)==0) { newHeaderSize=newHeaderSize*1; } if (strncmp("ElementType = MET_USHORT",mystring,24)==0) { newHeaderSize=newHeaderSize*2; } - if (strncmp("ElementType = MET_SHORT",mystring,23)==0) { newHeaderSize=newHeaderSize*2; } - if (strncmp("ElementType = MET_FLOAT",mystring,23)==0) { newHeaderSize=newHeaderSize*2; } + if (strncmp("ElementType = MET_USHORT",mystring,24)==0) { newHeaderSize=newHeaderSize*2; } + if (strncmp("ElementType = MET_SHORT",mystring,23)==0) { newHeaderSize=newHeaderSize*2; } + if (strncmp("ElementType = MET_FLOAT",mystring,23)==0) { newHeaderSize=newHeaderSize*4; } + if (strncmp("ElementType = VTK_FLOAT",mystring,23)==0) { newHeaderSize=newHeaderSize*4; } if (strncmp("Offset",mystring,6)==0) {strcpy(mystring,"Offset = 0 0 0\n");} if (strncmp("HeaderSize",mystring,10)==0) {strcpy(mystring,"");} if (strncmp("ElementDataFile",mystring,15)==0)