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() ...@@ -268,7 +268,7 @@ int vtkDataReader::ReadHeader()
vtkDebugMacro(<< "Opening vtk file as binary"); vtkDebugMacro(<< "Opening vtk file as binary");
delete this->IS; delete this->IS;
#ifdef _WIN32 #ifdef _WIN32
if (!(this->IS = new ifstream(this->Filename, ios::in | ios::bin))) if (!(this->IS = new ifstream(this->Filename, ios::in | ios::binary)))
#else #else
if (!(this->IS = new ifstream(this->Filename, ios::in))) if (!(this->IS = new ifstream(this->Filename, ios::in)))
#endif #endif
......
...@@ -153,12 +153,11 @@ vtkColorScalars *vtkPNMReader::ReadImage(int dim[3]) ...@@ -153,12 +153,11 @@ vtkColorScalars *vtkPNMReader::ReadImage(int dim[3])
vtkColorScalars *vtkPNMReader::ReadVolume(int dim[3]) vtkColorScalars *vtkPNMReader::ReadVolume(int dim[3])
{ {
vtkColorScalars *s, *image; vtkColorScalars *s;
int size, imageSize, xsize, ysize, imageNum, numBytes, type; int size, imageSize, imageNum, type;
int numImages=this->ImageRange[1] - this->ImageRange[0] + 1; int numImages=this->ImageRange[1] - this->ImageRange[0] + 1;
char filename[1024]; char filename[1024];
FILE *fp; FILE *fp;
unsigned char *vptr, *iptr;
dim[2] = numImages; dim[2] = numImages;
sprintf (filename, "%s.%d", this->Filename, this->ImageRange[0]); 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