<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><DIV>hi</DIV>
<DIV>&nbsp;</DIV>
<DIV>i need help in vtk i want to make transformation (rotation, translating)&nbsp;to stl image for teeth</DIV>
<DIV>i&nbsp;have tried to use boxwidget it works well but&nbsp;i want to&nbsp;display&nbsp;degree of&nbsp;transformation&nbsp;on label or text field &nbsp;but this failed</DIV>
<DIV>i think there is something with mycallback function plz see my code and i will wait for a reply </DIV>
<DIV>plz i need help as soon as possible</DIV><FONT color=#0000ff size=2>
<DIV>using</FONT><FONT size=2> System;</DIV></FONT><FONT color=#0000ff size=2>
<DIV>using</FONT><FONT size=2> System.Collections.Generic;</DIV></FONT><FONT color=#0000ff size=2>
<DIV>using</FONT><FONT size=2> System.ComponentModel;</DIV></FONT><FONT color=#0000ff size=2>
<DIV>using</FONT><FONT size=2> System.Data;</DIV></FONT><FONT color=#0000ff size=2>
<DIV>using</FONT><FONT size=2> System.Drawing;</DIV></FONT><FONT color=#0000ff size=2>
<DIV>using</FONT><FONT size=2> System.Text;</DIV></FONT><FONT color=#0000ff size=2>
<DIV>using</FONT><FONT size=2> System.Windows.Forms;</DIV></FONT><FONT color=#0000ff size=2>
<DIV>using</FONT><FONT size=2> vtk;</DIV></FONT><FONT color=#0000ff size=2>
<DIV>namespace</FONT><FONT size=2> VTK_Eample4</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>partial</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>class</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>Form1</FONT><FONT size=2> : </FONT><FONT color=#2b91af size=2>Form</DIV></FONT><FONT size=2>
<DIV>{</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkRenderer</FONT><FONT size=2> ren1 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkRenderer</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin11 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin21 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin31 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin41 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin51 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin61 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin71 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin81 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkTransform</FONT><FONT size=2> t = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkTransform</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#0000ff size=2>public</FONT><FONT size=2> Form1()</DIV>
<DIV>{</DIV>
<DIV>InitializeComponent();</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> Form1_Load(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</DIV>
<DIV>{</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#0000ff size=2>static</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> myCallback(</FONT><FONT color=#2b91af size=2>vtkObject</FONT><FONT size=2> caller, </FONT><FONT color=#0000ff size=2>uint</FONT><FONT size=2> eventId,</DIV>
<DIV></FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> clientData, </FONT><FONT color=#2b91af size=2>IntPtr</FONT><FONT size=2> callData)</DIV>
<DIV>{</DIV>
<DIV>System.Diagnostics.</FONT><FONT color=#2b91af size=2>Debug</FONT><FONT size=2>.WriteLine(</FONT><FONT color=#a31515 size=2>"Callback has been called."</FONT><FONT size=2>);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkBoxWidget</FONT><FONT size=2> boxWidget = </FONT><FONT color=#2b91af size=2>vtkBoxWidget</FONT><FONT size=2>.SafeDownCast(caller);</DIV>
<DIV></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> ( </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2> != boxWidget )</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#0000ff size=2>using</FONT><FONT size=2> (</FONT><FONT color=#2b91af size=2>vtkTransform</FONT><FONT size=2> t = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkTransform</FONT><FONT size=2>())</DIV>
<DIV>{</DIV>
<DIV>boxWidget.ScalingEnabledOff();</DIV>
<DIV>boxWidget.GetTransform(t);</DIV>
<DIV></FONT><FONT color=#0000ff size=2>double</FONT><FONT size=2>[] s = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>double</FONT><FONT size=2>[2];</DIV>
<DIV>s = t.GetOrientation();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>Label</FONT><FONT size=2> label1= </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>Label</FONT><FONT size=2>();</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>label1.Text = s.ToString();</DIV>
<DIV>label1.Show();</DIV>
<DIV></FONT><FONT color=#008000 size=2>// label1.</DIV></FONT><FONT size=2>
<DIV></DIV>
<DIV>boxWidget.GetProp3D().SetUserTransform(t);</DIV>
<DIV>}</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>else</DIV></FONT><FONT size=2>
<DIV>{</DIV>
<DIV>System.Diagnostics.</FONT><FONT color=#2b91af size=2>Debug</FONT><FONT size=2>.WriteLine(</FONT><FONT color=#a31515 size=2>"Caller is not a box widget."</FONT><FONT size=2>);</DIV>
<DIV>}</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> BoxWeidget(vtk.</FONT><FONT color=#2b91af size=2>vtkRenderWindow</FONT><FONT size=2> renWin,</FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> actor)</DIV>
<DIV>{</DIV>
<DIV></DIV>
<DIV></FONT><FONT color=#008000 size=2>//vtkRenderWindow renWin = new vtkRenderWindow();</DIV></FONT><FONT size=2>
<DIV>renWin.AddRenderer( ren1 );</DIV>
<DIV></DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkRenderWindowInteractor</FONT><FONT size=2> iren = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkRenderWindowInteractor</FONT><FONT size=2>();</DIV>
<DIV>iren.SetRenderWindow(renWin);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkInteractorStyleTrackballCamera</FONT><FONT size=2> style = </DIV>
<DIV></FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkInteractorStyleTrackballCamera</FONT><FONT size=2>();</DIV>
<DIV>iren.SetInteractorStyle(style);</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#008000 size=2>//Here we use a vtkBoxWidget to transform the underlying coneActor (by</DIV></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2>//manipulating its transformation matrix). </DIV></FONT><FONT size=2>
<DIV></FONT><FONT color=#2b91af size=2>vtkBoxWidget</FONT><FONT size=2> boxWidget = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkBoxWidget</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#008000 size=2>//boxWidget.();</DIV></FONT><FONT size=2>
<DIV></DIV>
<DIV>boxWidget.SetInteractor(iren);</DIV>
<DIV>boxWidget.SetPlaceFactor(1f);</DIV>
<DIV></DIV>
<DIV></FONT><FONT color=#008000 size=2>//Place the interactor initially. The input to a 3D widget is used to</DIV></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2>//initially position and scale the widget. The EndInteractionEvent is</DIV></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2>//observed which invokes the SelectPolygons callback.</DIV></FONT><FONT size=2>
<DIV>boxWidget.SetProp3D(actor);</DIV>
<DIV>boxWidget.PlaceWidget();</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#008000 size=2>// Now for every interaction event that is generated by the boxWidget,</DIV></FONT><FONT size=2>
<DIV></FONT><FONT color=#008000 size=2>//call our callback function.</DIV></FONT><FONT size=2>
<DIV>boxWidget.AddObserver((</FONT><FONT color=#0000ff size=2>uint</FONT><FONT size=2>) </FONT><FONT color=#2b91af size=2>EventIds</FONT><FONT size=2>.InteractionEvent,</DIV>
<DIV></FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkDotNetCallback</FONT><FONT size=2>(myCallback));</DIV>
<DIV></FONT><FONT color=#008000 size=2>//label1.Text = s.ToString();</DIV></FONT><FONT size=2>
<DIV>boxWidget.On();</DIV>
<DIV></DIV>
<DIV></DIV>
<DIV>iren.Initialize();</DIV>
<DIV>iren.Start();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkWin32OpenGLRenderWindow</FONT><FONT size=2> win32win =</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkWin32OpenGLRenderWindow</FONT><FONT size=2>.SafeDownCast(renWin);</DIV>
<DIV></FONT><FONT color=#0000ff size=2>if</FONT><FONT size=2> ( </FONT><FONT color=#0000ff size=2>null</FONT><FONT size=2> != win32win ) win32win.Clean();</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> button1_Click(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#008000 size=2>// BoxWeidget(this.vtkFormsWindowControl1.GetRenderWindow());</DIV></FONT><FONT size=2>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> button2_Click(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#008000 size=2>// vtkRenderer ren1 = new vtkRenderer();</DIV></FONT><FONT size=2>
<DIV></FONT><FONT color=#2b91af size=2>vtkRenderWindowInteractor</FONT><FONT size=2> iren = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkRenderWindowInteractor</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkRenderWindow</FONT><FONT size=2> renWin1;</DIV>
<DIV>renWin1 = </FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.vtkFormsWindowControl1.GetRenderWindow();</DIV>
<DIV>renWin1.AddRenderer(ren1);</DIV>
<DIV>iren.SetRenderWindow(renWin1);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2> reader11 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2> reader21 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2> reader31 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2> reader41 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2> reader51 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2> reader61 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2> reader71 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2>();</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2> reader81 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSTLReader</FONT><FONT size=2>();</DIV>
<DIV>&nbsp;</DIV>
<DIV>reader11.SetFileName(</FONT><FONT color=#a31515 size=2>"C:\\Documents and Settings\\Bibo\\Desktop\\transformation isa\\Images\\teeth\\teeth1.stl"</FONT><FONT size=2>);</DIV>
<DIV>reader21.SetFileName(</FONT><FONT color=#a31515 size=2>"C:\\Documents and Settings\\Bibo\\Desktop\\transformation isa\\Images\\teeth\\teeth2.stl"</FONT><FONT size=2>);</DIV>
<DIV>reader31.SetFileName(</FONT><FONT color=#a31515 size=2>"C:\\Documents and Settings\\Bibo\\Desktop\\transformation isa\\Images\\teeth\\teeth3.stl"</FONT><FONT size=2>);</DIV>
<DIV>reader41.SetFileName(</FONT><FONT color=#a31515 size=2>"C:\\Documents and Settings\\Bibo\\Desktop\\transformation isa\\Images\\teeth\\teeth4.stl"</FONT><FONT size=2>);</DIV>
<DIV>reader51.SetFileName(</FONT><FONT color=#a31515 size=2>"C:\\Documents and Settings\\Bibo\\Desktop\\transformation isa\\Images\\teeth\\teeth5.stl"</FONT><FONT size=2>);</DIV>
<DIV>reader61.SetFileName(</FONT><FONT color=#a31515 size=2>"C:\\Documents and Settings\\Bibo\\Desktop\\transformation isa\\Images\\teeth\\teeth6.stl"</FONT><FONT size=2>);</DIV>
<DIV>reader71.SetFileName(</FONT><FONT color=#a31515 size=2>"C:\\Documents and Settings\\Bibo\\Desktop\\transformation isa\\Images\\teeth\\teeth7.stl"</FONT><FONT size=2>);</DIV>
<DIV>reader81.SetFileName(</FONT><FONT color=#a31515 size=2>"C:\\Documents and Settings\\Bibo\\Desktop\\transformation isa\\Images\\teeth\\teeth8.stl"</FONT><FONT size=2>);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2> smoother11 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2>();</DIV>
<DIV>smoother11.SetInputConnection(reader11.GetOutputPort());</DIV>
<DIV>smoother11.SetNumberOfIterations(10);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2> skinNormals11 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2>();</DIV>
<DIV>skinNormals11.SetInputConnection(smoother11.GetOutputPort());</DIV>
<DIV>skinNormals11.SetFeatureAngle(60.0);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2> skinMapper11 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2>();</DIV>
<DIV>skinMapper11.SetInputConnection(skinNormals11.GetOutputPort());</DIV>
<DIV>skinMapper11.ScalarVisibilityOff();</DIV>
<DIV></FONT><FONT color=#008000 size=2>//vtkActor skin11 = new vtkActor();</DIV></FONT><FONT size=2>
<DIV>skin11.SetMapper(skinMapper11);</DIV>
<DIV>skin11.GetProperty().SetColor(1.0, 1.0, .9412);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2> smoother21 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2>();</DIV>
<DIV>smoother21.SetInputConnection(reader21.GetOutputPort());</DIV>
<DIV>smoother21.SetNumberOfIterations(10);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2> skinNormals21 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2>();</DIV>
<DIV>skinNormals21.SetInputConnection(smoother21.GetOutputPort());</DIV>
<DIV>skinNormals21.SetFeatureAngle(60.0);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2> skinMapper21 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2>();</DIV>
<DIV>skinMapper21.SetInputConnection(skinNormals21.GetOutputPort());</DIV>
<DIV>skinMapper21.ScalarVisibilityOff();</DIV>
<DIV></FONT><FONT color=#008000 size=2>//vtkActor skin21 = new vtkActor();</DIV></FONT><FONT size=2>
<DIV>skin21.SetMapper(skinMapper21);</DIV>
<DIV>skin21.GetProperty().SetColor(1.0, 1.0, .9412);</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2> smoother31 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2>();</DIV>
<DIV>smoother31.SetInputConnection(reader31.GetOutputPort());</DIV>
<DIV>smoother31.SetNumberOfIterations(10);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2> skinNormals31 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2>();</DIV>
<DIV>skinNormals31.SetInputConnection(smoother31.GetOutputPort());</DIV>
<DIV>skinNormals31.SetFeatureAngle(60.0);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2> skinMapper31 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2>();</DIV>
<DIV>skinMapper31.SetInputConnection(skinNormals31.GetOutputPort());</DIV>
<DIV>skinMapper31.ScalarVisibilityOff();</DIV>
<DIV></FONT><FONT color=#008000 size=2>//vtkActor skin31 = new vtkActor();</DIV></FONT><FONT size=2>
<DIV>skin31.SetMapper(skinMapper31);</DIV>
<DIV>skin31.GetProperty().SetColor(1.0, 1.0, .9412);</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2> smoother41 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2>();</DIV>
<DIV>smoother41.SetInputConnection(reader41.GetOutputPort());</DIV>
<DIV>smoother41.SetNumberOfIterations(10);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2> skinNormals41 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2>();</DIV>
<DIV>skinNormals41.SetInputConnection(smoother41.GetOutputPort());</DIV>
<DIV>skinNormals41.SetFeatureAngle(60.0);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2> skinMapper41 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2>();</DIV>
<DIV>skinMapper41.SetInputConnection(skinNormals41.GetOutputPort());</DIV>
<DIV>skinMapper41.ScalarVisibilityOff();</DIV>
<DIV></FONT><FONT color=#008000 size=2>//vtkActor skin41 = new vtkActor();</DIV></FONT><FONT size=2>
<DIV>skin41.SetMapper(skinMapper41);</DIV>
<DIV>skin41.GetProperty().SetColor(1.0, 1.0, .9412);</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2> smoother51 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2>();</DIV>
<DIV>smoother51.SetInputConnection(reader51.GetOutputPort());</DIV>
<DIV>smoother51.SetNumberOfIterations(10);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2> skinNormals51 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2>();</DIV>
<DIV>skinNormals51.SetInputConnection(smoother51.GetOutputPort());</DIV>
<DIV>skinNormals51.SetFeatureAngle(60.0);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2> skinMapper51 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2>();</DIV>
<DIV>skinMapper51.SetInputConnection(skinNormals51.GetOutputPort());</DIV>
<DIV>skinMapper51.ScalarVisibilityOff();</DIV>
<DIV></FONT><FONT color=#008000 size=2>//vtkActor skin51 = new vtkActor();</DIV></FONT><FONT size=2>
<DIV>skin51.SetMapper(skinMapper51);</DIV>
<DIV>skin51.GetProperty().SetColor(1.0, 1.0, .9412);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2> smoother61 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2>();</DIV>
<DIV>smoother61.SetInputConnection(reader61.GetOutputPort());</DIV>
<DIV>smoother61.SetNumberOfIterations(10);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2> skinNormals61 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2>();</DIV>
<DIV>skinNormals61.SetInputConnection(smoother61.GetOutputPort());</DIV>
<DIV>skinNormals61.SetFeatureAngle(60.0);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2> skinMapper61 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2>();</DIV>
<DIV>skinMapper61.SetInputConnection(skinNormals61.GetOutputPort());</DIV>
<DIV>skinMapper61.ScalarVisibilityOff();</DIV>
<DIV></FONT><FONT color=#008000 size=2>//vtkActor skin61 = new vtkActor();</DIV></FONT><FONT size=2>
<DIV>skin61.SetMapper(skinMapper61);</DIV>
<DIV>skin61.GetProperty().SetColor(1.0, 1.0, .9412);</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2> smoother71 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2>();</DIV>
<DIV>smoother71.SetInputConnection(reader71.GetOutputPort());</DIV>
<DIV>smoother71.SetNumberOfIterations(10);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2> skinNormals71 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2>();</DIV>
<DIV>skinNormals71.SetInputConnection(smoother71.GetOutputPort());</DIV>
<DIV>skinNormals71.SetFeatureAngle(60.0);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2> skinMapper71 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2>();</DIV>
<DIV>skinMapper71.SetInputConnection(skinNormals71.GetOutputPort());</DIV>
<DIV>skinMapper71.ScalarVisibilityOff();</DIV>
<DIV></FONT><FONT color=#008000 size=2>//vtkActor skin71 = new vtkActor();</DIV></FONT><FONT size=2>
<DIV>skin71.SetMapper(skinMapper71);</DIV>
<DIV>skin71.GetProperty().SetColor(1.0, 1.0, .9412);</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2> smoother81 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkSmoothPolyDataFilter</FONT><FONT size=2>();</DIV>
<DIV>smoother81.SetInputConnection(reader81.GetOutputPort());</DIV>
<DIV>smoother81.SetNumberOfIterations(10);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2> skinNormals81 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataNormals</FONT><FONT size=2>();</DIV>
<DIV>skinNormals81.SetInputConnection(smoother81.GetOutputPort());</DIV>
<DIV>skinNormals81.SetFeatureAngle(60.0);</DIV>
<DIV></FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2> skinMapper81 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkPolyDataMapper</FONT><FONT size=2>();</DIV>
<DIV>skinMapper81.SetInputConnection(skinNormals81.GetOutputPort());</DIV>
<DIV></FONT><FONT color=#008000 size=2>//skinMapper81.ScalarVisibilityOff();</DIV></FONT><FONT size=2>
<DIV></FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2> skin81 = </FONT><FONT color=#0000ff size=2>new</FONT><FONT size=2> </FONT><FONT color=#2b91af size=2>vtkActor</FONT><FONT size=2>();</DIV>
<DIV>skin81.SetMapper(skinMapper81);</DIV>
<DIV>skin81.GetProperty().SetColor(1.0, 1.0, .9412);</DIV>
<DIV></FONT><FONT color=#808080 size=2>///</FONT><FONT color=#008000 size=2> vtkRenderer ManRender = new vtkRenderer();</DIV></FONT><FONT size=2>
<DIV>ren1.AddActor(skin11);</DIV>
<DIV>ren1.AddActor(skin21);</DIV>
<DIV>ren1.AddActor(skin31);</DIV>
<DIV>ren1.AddActor(skin41);</DIV>
<DIV>ren1.AddActor(skin51);</DIV>
<DIV>ren1.AddActor(skin61);</DIV>
<DIV>ren1.AddActor(skin71);</DIV>
<DIV>ren1.AddActor(skin81);</DIV>
<DIV>&nbsp;</DIV>
<DIV>ren1.SetBackground(0.1, 0.2, 0.4);</DIV>
<DIV>renWin1.AddRenderer(ren1);</DIV>
<DIV>&nbsp;</DIV>
<DIV></FONT><FONT color=#008000 size=2>// vtkRenderWindowInteractor iren = new vtkRenderWindowInteractor();</DIV></FONT><FONT size=2>
<DIV>iren.SetRenderWindow(renWin1);</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> button3_Click(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#0000ff size=2>switch</FONT><FONT size=2> (listBox1.SelectedIndex)</DIV>
<DIV>{</DIV>
<DIV></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> 0:</DIV>
<DIV>{</DIV>
<DIV></DIV>
<DIV>BoxWeidget(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.vtkFormsWindowControl1.GetRenderWindow(), skin11);</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</DIV>
<DIV></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> 1:</DIV>
<DIV>{</DIV>
<DIV>BoxWeidget(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.vtkFormsWindowControl1.GetRenderWindow(), skin21);</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</DIV>
<DIV></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> 2:</DIV>
<DIV>{</DIV>
<DIV>BoxWeidget(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.vtkFormsWindowControl1.GetRenderWindow(), skin31);</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</DIV>
<DIV></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> 3:</DIV>
<DIV>{</DIV>
<DIV>BoxWeidget(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.vtkFormsWindowControl1.GetRenderWindow(), skin41);</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</DIV>
<DIV></FONT><FONT color=#0000ff size=2>case</FONT><FONT size=2> 4:</DIV>
<DIV>{</DIV>
<DIV>BoxWeidget(</FONT><FONT color=#0000ff size=2>this</FONT><FONT size=2>.vtkFormsWindowControl1.GetRenderWindow(), skin51);</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</DIV>
<DIV></FONT><FONT color=#0000ff size=2>default</FONT><FONT size=2>:</DIV>
<DIV></FONT><FONT color=#2b91af size=2>MessageBox</FONT><FONT size=2>.Show(</FONT><FONT color=#a31515 size=2>"Please select the distance you want to show from the list"</FONT><FONT size=2>);</DIV>
<DIV></FONT><FONT color=#0000ff size=2>break</FONT><FONT size=2>;</DIV>
<DIV>}</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> label1_Click(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</DIV>
<DIV>{</DIV>
<DIV>}</DIV>
<DIV></FONT><FONT color=#0000ff size=2>private</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> listBox1_SelectedIndexChanged(</FONT><FONT color=#0000ff size=2>object</FONT><FONT size=2> sender, </FONT><FONT color=#2b91af size=2>EventArgs</FONT><FONT size=2> e)</DIV>
<DIV>{</DIV>
<DIV>}</DIV>
<DIV>}</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>}</DIV>
<DIV></DIV></FONT></td></tr></table><br>