[vtkusers] Texturing plane from tiff

Kalorlo kalorlo-vtk at kellyhouse.force9.co.uk
Wed Feb 11 13:29:15 EST 2004


Hi, I'm trying to read in a tiff and use that as the texture for a 
plane. Here's the relevant section of my code:

     vtkTIFFReader* mapreader = vtkTIFFReader::New();
     mapreader->SetFileName("Dublin_smaller.tiff");
     mapreader->OpenFile();

     vtkPlaneSource* plane = vtkPlaneSource::New();
     plane->SetResolution(1, 1);
     plane->SetPoint1(1500, 0, 0);
     plane->SetPoint2(0, 1500, 0);
     vtkPolyDataMapper* planemapper = vtkPolyDataMapper::New();
     planemapper->SetInput(plane->GetOutput());
     vtkActor* planeactor = vtkActor::New();
     planeactor->SetMapper(planemapper);
     vtkTexture* texture = vtkTexture::New();
     texture->SetInput(mapreader->GetOutput());
     planeactor->SetTexture(texture);

which compiles but gives me a bus error when I try to run it. I'm using 
yesterday's CVS on Mac OS 10.2.8

This is after having had some problems with vtkTIFFReader - I was 
getting the following error when compiling:
ld: /usr/local/lib/vtk/libvtktiff.a(tif_zip.o) illegal reference to 
symbol: _deflateParams defined in indirectly referenced dynamic library 
/usr/lib/libz.1.1.3.dylib
which I fixed by adding -lz to the c++ section of my makefile, after 
seeing a similar problem here.

Thanks,

-Heather




More information about the vtkusers mailing list