<style> p {margin-top:0px;margin-bottom:0px;} </style> <table border=0 width=100%% cellpadding=0 cellspacing=0 align=center> <tr> <td valign=top style='padding:8pt;'><font size=2><P>Try using the widgets and apply callbacks to get the scaling -zoom-in/out<BR>
<BR>
Praveen<BR>
<BR>
<BR>
</P>
<BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<P></P>
<P></P>
<P>---------[ Received Mail Content ]----------<BR>
</P>
<P></P>
<P><B>Subject : </B>[vtkusers] scaling of actors while preserving axes - scale.<BR>
</P>
<P></P>
<P><B>Date : </B>Tue, 12 Sep 2006 22:47:33 +0000<BR>
</P>
<P></P>
<P><B>From : </B>Kleistereimer <kleistereimer@gmx.de><BR>
</P>
<P></P>
<P><B>To : </B>vtkusers@vtk.org<BR>
</P>
<P></P>
<P><BR>
</P>
<P></P>
<P>dear list,</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
i display data and attached an vtkCubeAxesActor2D to show x,y,z axis in</P>
<P></P>
<P><BR>
data - coordinates. this works fine and looks very good out of the box.</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
now i have data with y ranging from 0 .. 1000 , and x from 0 .. 1. this</P>
<P></P>
<P><BR>
results in a very narrow visualization, which i want to stretch in x</P>
<P></P>
<P><BR>
direction while preserving the labels on the x axis. (still from 0 .. 1)</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
i tried using 'Actor->SetScale(x,y,z)' and it worked fine, it scales the</P>
<P></P>
<P><BR>
actor properly. but the axes adapt and show 'wrong' values now. (say, 0</P>
<P></P>
<P><BR>
.. 800 for a x-scaling-factor of 800)</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
so how to solve this?</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
naively i can imagine 3 possibilities:</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
1) change coordinate-system (x-spacing)</P>
<P></P>
<P><BR>
-> not good since other actors would be affected too.</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
2) relabel the axes while scaling</P>
<P></P>
<P><BR>
-> not good since i would need to keep scaling and axes in sync manualy.</P>
<P></P>
<P><BR>
besides this the line</P>
<P></P>
<P><BR>
'(vtkCubeAxesActor2D*)m_scales)->GetXAxisActor2D()->SetRange(0.0, 1.0);'</P>
<P></P>
<P><BR>
shows no effect in my test.</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
3) put object AND axes into another object, 'freeze' the axes (?) and</P>
<P></P>
<P><BR>
scale the outer object (?)</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
any idea / vtkClasses i could try?</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
thankyou for your help.</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
regareds</P>
<P></P>
<P><BR>
kl</P>
<P></P>
<P><BR>
_______________________________________________</P>
<P></P>
<P><BR>
This is the private VTK discussion list. </P>
<P></P>
<P><BR>
Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ</P>
<P></P>
<P><BR>
Follow this link to subscribe/unsubscribe:</P>
<P></P>
<P><BR>
http://www.vtk.org/mailman/listinfo/vtkusers</P>
<P></P>
<P><BR>
</P>
<P></P>
<P><BR>
</P></BLOCKQUOTE>
<P></P></font></td></tr>
</table>