[vtkusers] ImageReaders

rainier rainier at at-solutions.co.za
Wed Sep 29 09:23:59 EDT 2004


Hi there, 

I use vtk in conjunction with Borland C++ Builder 6 Pro.
All functionality I have used up to know worked fine but I'm having a 
problem with the ImageReaders. See the example code below: 

#include <vtkImageData.h>
#include <vtkBMPReader.h>
#include <vtkTexture.h> 

vtkBMPReader *bmpReader = vtkBMPReader::New();
bmpReader->SetFileName("transwerk.bmp"); 

vtkTexture *texture = vtkTexture::New();
texture->SetInput(bmpReader->GetOutput());
texture->InterpolateOn(); 

ERROR: In 
I:\ATS_DATA\Programming\Components\VTK\vtk4.2.3\vtk-src-windows\IO\vtkBMPRea 
der.cxx, line 110
vtkBMPReader (30030276): Unable to open file .0 

It seems that the SetFileName function does not work as the
bmpReader->GetFileName() does not return anything. I hope someone can help 
me in this regard. 

Thanks! 

Rainier



More information about the vtkusers mailing list