<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"><FONT face="Times New Roman">I have posted my question yesterday but nobody answer me yet, …could you please have a look on my problem and tell me how I can resolve it. Many thanks <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">Hi, </SPAN><SPAN style="COLOR: #333333"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">I have extracted a surface from a segmented object. The mesh is an instance of the </SPAN><SPAN style="COLOR: #333333"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">QuadEdgeMesh class as I’m going to use the </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: maroon; mso-ansi-language: EN-GB">itkQuadEdgeMeshDiscreteGaussianCurvatureEstimator</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> later in order to extract the curvature.</SPAN><SPAN style="COLOR: #333333"><FONT size=3> <o:p></o:p></FONT></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">When I visualize the extracted mesh it’s simply a black image. But if I change the type of the mesh from itkQuadEdgeMesh to itk::Mesh, it works fine and I can visualize the extracted surface.</SPAN><SPAN style="COLOR: #333333"><FONT size=3> <o:p></o:p></FONT></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> </SPAN><SPAN style="COLOR: #333333"><FONT size=3> <o:p></o:p></FONT></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">So not working with a mesh of type:</SPAN><SPAN style="COLOR: #333333"><FONT size=3> <o:p></o:p></FONT></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">typedef</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> QuadEdgeMeshExtendedTraits <</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB"> double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, 3, 2, </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language:
EN-GB">double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">bool</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">bool</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> > Traits;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">typedef</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> QuadEdgeMesh<</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB"> double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, 3, Traits > MeshType;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">but working with: </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">typedef</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> itk::Mesh<</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, 3,itk::DefaultStaticMeshTraits< </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, 3, 3, </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language: EN-GB">double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">, </SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: blue; mso-ansi-language:
EN-GB">double</SPAN><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> > > MeshType;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">For the visualization I use the same procedure as in vtk2itk code.</SPAN><SPAN style="COLOR: #333333"><FONT size=3> <o:p></o:p></FONT></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB"> </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: #333333; FONT-FAMILY: Arial"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">Do you have any idea about the cause of this problem? </SPAN><SPAN style="COLOR: #333333"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>I past my code here.</FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman" size=3>Thank you </FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">Regards </SPAN><SPAN style="COLOR: #333333"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; LINE-HEIGHT: 14.4pt"><FONT face="Times New Roman"><SPAN lang=EN-GB style="FONT-SIZE: 11pt; COLOR: #333333; mso-ansi-language: EN-GB">Martine.</SPAN><SPAN style="COLOR: #333333"><o:p></o:p></SPAN></FONT></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">//-------Surface extraction from a segmented object and mesh(the extracted surface) visualization <o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkImageFileReader.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkBinaryMask3DMeshSource.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkImage.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkMesh.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadEdgeMesh.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkVTKPolyDataReader.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadEdgeMeshExtendedTraits.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadEdgeMeshScalarDataVTKPolyDataWriter.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadEdgeMeshDiscreteGaussianCurvatureEstimator.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadEdgeMeshDiscreteMeanCurvatureEstimator.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadEdgeMeshDiscreteMinCurvatureEstimator.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadEdgeMeshDiscreteMaxCurvatureEstimator.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadEdgeMeshScalarDataVTKPolyDataWriter.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon"><iostream><o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkTriangleCell.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"itkQuadrilateralCell.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkDataSetWriter.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkDataSetMapper.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkRenderer.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkRenderWindow.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkActor.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkRenderWindowInteractor.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkDataSetReader.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkUnstructuredGrid.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkDataSet.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">#include</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: maroon">"vtkCellArray.h"<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: maroon; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">using</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: blue">namespace</SPAN> itk;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">typedef</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> <SPAN style="COLOR: blue">double</SPAN> CoordType;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">typedef</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> QuadEdgeMeshExtendedTraits < CoordType, 3,<SPAN style="mso-spacerun: yes"> </SPAN>2, CoordType, CoordType,<SPAN style="mso-spacerun: yes"> </SPAN>CoordType,<SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">bool</SPAN>, <SPAN style="COLOR: blue">bool</SPAN> > Traits;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">typedef</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> QuadEdgeMesh< CoordType, 3, Traits > MeshType;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">//typedef itk::Mesh<double, 3,itk::DefaultStaticMeshTraits< double, 3, 3, double, double > > MeshType;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">void</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> Display(vtkUnstructuredGrid* itkgrid)<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN lang=DE style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: DE; mso-no-proof: yes">{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN lang=DE style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: DE; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkRenderer* ren1 = vtkRenderer::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN lang=DE style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: DE; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkRenderWindow* renWin = vtkRenderWindow::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN lang=DE style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-ansi-language: DE; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">renWin->AddRenderer(ren1);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkRenderWindowInteractor* inter = vtkRenderWindowInteractor::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>inter->SetRenderWindow(renWin);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkDataSetMapper* mapper = vtkDataSetMapper::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>mapper->SetInput(itkgrid);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkActor* actor = vtkActor::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>actor->SetMapper(mapper);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>ren1->AddActor(actor);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>renWin->Render();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>inter->Start();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>mapper->Delete();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>actor->Delete();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>ren1->Delete();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>renWin->Delete();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">class</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> VistVTKCellsClass<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkCellArray* m_Cells;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">int</SPAN>* m_LastCell;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">int</SPAN>* m_TypeArray;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">public</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">:<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// typedef the itk cells we are interested in<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">typedef</SPAN> itk::CellInterface<MeshType::PixelType,MeshType::CellTraits ><SPAN style="mso-spacerun: yes"> </SPAN>CellInterfaceType;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">typedef</SPAN> itk::TriangleCell<CellInterfaceType><SPAN style="mso-spacerun: yes"> </SPAN>floatTriangleCell;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">typedef</SPAN> itk::QuadrilateralCell<CellInterfaceType> floatQuadrilateralCell;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Set the vtkCellArray that will be constructed<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">void</SPAN> SetCellArray(vtkCellArray* a) <o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>m_Cells = a;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Set the cell counter pointer<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">void</SPAN> SetCellCounter(<SPAN style="COLOR: blue">int</SPAN>* i)<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>m_LastCell = i;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Set the type array for storing the vtk cell types<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">void</SPAN> SetTypeArray(<SPAN style="COLOR: blue">int</SPAN>* i)<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>m_TypeArray = i;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Visit a triangle and create the VTK_TRIANGLE cell <o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">void</SPAN> Visit(<SPAN style="COLOR: blue">unsigned</SPAN> <SPAN style="COLOR: blue">long</SPAN>, floatTriangleCell* t)<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>m_Cells->InsertNextCell(3,<SPAN style="mso-spacerun: yes"> </SPAN>(vtkIdType*)t->PointIdsBegin());<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>m_TypeArray[*m_LastCell] = VTK_TRIANGLE;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>(*m_LastCell)++;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Visit a triangle and create the VTK_QUAD cell <o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">void</SPAN> Visit(<SPAN style="COLOR: blue">unsigned</SPAN> <SPAN style="COLOR: blue">long</SPAN>, floatQuadrilateralCell* t)<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>m_Cells->InsertNextCell(4,<SPAN style="mso-spacerun: yes"> </SPAN>(vtkIdType*)t->PointIdsBegin());<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>m_TypeArray[*m_LastCell] = VTK_QUAD;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>(*m_LastCell)++;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">};<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">typedef</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> itk::CellInterfaceVisitorImplementation<vtkFloatingPointType, MeshType::CellTraits,itk::TriangleCell< itk::CellInterface<MeshType::PixelType, MeshType::CellTraits > >, <o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>VistVTKCellsClass> TriangleVisitor;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">typedef</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> itk::CellInterfaceVisitorImplementation<vtkFloatingPointType, MeshType::CellTraits,itk::QuadrilateralCell< itk::CellInterface<MeshType::PixelType, MeshType::CellTraits > >, <o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>VistVTKCellsClass> QuadrilateralVisitor;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">vtkUnstructuredGrid* MeshToUnstructuredGrid(MeshType* mesh)<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Get the number of points in the mesh<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">int</SPAN> numPoints = mesh->GetNumberOfPoints();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">if</SPAN>(numPoints == 0)<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>mesh->Print(std::cerr);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>std::cerr << <SPAN style="COLOR: maroon">"no points in Grid "</SPAN> << std::endl;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>exit(-1);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Create a vtkUnstructuredGrid<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkUnstructuredGrid* vgrid = vtkUnstructuredGrid::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Create the vtkPoints object and set the number of points<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkPoints* vpoints = vtkPoints::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vpoints->SetNumberOfPoints(numPoints);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// iterate over all the points in the itk mesh filling in<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// the vtkPoints object as we go<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>MeshType::PointsContainer::Pointer points = mesh->GetPoints();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">for</SPAN>(MeshType::PointsContainer::Iterator i = points->Begin();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>i != points->End(); ++i)<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Get the point index from the point container iterator<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">int</SPAN> idx = i->Index();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Set the vtk point at the index with the the coord array from itk<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// itk returns a const pointer, but vtk is not const correct, so<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// we have to use a const cast to get rid of the const<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vpoints->SetPoint(idx, <SPAN style="COLOR: blue">const_cast</SPAN><vtkFloatingPointType*>(i->Value().GetDataPointer()));<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Set the points on the vtk grid<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vgrid->SetPoints(vpoints);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Now create the cells using the MulitVisitor<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// 1. Create a MultiVisitor<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>MeshType::CellType::MultiVisitor::Pointer mv = MeshType::CellType::MultiVisitor::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// 2. Create a triangle and quadrilateral visitor<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>TriangleVisitor::Pointer tv = TriangleVisitor::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>QuadrilateralVisitor::Pointer qv =<SPAN style="mso-spacerun: yes"> </SPAN>QuadrilateralVisitor::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// 3. Set up the visitors<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">int</SPAN> vtkCellCount = 0; <SPAN style="COLOR: green">// running counter for current cell being inserted into vtk<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">int</SPAN> numCells = mesh->GetNumberOfCells();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">int</SPAN> *types = <SPAN style="COLOR: blue">new</SPAN> <SPAN style="COLOR: blue">int</SPAN>[numCells]; <SPAN style="COLOR: green">// type array for vtk <o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// create vtk cells and estimate the size<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkCellArray* cells = vtkCellArray::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>cells->EstimateSize(numCells, 4);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Set the TypeArray CellCount and CellArray for both visitors<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>tv->SetTypeArray(types);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>tv->SetCellCounter(&vtkCellCount);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>tv->SetCellArray(cells);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>qv->SetTypeArray(types);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>qv->SetCellCounter(&vtkCellCount);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>qv->SetCellArray(cells);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// add the visitors to the multivisitor<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>mv->AddVisitor(tv);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>mv->AddVisitor(qv);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Now ask the mesh to accept the multivisitor which<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// will Call Visit for each cell in the mesh that matches the<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// cell types of the visitors added to the MultiVisitor<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>mesh->Accept(mv);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Now set the cells on the vtk grid with the type array and cell array<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vgrid->SetCells(types, cells);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// Clean up vtk objects (no vtkSmartPointer ... )<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>cells->Delete();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vpoints->Delete();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">// return the vtkUnstructuredGrid<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">return</SPAN> vgrid;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">int</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> main(<SPAN style="COLOR: blue">void</SPAN> ) <o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">{ <o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">//1---------- surface extraction from a segmented 3D object<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">const</SPAN> <SPAN style="COLOR: blue">unsigned</SPAN> <SPAN style="COLOR: blue">int</SPAN> Dimension = 3;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">typedef</SPAN> <SPAN style="COLOR: blue">float</SPAN><SPAN style="mso-spacerun: yes"> </SPAN>PixelType; <o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">typedef</SPAN> itk::Image< PixelType, Dimension ><SPAN style="mso-spacerun: yes"> </SPAN>ImageType;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">typedef</SPAN> itk::ImageFileReader< ImageType ><SPAN style="mso-spacerun: yes"> </SPAN>ReaderType;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>ReaderType::Pointer reader = ReaderType::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">typedef</SPAN> itk::BinaryMask3DMeshSource< ImageType, MeshType ><SPAN style="mso-spacerun: yes"> </SPAN>MeshSourceType;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>MeshSourceType::Pointer meshSource = MeshSourceType::New();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>reader->SetFileName(<SPAN style="COLOR: maroon">"C:/Images/ConfiConnect_brainweb165a10f17_whiteMatter.hdr"</SPAN>);<SPAN style="mso-tab-count: 1"> </SPAN><SPAN style="COLOR: green">// a segmented volume<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">try<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>reader->Update();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">catch</SPAN>( itk::ExceptionObject & exp )<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>std::cerr << <SPAN style="COLOR: maroon">"Exception thrown while reading the input file "</SPAN> << std::endl;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>std::cerr << exp << std::endl;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">return</SPAN> EXIT_FAILURE;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">const</SPAN> PixelType objectValue = <SPAN style="COLOR: blue">static_cast</SPAN><PixelType>( 255); <o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>meshSource->SetObjectValue( objectValue );<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>meshSource->SetInput( reader->GetOutput() );<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">try<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>meshSource->Update();<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">catch</SPAN>( itk::ExceptionObject & exp )<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>std::cerr << <SPAN style="COLOR: maroon">"Exception thrown during Update() "</SPAN> << std::endl;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>std::cerr << exp << std::endl;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">return</SPAN> EXIT_FAILURE;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>std::cout << <SPAN style="COLOR: maroon">"Nodes = "</SPAN> << meshSource->GetNumberOfNodes() << std::endl;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>std::cout << <SPAN style="COLOR: maroon">"Cells = "</SPAN> << meshSource->GetNumberOfCells() << std::endl;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">//2---------- Mesh (extracted surface)visualization<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>vtkUnstructuredGrid* grid = MeshToUnstructuredGrid(meshSource->GetOutput()); <SPAN style="COLOR: green">// display the initial sphere<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN>Display(grid);<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: green">//3----------------Curvature estimation<o:p></o:p></SPAN></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; COLOR: green; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="COLOR: blue">return</SPAN> EXIT_SUCCESS;<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">}<o:p></o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><o:p> </o:p></SPAN></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman" size=3> </FONT></o:p></DIV></td></tr></table><br>