<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 9pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body><div style="text-align: left;">Hi,<br>I can now save the JPEG file, thanks for your advice.<br>But now I have another problem, my vector data is in 3D space, the value is between -2 to 2, so I stored them into a float array of 3 components, and rescale all value to 0 to 256 to represent RGB information. But the saved JPEG file is purely black, can somebody help me on this?<br><br></div>Thanks<br><br>Hank <br><br><hr id="stopSpelling">> To: vtkusers@public.kitware.com<br>> From: wollez@gmx.net<br>> Date: Mon, 5 Mar 2007 00:05:57 +0100<br>> CC: <br>> Subject: [vtkusers] Re: How to color eigenvectors<br>> <br>> YaoHaofeng schrieb:<br>> > I have a set of vectors and I want to color code them according to their <br>> > orientation, e.g. component on x-axis can be colored red, on y-axis <br>> > coded green etc. And I want to save the results to a image as well as <br>> > show it on the screen, now I can correctly save it as .vtk format but <br>> > not other image formats, can anybody tell me how to save as image <br>> > formats such as JPEG? I tried vtkJPEGWriter but because my vectors are <br>> > double type it gives me an error cannot save double into JPEG.<br>> > <br>> > thanks<br>> > <br>> > ------------------------------------------------------------------------<br>> > 使用下一代的 MSN Messenger。 立即尝试! <br>> > <http://imagine-msn.com/messenger/launch80/default.aspx?locale=zh-cn&source=wlmailtagline><br>> > <br>> > <br>> > ------------------------------------------------------------------------<br>> > <br>> > _______________________________________________<br>> > This is the private VTK discussion list. <br>> > Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>> > Follow this link to subscribe/unsubscribe:<br>> > http://www.vtk.org/mailman/listinfo/vtkusers<br>> <br>> <br>> You can try vtkImageCast to convert your data to unsignd char what the<br>> jpeg writer needs as input.<br>> <br>> Regards<br>> Wolfgang<br>> <br>> <br>> _______________________________________________<br>> This is the private VTK discussion list. <br>> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ<br>> Follow this link to subscribe/unsubscribe:<br>> http://www.vtk.org/mailman/listinfo/vtkusers<br><br /><hr />探索 Windows Vista 的世界 <a href='http://search.live.com/results.aspx?q=windows+vista&mkt=zh-cn&FORM=LIVSOP' target='_new'>了解更多信息!</a></body>
</html>