<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
--></style>
</head>
<body class='hmmessage'>
<SPAN id=result_box class=short_text><SPAN title="" lc="I had seen this example and" kc="Eu já havia visto este exemplo e" closure_uid_ecd4jp="58">I had seen this example before&nbsp;and </SPAN></SPAN><SPAN id=result_box class=short_text><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Eu estou tentando fazer algo equivalente para o Borland mas não está dando certo." onmouseout="this.style.backgroundColor='#fff'">I'm trying to do something equivalent to the Borland but is not working. </SPAN><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'">Any ideas?</SPAN></SPAN><BR>
<SPAN class=short_text><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'"></SPAN></SPAN>&nbsp;<BR>
<SPAN class=short_text><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'">...</SPAN></SPAN><BR>
<SPAN class=short_text><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'">vtkSphereSource *sphereVmax = vtkSphereSource::New();<BR>&nbsp;&nbsp;&nbsp; sphereVmax-&gt;SetThetaResolution(15);<BR>&nbsp;&nbsp;&nbsp; sphereVmax-&gt;SetPhiResolution(15);<BR>&nbsp;&nbsp;&nbsp; sphereVmax-&gt;SetRadius(0.5);<BR></SPAN></SPAN><BR>
<SPAN class=short_text><SPAN style="BACKGROUND-COLOR: #ebeff9" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'">&nbsp;</SPAN></SPAN><BR>
<SPAN class=short_text><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'">vtkPolyDataMapper *sphereMapperVmax = vtkPolyDataMapper::New();<BR>&nbsp;&nbsp;&nbsp; sphereMapperVmax-&gt;SetInput(sphereVmax-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp; sphereMapperVmax-&gt;ImmediateModeRenderingOn();</SPAN></SPAN><BR>
<SPAN class=short_text><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'"></SPAN></SPAN>&nbsp;<BR>
<SPAN class=short_text><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'">vtkActor *sphereActorVmax = vtkActor::New();<BR>&nbsp;&nbsp;&nbsp; sphereActorVmax-&gt;SetMapper(sphereMapperVmax);<BR>&nbsp;&nbsp;&nbsp; sphereActorVmax-&gt;GetProperty()-&gt;SetColor(0.9, 0.6, 0.1);<BR>&nbsp;&nbsp;&nbsp; sphereActorVmax-&gt;GetProperty()-&gt;SetAmbient(0.2);<BR>&nbsp;&nbsp;&nbsp; sphereActorVmax-&gt;GetProperty()-&gt;SetDiffuse(0.3);<BR>&nbsp;&nbsp;&nbsp; sphereActorVmax-&gt;GetProperty()-&gt;SetSpecular(0.8);</SPAN></SPAN><BR><SPAN class=short_text><SPAN style="BACKGROUND-COLOR: #fff" onmouseover="this.style.backgroundColor='#ebeff9'" title="Alguma idéia?" onmouseout="this.style.backgroundColor='#fff'">
<BR>&nbsp;<BR>
VTK-&gt;GetRenderer()-&gt;AddActor(sphereActorVmax);&nbsp;&nbsp;&nbsp; // (VTK is a BorlandRenderWindow)&nbsp;<BR>
<BR>&nbsp;<BR>
vtkWindowToImageFilter *image = vtkWindowToImageFilter::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetInput(VTK-&gt;GetRenderWindow());&nbsp;&nbsp;&nbsp; // (<SPAN id=result_box class=short_text><SPAN title="" lc="I know the problem is here, but I can not solve." kc="Eu sei que o problema está aqui, mas não consigo resolver." closure_uid_ecd4jp="44"><FONT style="BACKGROUND-COLOR: #ffff00">I know the problem is here, but I can not solve it</FONT>)</SPAN></SPAN><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; image-&gt;SetMagnification(6);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;image-&gt;Update();<BR>
&nbsp;<BR>
vtkJPEGWriter *png = vtkJPEGWriter::New();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; png-&gt;SetFileName("screenshot.jpg");<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; png-&gt;SetInput(image-&gt;GetOutput());<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; png-&gt;Write();<BR>
...</SPAN></SPAN><BR>
<BR>Thanks again.<BR>
<BR>&nbsp;<BR>&gt; Date: Thu, 13 May 2010 14:41:43 -0400<BR>&gt; Subject: Re: [vtkusers] JPG file<BR>&gt; From: drescherjm@gmail.com<BR>&gt; To: rcpompeu@hotmail.com<BR>&gt; CC: vtkusers@vtk.org<BR>&gt; <BR>&gt; On Thu, May 13, 2010 at 2:32 PM, Renato Cesar Pompeu<BR>&gt; &lt;rcpompeu@hotmail.com&gt; wrote:<BR>&gt; &gt; Hi,<BR>&gt; &gt;<BR>&gt; &gt; How can I save the contents of a VTK window to a image file?<BR>&gt; &gt;<BR>&gt; &gt; Thanks.<BR>&gt; &gt;<BR>&gt; <BR>&gt; http://www.itk.org/Wiki/VTK/Examples/Utilities/Screenshot<BR>&gt; <BR>&gt; Replace the PNG writer with a JPG writer..<BR>&gt; <BR>&gt; John<BR>                                               <br /><hr />POR ANO SÃO ENCONTRADOS 609.000 SITES QUE ROUBAM DADOS. <a href='http://www.microsoft.com/brasil/windows/internet-explorer/features/navegue.aspx?tabid=1&catid=1&WT.mc_id=1565' target='_new'>VEJA COMO SE PROTEGER AQUI.</a></body>
</html>