<!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 ITK have this functionality or I have to resort from VTK. I have
build a 3-D mesh surface. Now I want to cut it and get contours. I
tried with VTK functions vtkCutter. However, the "contour" I got is just a
group of lines without correct ordering. For example, a
closed contour would be like this 1->2, 2->3, 3->4, 4->1, but
what I got was sth like this: 1->2, 3->4, 2->3, 4->1. I could
do a scan and switch the sequence. 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> </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
*plane=vtkPlane::New();<BR>plane->SetOrigin(0, 0,
0);<BR>plane->SetNormal(1, 0, 0);</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>vtkCutter
*cutEdges=vtkCutter::New();<BR>cutEdges->SetInput(vtkdata);<BR>cutEdges->SetCutFunction(plane);<BR>cutEdges->GenerateCutScalarsOn();<BR>cutEdges->GenerateValues(10,
0, 50);</FONT></SPAN></DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=408470019-25042005><FONT face=Arial size=2>vtkPolyDataWriter
*contourwriter=vtkPolyDataWriter::New();<BR>contourwriter->SetFileName("contour.vtk");<BR>contourwriter->SetInput(cutEdges->GetOutput());<BR>contourwriter->Update();</FONT></SPAN></DIV></SPAN></FONT></DIV></BODY></HTML>