[vtkusers] error reading ascii file for structured points

Seema Jaisinghani seemri at yahoo.com
Wed Feb 19 23:07:57 EST 2003


Hi,
I am trying to read an ascii .vtk file for structured
points. the file reads the header and also identifies
that it's ascii format but it fails to read further
and gives these errors..

Generic Warning: In C:\Program
Files\vtk40\VTK\IO\vtkDataReader.cxx, line 822
Error reading ascii data!


ERROR: In C:\Program
Files\vtk40\VTK\IO\vtkDataReader.cxx, line 785
vtkStructuredPointsReader (0x003F2930): Unsupported
point attribute type: # for file: imageout_20.vtk


Warning: In C:\Program
Files\vtk40\VTK\Patented\vtkDecimate.cxx, line 786
vtkDecimate (0x02089810): Non-manifold geometry
encountered


Warning: In C:\Program
Files\vtk40\VTK\Patented\vtkDecimate.cxx, line 678
vtkDecimate (0x02089810): Non-manifold geometry
encountered.......
....and more

the file looks like this-

# vtk DataFile Version 2.0
Raw Volume Data
ASCII
DATASET STRUCTURED_POINTS
DIMENSIONS 21 21 21
ORIGIN 0 0 0
SPACING 1 1 1 
POINT_DATA 9261
SCALARS atomId float 
LOOKUP_TABLE default
0   0   0   0   0   0   0   0   0   0   0   0   0   0 
 0   0   0   0   0   0 ..more..


my code to read the file is as-

	vtkStructuredPointsReader *reader =
vtkStructuredPointsReader::New();
    reader->SetFileName("imageout_20.vtk");
	reader->Update();
	reader->OpenVTKFile();
	
	vtkStructuredPoints *dataSet =
vtkStructuredPoints::New();
	dataSet->DeepCopy(reader->GetOutput());
	reader->ReleaseDataFlagOn(); 
reader->CloseVTKFile();


I am not able to figue out the reason behind these
errors..
Also does the spacing between the data values
matter?..I have created the ascii file with %4d
formatting

Please give some hints and help,
Thanks,
Seema


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



More information about the vtkusers mailing list