<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 dear ITK and VTK users;</DIV>
<DIV>&nbsp;</DIV>
<DIV>First I converted vtk polydata to itk mesh format. After some processing I want to reconvert itk mesh to vtk polydata format. TO implement that I found an code through the internet. It seems good,But one line it gives an error,I couldn't understand reason of that. Could any one help me on that problem. It will be really appreciated help for me. </DIV>
<DIV>Here is the code and I indicated the line which gives error</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT color=#0000ff>&nbsp;<STRONG>//Creat a new vtkPolyData</STRONG></FONT><BR>&nbsp; vtkPolyData* newPolyData = vtkPolyData::New();<BR><BR>&nbsp; //Creat vtkPoints for insertion into newPolyData<BR>&nbsp; vtkPoints *points = vtkPoints::New();<BR>&nbsp; std::cout&lt;&lt;"Points = "&lt;&lt;mesh-&gt;GetNumberOfPoints()&lt;&lt;std::endl;<BR><BR>&nbsp; //Copy all points into the vtkPolyData structure</DIV>
<DIV>typedef MeshType::PointsContainer::ConstIterator&nbsp; PointIterator;<BR>&nbsp; PointIterator pntIterator = mesh-&gt;GetPoints()-&gt;Begin();<BR>&nbsp; PointIterator pntItEnd = mesh-&gt;GetPoints()-&gt;End();<BR>&nbsp; for (int i = 0; pntIterator != pntItEnd; ++i, ++pntIterator)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; ItkPoint pnt = pntIterator.Value();&nbsp;<FONT color=#ff0000 size=4> //Here it says <EM>ItkPoint</EM> is undeclared identifier ,how&nbsp; should I define that</FONT><BR>&nbsp;&nbsp;&nbsp; points-&gt;InsertPoint(i, pnt[0], pnt[1], pnt[2]);<BR>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cout&lt;&lt;i&lt;&lt;"-th point:&nbsp; ";<BR>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cout&lt;&lt;pnt[0]&lt;&lt;std::endl;<BR>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cout&lt;&lt;"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&lt;&lt;pntIterator.Value()&lt;&lt;std::endl;<BR>//&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 ++pntIterator;<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; newPolyData-&gt;SetPoints(points);<BR>&nbsp; points-&gt;Delete();<BR><BR>&nbsp; //Copy all cells into the vtkPolyData structure<BR>&nbsp; //Creat vtkCellArray into which the cells are copied<BR>&nbsp; vtkCellArray* triangle = vtkCellArray::New();<BR>&nbsp; CellIterator cellIt = mesh-&gt;GetCells()-&gt;Begin();<BR>&nbsp; CellIterator cellItEnd = mesh-&gt;GetCells()-&gt;End();<BR>&nbsp; for (int it = 0; cellIt != cellItEnd; ++it, ++cellIt)<BR>&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp; CellType * cellptr = cellIt.Value();<BR>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; LineType * line = dynamic_cast&lt;LineType *&gt;( cellptr );<BR>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; line-&gt;GetNumberOfPoints() &lt;&lt; std::endl;<BR>&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cout &lt;&lt; cellptr-&gt;GetNumberOfPoints() &lt;&lt; std::endl;<BR>&nbsp;&nbsp;&nbsp; PointIdIterator pntIdIter =
 cellptr-&gt;PointIdsBegin();<BR>&nbsp;&nbsp;&nbsp; PointIdIterator pntIdEnd = cellptr-&gt;PointIdsEnd();<BR>&nbsp;&nbsp;&nbsp; vtkIdList* pts = vtkIdList::New();<BR>&nbsp;&nbsp;&nbsp; for (; pntIdIter != pntIdEnd; ++pntIdIter)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; pts-&gt;InsertNextId( *pntIdIter );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; std::cout&lt;&lt;"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "&lt;&lt;tempCell[it1]&lt;&lt;std::endl;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; triangle-&gt;InsertNextCell(pts);<BR>&nbsp;&nbsp;&nbsp; }<BR>&nbsp; newPolyData-&gt;SetPolys(triangle);<BR>&nbsp; triangle-&gt;Delete();<BR><BR>&nbsp;</DIV></div><br>

<hr size=1>TV dinner still cooling?<br><a href="http://us.rd.yahoo.com/evt=49979/*http://tv.yahoo.com/">Check out "Tonight's Picks"</a> on Yahoo! TV.</body></html>