[vtkusers] help with vtkDataReader

Prashanth prashanth.dumpuri at gmail.com
Tue Mar 15 11:54:29 EDT 2011


All,
  I'm using vtkDataReader to read a file. The contents of the file start
with the following line: "patch 190 PatchName". Below is the code I'm using
to read my file

char line[256];
int numPts = 0;

vtkDataReader *reader = vtkDataReader::New();
reader->SetFileName( "myfilename.dat" );

reader->ReadString( line );
if ( reader->LowerCase(line),"patch",5 )
{
   reader->Read( &numPts );
}

I ran the code in Debug mode and found out that the Read function in
vtkDataReader.cxx is returning 190 but it is not being passed to my code. In
other words, the variable "numPts" in my code is not being assigned a value
of 190. Can someone help me figure out this strange behavior?

Thanks
Prashanth
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110315/3fea7511/attachment.htm>


More information about the vtkusers mailing list