[vtkusers] Re: How to color eigenvectors

WolfgangZ wollez at gmx.net
Sun Mar 4 18:05:57 EST 2007


YaoHaofeng schrieb:
> I have a set of vectors and I want to color code them according to their 
> orientation, e.g. component on x-axis can be colored red, on y-axis 
> coded green etc. And I want to save the results to a image as well as 
> show it on the screen, now I can correctly save it as .vtk format but 
> not other image formats, can anybody tell me how to save as image 
> formats such as JPEG? I tried vtkJPEGWriter but because my vectors are 
> double type it gives me an error cannot save double into JPEG.
> 
> thanks
> 
> ------------------------------------------------------------------------
> 使用下一代的 MSN Messenger。 立即尝试! 
> <http://imagine-msn.com/messenger/launch80/default.aspx?locale=zh-cn&source=wlmailtagline>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers


You can try vtkImageCast to convert your data to unsignd char what the
jpeg writer needs as input.

Regards
Wolfgang





More information about the vtkusers mailing list