exit(1);
}
- pImage=(char*)(newImage->GetScalarPointer(i, j,iWidth ));
+ pImage=(char*)(newImage->GetScalarPointer(i, dimZ-1-j,iWidth ));
if ((ret = read(fd, pImage , dataSize)) < 0)
{
fprintf(stderr, "Failed reading: %s\n", strerror(errno));
pos = dimX*(long long int)slice*dataSize;
long long sizeBytesPlane = dimX*dimY*dataSize;
char *pImage = (char*)( newImage->GetScalarPointer(0,0,iWidth) );
- for (j=0;j<dimZ;j++)
+ for (j=dimZ-1;j>=0;j--)
{
#if defined(_WIN32)
if (_lseeki64( fd, pos + j*sizeBytesPlane , SEEK_SET ) < 0)