]> Creatis software - creaVtk.git/commitdiff
#2711 creaVtk Feature New Normal - new Box ReadMHDPlane
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 21 Oct 2015 13:50:12 +0000 (15:50 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Wed, 21 Oct 2015 13:50:12 +0000 (15:50 +0200)
bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx

index c5c2dcd77e3907cc8494b09b464571ee84967105..42f6292a7d8b41b46e7b2dfa2ae2711a11bc80e5 100644 (file)
@@ -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)