[vtkusers] Reading files

Naoko Takaya takaya at cv.cs.ritsumei.ac.jp
Thu Nov 30 01:05:19 EST 2000


Hello VTKUSERS,

I have several image data files with just positive values and zeros.
I want to read these files and create a 3D image.
The files include x and z values.
(Pile the files up in y axis in order)

I used vtkImageReader but they give me errors like;
"File Operation Failed"
" row = 0, Read = 202, Skip0 = -404, Skip1 = 40804, FilePos=0 "
What does this mean?

I also tried to use vtkVolumeReader but compile error says something like;
"Cannot transform from vtkStructuredPointsSource * to vtkVolumeReader *"
when initializing. 
What am I doing wrong?

The brief code for my program is follows;
=======================================
vtkImageReader *vReader = vtkImageReader::New();
	vReader -> ReleaseDataFlagOn();
	vReader -> SetDataByteOrderToLittleEndian();
	vReader -> SetDataOrigin(-50,-50,-50);
	vReader -> SetDataExtent(0,255,1,93,0,255);	
	vReader -> SetFilePrefix("Distance/Dist");
	vReader -> Update();

vtkContouFilter
vtkPolyDataMapper
vtkActor ...
=======================================
or
========================================
vtkVolumeReader *vReader = vtkVolumeReader::New();
	vReader -> GetOutput()->SetOrigin(0,0,0);	
	vReader -> SetImageRange(45,45);	
========================================

Please help me.
Any help would be very much appreciated!!

Naoko

*******************************************

              Naoko Takaya
          Ritsumeikan University 
  Department of Science and Engineering 
        Computer Vision Laboratory

   e-mail: takaya at cv.cs.ritsumei.ac.jp

*******************************************




More information about the vtkusers mailing list