[vtkusers] Trouble writing filtered image to an image file?

Sentil Balaji profbalse at yahoo.co.in
Fri Jan 30 01:33:25 EST 2004


Hey,

   I am trying to filter an input image and write in
an output file[.bmp].The following is the code
segement I used:
------------------------------------
 pw1->SetInput(idrf);
 pw1->SetFileName("C:/VTKOUT.bmp");
 pw1->Write();
------------------------------------
'idrf' is of 'vtkImageData' type.It is the output of
vtkRFFT after filtering in the frequency domain.

On execution, I get the following error.I am able to
display the image in the render window.
The problem is in writing to a file.

--------------------------------------
ERROR: In D:\VTK\IO\vtkBMPWriter.cxx, line 113
vtkBMPWriter (0x01828C08): PNMWriter only accepts
unsigned char scalars!
---------------------------------------
I tried "idrf->SetScalarType(VTK_UNSIGNED_CHAR)" to
define the type.Yet, I have the same error.Please help
me.Many Thanks.Ciao


Cheers

BeeJay


________________________________________________________________________
Yahoo! India Mobile: Download the latest polyphonic ringtones.
Go to http://in.mobile.yahoo.com



More information about the vtkusers mailing list