<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 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> <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> sphereVmax->SetThetaResolution(15);<BR> sphereVmax->SetPhiResolution(15);<BR> sphereVmax->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'"> </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> sphereMapperVmax->SetInput(sphereVmax->GetOutput());<BR> sphereMapperVmax->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> <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> sphereActorVmax->SetMapper(sphereMapperVmax);<BR> sphereActorVmax->GetProperty()->SetColor(0.9, 0.6, 0.1);<BR> sphereActorVmax->GetProperty()->SetAmbient(0.2);<BR> sphereActorVmax->GetProperty()->SetDiffuse(0.3);<BR> sphereActorVmax->GetProperty()->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> <BR>
VTK->GetRenderer()->AddActor(sphereActorVmax); // (VTK is a BorlandRenderWindow) <BR>
<BR> <BR>
vtkWindowToImageFilter *image = vtkWindowToImageFilter::New();<BR> image->SetInput(VTK->GetRenderWindow()); // (<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> image->SetMagnification(6);<BR> image->Update();<BR>
<BR>
vtkJPEGWriter *png = vtkJPEGWriter::New();<BR> png->SetFileName("screenshot.jpg");<BR> png->SetInput(image->GetOutput());<BR> png->Write();<BR>
...</SPAN></SPAN><BR>
<BR>Thanks again.<BR>
<BR> <BR>> Date: Thu, 13 May 2010 14:41:43 -0400<BR>> Subject: Re: [vtkusers] JPG file<BR>> From: drescherjm@gmail.com<BR>> To: rcpompeu@hotmail.com<BR>> CC: vtkusers@vtk.org<BR>> <BR>> On Thu, May 13, 2010 at 2:32 PM, Renato Cesar Pompeu<BR>> <rcpompeu@hotmail.com> wrote:<BR>> > Hi,<BR>> ><BR>> > How can I save the contents of a VTK window to a image file?<BR>> ><BR>> > Thanks.<BR>> ><BR>> <BR>> http://www.itk.org/Wiki/VTK/Examples/Utilities/Screenshot<BR>> <BR>> Replace the PNG writer with a JPG writer..<BR>> <BR>> 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>