Commit a38966b6 authored by Ken Martin's avatar Ken Martin
Browse files

fixed some minor bugs

parent 6fb777d3
......@@ -268,7 +268,7 @@ int vtkDataReader::ReadHeader()
vtkDebugMacro(<< "Opening vtk file as binary");
delete this->IS;
#ifdef _WIN32
if (!(this->IS = new ifstream(this->Filename, ios::in | ios::bin)))
if (!(this->IS = new ifstream(this->Filename, ios::in | ios::binary)))
if (!(this->IS = new ifstream(this->Filename, ios::in)))
......@@ -153,12 +153,11 @@ vtkColorScalars *vtkPNMReader::ReadImage(int dim[3])
vtkColorScalars *vtkPNMReader::ReadVolume(int dim[3])
vtkColorScalars *s, *image;
int size, imageSize, xsize, ysize, imageNum, numBytes, type;
vtkColorScalars *s;
int size, imageSize, imageNum, type;
int numImages=this->ImageRange[1] - this->ImageRange[0] + 1;
char filename[1024];
FILE *fp;
unsigned char *vptr, *iptr;
dim[2] = numImages;
sprintf (filename, "%s.%d", this->Filename, this->ImageRange[0]);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment