<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2604" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=619202119-25042005>I am wondering 
if&nbsp;ITK have this functionality or I have to resort from VTK.&nbsp; I have 
build a 3-D mesh surface.&nbsp; Now I want to cut it and get contours.&nbsp; I 
tried with VTK functions vtkCutter.&nbsp; However, the "contour" I got is just a 
group of&nbsp;lines without correct ordering.&nbsp; For example, a 
closed&nbsp;contour would be like this 1-&gt;2, 2-&gt;3, 3-&gt;4, 4-&gt;1, but 
what I got was sth like this: 1-&gt;2, 3-&gt;4, 2-&gt;3, 4-&gt;1.&nbsp; I could 
do a scan and switch the sequence.&nbsp; However, I am wondering if ITK or VTK 
have other functions that I could use to get a contour.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN 
class=619202119-25042005></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><SPAN class=619202119-25042005>My code that uses 
vtk class:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=619202119-25042005>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>vtkPlane&nbsp;&nbsp; 
*plane=vtkPlane::New();<BR>plane-&gt;SetOrigin(0, 0, 
0);<BR>plane-&gt;SetNormal(1, 0, 0);</FONT></SPAN></DIV>
<DIV>&nbsp;</DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>vtkCutter&nbsp; 
*cutEdges=vtkCutter::New();<BR>cutEdges-&gt;SetInput(vtkdata);<BR>cutEdges-&gt;SetCutFunction(plane);<BR>cutEdges-&gt;GenerateCutScalarsOn();<BR>cutEdges-&gt;GenerateValues(10, 
0, 50);</FONT></SPAN></DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>vtkPolyDataWriter 
*contourwriter=vtkPolyDataWriter::New();<BR>contourwriter-&gt;SetFileName("contour.vtk");<BR>contourwriter-&gt;SetInput(cutEdges-&gt;GetOutput());<BR>contourwriter-&gt;Update();</FONT></SPAN></DIV></SPAN></FONT></DIV></BODY></HTML>