From 8ae7e0ddb2938899b2bd062ca42db0124699d912 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 21 Oct 2015 15:50:12 +0200 Subject: [PATCH] #2711 creaVtk Feature New Normal - new Box ReadMHDPlane --- bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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) -- 2.47.1