[vtkusers] Reading files

Naoko Takaya takaya at cv.cs.ritsumei.ac.jp
Thu Nov 30 22:22:58 EST 2000


Hello, Charles and vtkusers,

Thank you for the reply:)

> >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?
>
> vtkImageReader tries to compute the header size from the length of the
> file, and the DataExtents/DataDimensions you supply.  This error ussually
> means that the DataExtent you supplied is larger than the actual
> extent of  the data in the file.

I set the DataExtents to the right extent and the errors disappeared!!
Thank you very much!!
But, it seems that it is only reading or displaying just one file.
I looked at the example "imaging/exampleTcl/skinOrder.tcl"
but I couldn't understand the part with
foreach order $orders{
....
}
I don't write Tcl and I don't know what this means in C++.

Please help me again.

Naoko

==========================================

vtkImageReader *vReader = vtkImageReader::New();
vReader -> ReleaseDataFlagOn();
vReader -> SetDataByteOrderToLittleEndian();
vReader -> SetDataOrigin(-50,-50,-50);
vReader -> SetDataExtent(0,100,0,100,0,0);
vReader -> SetFilePrefix("Distance/Dist");
vReader -> Update();

vtkContourFilter *vContour = vtkContourFilter::New();
vContour->SetInput(vReader->GetOutput());
vContour->SetValue(0,100);

vtkPolyDataMapper *vVolMapper = vtkPolyDataMapper::New();
vVolMapper->SetInput(vContour->GetOutput());

vtkActor *vVolActor = vtkActor::New();
vVolActor->SetMapper(vVolMapper);

vRenderer->AddActor(vVolActor);

==========================================

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

              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