<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2>If there is only one actor, you could try using
ResetCamera(bnds) where bnds is bounds of data used for actor.</FONT></DIV>
<DIV><FONT face=Arial size=2>Vidyadhar</FONT></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=amit@sahajanandsoftware.com
href="mailto:amit@sahajanandsoftware.com">Amit Dhaduk</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@vtk.org
href="mailto:vtkusers@vtk.org">vtk</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Friday, April 15, 2005 11:22
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] How
renderer->ResetCamera() execute faster for input25000 points as (x, y, z)
format in vtkDelaunay3D process</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial color=#000000 size=2>Hello</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2> I give point cloud data as around
25000 for <FONT color=#0000ff>vtkDelaunay3D and will get output in
unstructured grid. When I go for dispaly</FONT></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>the output as given below code, the
execution of <FONT face=Arial color=#808080
size=2>renderer</FONT><FONT color=#000000><FONT face=Arial
size=2>->ResetCamera() takes too much time as more then 2
minutes.</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Anybody know that how can I dispaly my output as
faster as my point cloud is bigger for input. One more thing is that my data
in point cloud</FONT></DIV>
<DIV><FONT face=Arial size=2>are very proper(not any randomly generated) given
to generate close outer surface.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks</FONT></DIV>
<DIV><FONT face=Arial size=2>Amit </FONT></DIV>
<DIV><FONT color=#000000></FONT> </DIV>
<DIV><FONT color=#000000> </DIV><FONT size=2><FONT face=Arial>
<DIV>vtkPolyDataMapper *</FONT><FONT color=#808080>cubeMapper</FONT><FONT
color=#000000> = vtkPolyDataMapper::</FONT><FONT
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>cubeMapper</FONT><FONT color=#000000>-></FONT><FONT
color=#880000>SetInput</FONT><FONT color=#000000>(</FONT><FONT
color=#808080>OutPut</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>);</FONT></DIV></FONT><FONT color=#000000><FONT size=2><FONT
face=Arial>
<DIV>vtkDataSetMapper *</FONT><FONT color=#808080>pDataset</FONT><FONT
color=#000000>=vtkDataSetMapper::</FONT><FONT
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>pDataset</FONT><FONT color=#000000>-></FONT><FONT
color=#880000>SetInput</FONT><FONT color=#000000>(</FONT><FONT
color=#808080>dataSet</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>);</FONT></DIV><FONT size=2><FONT face=Arial>
<DIV>vtkActor *</FONT><FONT color=#808080>cubeActor</FONT><FONT color=#000000>
= vtkActor::</FONT><FONT color=#880000>New</FONT></FONT></FONT><FONT
color=#000000><FONT face=Arial size=2>();</FONT></DIV></FONT><FONT
color=#000000>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>cubeActor</FONT><FONT color=#000000>->SetMapper(</FONT><FONT
color=#808080>pDataset</FONT></FONT></FONT><FONT color=#000000><FONT
face=Arial size=2>);</FONT></DIV></FONT><FONT color=#008000>
<DIV></FONT><FONT color=#000000> </DIV><FONT size=2><FONT face=Arial>
<DIV>vtkCamera *</FONT><FONT color=#808080>camera</FONT><FONT color=#000000> =
vtkCamera::</FONT><FONT color=#880000>New</FONT></FONT></FONT><FONT
color=#000000><FONT face=Arial size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>camera</FONT><FONT color=#000000>-></FONT><FONT
color=#880000>SetPosition</FONT></FONT></FONT><FONT color=#000000><FONT
face=Arial size=2>(1,1,1);</FONT></DIV>
<DIV></FONT><FONT face=Arial color=#808080 size=2>camera</FONT><FONT
color=#000000><FONT face=Arial size=2>->SetFocalPoint(0,0,0);</FONT></DIV>
<DIV> </DIV><FONT size=2><FONT face=Arial>
<DIV>vtkRenderer *</FONT><FONT color=#808080>renderer</FONT><FONT
color=#000000> = vtkRenderer::</FONT><FONT
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>();</FONT></DIV><FONT size=2><FONT face=Arial>
<DIV>vtkRenderWindow *</FONT><FONT color=#808080>renWin</FONT><FONT
color=#000000> = vtkRenderWindow::</FONT><FONT
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>renWin</FONT><FONT color=#000000>->AddRenderer(</FONT><FONT
color=#808080>renderer</FONT></FONT></FONT><FONT color=#000000><FONT
face=Arial size=2>);</FONT></DIV>
<DIV> </DIV><FONT size=2><FONT face=Arial>
<DIV>vtkRenderWindowInteractor *</FONT><FONT color=#808080>iren</FONT><FONT
color=#000000> = vtkRenderWindowInteractor::</FONT><FONT
color=#880000>New</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#808080>iren</FONT><FONT
color=#000000>->SetRenderWindow(</FONT><FONT
color=#808080>renWin</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>);</FONT></DIV>
<DIV> </DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>renderer</FONT><FONT color=#000000>->AddActor(</FONT><FONT
color=#808080>cubeActor</FONT></FONT></FONT><FONT color=#000000><FONT
face=Arial size=2>);</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>renderer</FONT><FONT
color=#000000>->SetActiveCamera(</FONT><FONT
color=#808080>camera</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>);</FONT></DIV>
<DIV></FONT><FONT color=#0000ff><FONT face=Arial size=2>renderer</FONT><FONT
face=Arial size=2>->ResetCamera(); -> takes time for execution as
more then 2 minutes</FONT></FONT></DIV>
<DIV><FONT color=#000000></FONT><FONT face=Arial color=#808080
size=2>renderer</FONT><FONT color=#000000><FONT face=Arial
size=2>->SetBackground(0,0,0);</FONT></DIV>
<DIV> </DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>renWin</FONT><FONT color=#000000>-></FONT><FONT
color=#880000>SetSize</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>(704,576); </FONT></DIV>
<DIV> </DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT
color=#808080>renWin</FONT><FONT color=#000000>-></FONT><FONT
color=#880000>Render</FONT></FONT></FONT><FONT color=#000000><FONT face=Arial
size=2>();</FONT></DIV>
<DIV></FONT><FONT size=2><FONT face=Arial><FONT color=#808080>iren</FONT><FONT
color=#000000>-></FONT><FONT color=#880000>Start</FONT></FONT></FONT><FONT
color=#000000><FONT face=Arial size=2>();</FONT></DIV>
<DIV>
<P></P></FONT></DIV></BLOCKQUOTE></BODY></HTML>