<div style="text-align: left;" dir="ltr">Hi,<br><br>I have to add a vtkImageData in a vtkXYPlotActor?</div><br><br>Regards,<br>Paulo Amorim<br><br><br><br><br><div class="gmail_quote">2008/11/25 Paulo Henrique Junqueira Amorim <span dir="ltr">&lt;<a href="mailto:paulojamorim@gmail.com">paulojamorim@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style="text-align: left;" dir="ltr">Hi,<br><br>I have to add a vtkImageData in a vtkXYPlotActor?</div>
<br><br>Regards,<br>Paulo Amorim<br><br><br><br><div class="gmail_quote">2008/11/25 Liang Ma <span dir="ltr">&lt;<a href="mailto:leo@esit.com" target="_blank">leo@esit.com</a>&gt;</span><div><div></div><div class="Wj3C7c">
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dear Peter,<br>
<br>
Thank you so much for your reply. I did try &nbsp;this-&gt;pvtkRenderer-&gt;Render() after &nbsp; &nbsp; this-&gt;pvtkRenderer-&gt;AddActor(this-&gt;pvtkActor); It does not work.<br>
<br>
my pvtkActor is a vtkActor2D:<br>
<br>
&nbsp;vtkActor2D &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;*pvtkActor2D;<br>
<br>
In fact &nbsp;this-&gt;pvtkActor-&gt;GetPositionCoordinate()-&gt;SetValue(0.5, 0.5); will move the actor to the center. But this-&gt;pvtkActor-&gt;GetPosition2Coordinate()-&gt;SetValue(0.9, 0.9); &nbsp;will not scale the actor.<br>


<br>
I searched in the archive of &nbsp;vtkuser and could not fond the answer. I read from the help that &nbsp;vtkActor2D-&gt;GetPosition2Coordinate()-&gt;SetValue sometims will not work &quot;Some 2D actor subclasses ignore the position2 variable &quot;. But I do not know why. Will a vtkXYPlotActor be better? I can change the size of the font in the same program.Whould you please give me some more advices? Thanks again.<br>


<br>
Best regards<br>
<br>
Liang Ma<br>
<br>
<br>
<br>
----- Original Message ----- From: &quot;Peter F Bradshaw&quot; &lt;<a href="mailto:pfb@exadios.com" target="_blank">pfb@exadios.com</a>&gt;<br>
To: &quot;VTK Users&quot; &lt;<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>&gt;<br>
Sent: Tuesday, November 25, 2008 11:15 AM<br>
Subject: Re: [vtkusers] how can I scale a vtkActor2D?<div><div></div><div><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Liang Ma;<br>
<br>
Are you calling this-&gt;pvtkRenderer-&gt;Render() anywhere?<br>
<br>
On Mon, 24 Nov 2008, Liang Ma wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
I tried to scale a 2D actor but it doesn&#39;t work. I tried GetPosition2Coordinate() function but it doesn&#39;t work. &nbsp;Also I tried to zoom the camera. It does not work either.<br>
<br>
Whould you give me some advices? Thanks.<br>
<br>
Regards<br>
<br>
Liang Ma<br>
<br>
Here is the code:<br>
<br>
 &nbsp;vtkActor2D &nbsp; *pvtkActor;<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ..........................<br>
<br>
this-&gt;pvtkActor-&gt;GetPositionCoordinate()-&gt;SetCoordinateSystemToNormalizedViewport();<br>
&nbsp;this-&gt;pvtkActor-&gt;GetPositionCoordinate()-&gt;SetValue(0.5, 0.5); &nbsp;// works, could move the actor to the center<br>
&nbsp;this-&gt;pvtkActor-&gt;GetPosition2Coordinate()-&gt;SetValue(0.9, 0.9); // does not work, no effect<br>
&nbsp;this-&gt;pvtkActor-&gt;GetProperty()-&gt;SetColor(1, 0, 0);<br>
<br>
the code for zoom:<br>
<br>
////////////////////////////////////////////////////////////////////////<br>
 &nbsp; &nbsp; &nbsp; &nbsp;this-&gt;pvtkCamera = this-&gt;pvtkRenderer-&gt;GetActiveCamera ();<br>
 &nbsp; &nbsp; &nbsp; &nbsp;this-&gt;pvtkCamera-&gt;Zoom(5); &nbsp; &nbsp;// &nbsp; &nbsp; zoom doesn&#39;t work<br>
 &nbsp; &nbsp; &nbsp; &nbsp;this-&gt;pvtkRenderer-&gt;SetActiveCamera (this-&gt;pvtkCamera) ;<br>
///////////////////////////////////////////////////////////////////////////<br>
<br>
</blockquote>
<br>
Cheers<br>
<br>
-- <br>
Peter F Bradshaw: <a href="http://www.exadios.com" target="_blank">http://www.exadios.com</a> (public keys avaliable there).<br>
Personal site: <a href="http://personal.exadios.com" target="_blank">http://personal.exadios.com</a><br>
&quot;I love truth, and the way the government still uses it occasionally to<br>
keep us guessing.&quot; - Sam Kekovich.<br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a> <br>
</blockquote>
<br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>