<div>The statement should read:</div>
<div>itk::Point pnt = pntIterator.Value();&nbsp;<font color="#ff0000" size="4"> </font><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 2/22/07, <b class="gmail_sendername">tony hakki</b> &lt;<a href="mailto:tony2007vtk@yahoo.com">tony2007vtk@yahoo.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div style="FONT-SIZE: 12pt; FONT-FAMILY: times new roman, new york, times, serif">
<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&#39;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;&quot;Points = &quot;&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;&quot;-th point:&nbsp; &quot;;<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;&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&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;&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;&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><span class="ad"><br>&nbsp;</span></div></div><span class="ad"><br>
<hr size="1">
TV dinner still cooling?<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://us.rd.yahoo.com/evt=49979/*http://tv.yahoo.com/" target="_blank">Check out &quot;Tonight&#39;s Picks&quot;</a> on Yahoo! TV.
</span></div><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">
http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br><br></blockquote></div><br>