[vtkusers] How to write a filtered image to a bitmap file?

Glen Lehmann glehmann at imaging.robarts.ca
Fri Jan 30 13:26:14 EST 2004


Hello BeeJay,

The output of vtkImageRFFT is "always complex floats with real values in 
component0, and imaginary values in component1."

If, for example you're looking to get the real values you can use 
vtkImageExtractComponents to get component 0 (the real values) then use 
vtkImageCast (or vtkImageShiftScale) to cast the data to unsigned char.  
Then, you can write your unsigned char data using vtkBMPWriter.

Cheers,
Glen

Sentil Balaji wrote:

>Hey,
>
>   I filtered an image using
>vtkImageButterworthLowPass followed by
>vtkImageRFFT.How can I write the filtered image to a
>bitmap file?I get an error 
>
>"vtkBMPwriter:vtkPNMwriter can write only unsigned
>char scalars."
>I have no idea on how to correct it...Please give me a
>hunch...Thanks
>
>
>Ciao
>
>Cheers
>BeeJay
>
>________________________________________________________________________
>Yahoo! India Mobile: Download the latest polyphonic ringtones.
>Go to http://in.mobile.yahoo.com
>_______________________________________________
>This is the private VTK discussion list. 
>Please keep messages on-topic. Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://www.vtk.org/mailman/listinfo/vtkusers
>
>  
>




More information about the vtkusers mailing list