<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><DIV>hello Luis;</DIV>
<DIV> I would like to tell you about my steps to obtain pointset from stl file.
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">1-I read my STL with VTK</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">2-I converted vtkpolydata to itk mesh</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">3-I tried to obtain pointset from itk mesh with the following code. </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Is these steps true?my registration process gives very nonsense results ,therefore I thought that it is pointset's false. Would you like to add my registration code I can add it.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Thanks in advance</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">Tony</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">here is the code to obtain pointset from a itkmesh.</DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif"><FONT color=#0000ff size=2>
<P>const</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>int</FONT><FONT size=2> Dimension = 3;</P>
<P></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>short</FONT><FONT size=2> PixelType;</P>
<P></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> itk::PointSet< </FONT><FONT color=#0000ff size=2>float</FONT><FONT size=2>, Dimension > FixedPointSetType;</P>
<P></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> itk::Image< PixelType, Dimension > MovingImageType;</P>
<P></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> FixedPointSetType::PointsContainer PointsContainer;</P></FONT><FONT color=#000000 size=2>
<P>itk::PointSet<float, 3>::Pointer pointSet = itk::PointSet<float,3>::New();</P></FONT><FONT size=2>
<P>pointSet->SetPoints(pointsContainer);</P>
<P></FONT><FONT color=#0000ff size=2>unsigned</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>long</FONT><FONT size=2> pointId = 0;</P>
<P></FONT><FONT color=#0000ff size=2>typedef</FONT><FONT size=2> FMeshType::PointsContainer::Iterator PointsIterator;</P>
<P></FONT><FONT color=#008000 size=2> </P></FONT><FONT size=2>
<P>PointsIterator pointIterator = input_mesh->GetPoints()->Begin(); </P>
<P>PointsIterator end = input_mesh->GetPoints()->End();</P>
<P></FONT><FONT color=#0000ff size=2>while</FONT><FONT size=2>( pointIterator != end ) </P>
<P>{</P>
<P>FMeshType::PointType p = pointIterator.Value(); </FONT><FONT color=#008000 size=2>// access the point</P></FONT><FONT size=2>
<P>std::cout << p << std::endl; </FONT><FONT color=#008000 size=2>// print the point</P></FONT><FONT size=2>
<P>pointSet->SetPoint( pointId, p );</FONT><FONT color=#008000 size=2>// advance to next point</P></FONT><FONT size=2>
<P>pointSet->SetPointData( pointId, pointSet->GetBufferedRegion() );</P>
<P>++pointIterator; </P>
<P>++pointId;</P>
<P>}</P></FONT></DIV></DIV></div><br>
<hr size=1>It's here! Your new message!<br>Get
<a href="http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/"> new email alerts</a> with the free <a href="
http://us.rd.yahoo.com/evt=49938/*http://tools.search.yahoo.com/toolbar/features/mail/">Yahoo! Toolbar.</a></body></html>