From c63a1475156e6df7ba66ccd385f0924e7c3c032d Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Wed, 27 Apr 2016 10:11:24 +0200 Subject: [PATCH] #2919 crea Vtk Bug New Normal - Read MHDPlane not compiling in windows for big data --- .../src/bbcreaVtkReadMHDPlane.cxx | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx b/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx index 3209a95..b842e8d 100644 --- a/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx +++ b/bbtk_creaVtk_PKG/src/bbcreaVtkReadMHDPlane.cxx @@ -257,15 +257,11 @@ void ReadMHDPlane::Read64lseek() newImage->AllocateScalars(); newImage->Update(); pos = dimX*dimY*(long long)bbGetInputSlice()*dataSize; - - - #if defined(_WIN32) if (_lseeki64( fd, pos, SEEK_SET ) < 0) #else if (lseek64(fd, pos, SEEK_SET) < 0) #endif // defined(_WIN32) - { printf("EED ReadMHDPlane::Read64lseek \n"); fprintf(stderr, "Failed seeking to %lld, %s\n", pos, strerror(errno)); @@ -279,7 +275,6 @@ void ReadMHDPlane::Read64lseek() } } // if PLANE XY - /* if (bbGetInputDirectionPlane()=="XZ") { long long int j; @@ -292,11 +287,14 @@ void ReadMHDPlane::Read64lseek() newImage->Update(); long long sizeBytesPlane = dimX*dimY*dataSize; pos = dimX*(long long int)bbGetInputSlice()*dataSize; - void *pImage = newImage->GetScalarPointer(); + char *pImage = (char*)(newImage->GetScalarPointer()); for (j=0;jAllocateScalars(); newImage->Update(); long long sizeBytesPlane = dimX*dimY*dataSize; -// pos = dimX*(long long int)bbGetInputSlice()*dataSize; - void *pImage; + char *pImage; for (j=0;jGetScalarPointer(i, j,0 ); + pImage=(char*)(newImage->GetScalarPointer(i, j,0 )); if ((ret = read(fd, pImage , dataSize)) < 0) { fprintf(stderr, "Failed reading: %s\n", strerror(errno)); @@ -349,7 +349,7 @@ printf("EED EED ReadMHDPlane::Read64lseek YZ i=%d j=%d \n", i,j); } } // for j } // if PLANE YZ - */ + #if defined(_WIN32) _close (fd); -- 2.47.1