<br>Uhm not sure but maybe you need to check something like <font size="-1">vtkContourFilter ?<br>I don't know what you want to do... i play mostly with vtkTransformPolyDataFiler <br>or vtkTransformFilter. They both return structured polydata. <br><br></font><b><i>学志 杨 <shulo1978@hotmail.com></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> <br>Thank you. It does work. By the way, do you know any filter like <br>threshfilter can filter vtkPolyData but return structured polydata instead <br>of unstructured? Cheers<br><br>>From: Emmanouil Moschidis <moshman65@yahoo.com><br>>To: "学志" "杨" <shulo1978@hotmail.com><br>>CC: vtkusers@vtk.org<br>>Subject: Re: [vtkusers] how to construct vktCell with vtkPoints<br>>Date: Tue, 1 May 2007 04:38:33 -0700 (PDT)<br>><br>>Hi<br>>this is a piece of code that should work...<br>><br>> vtkPoints *cloudPoints=new
vtkPoints;<br>> vtkCellArray *cloudCells=new vtkCellArray;<br>> vtkPolyData *cloudPData=new vtkPolyData;<br>><br>><br>> cloudPoints->SetDataTypeToDouble();<br>> cloudPoints->SetNumberOfPoints(numberOfVTKPoints);<br>><br>><br>> for(int i=0; i<(numberOfVTKCells*3); i++)<br>> {<br>> <br>>cloudPoints->SetPoint(i,vtkStoredPointsBuffer[i].getX(),vtkStoredPointsBuffer[i].getY(),vtkStoredPointsBuffer[i].getZ());<br>><br>> }<br>><br>><br>> cloudCells->InsertNextCell(numberOfVTKPoints);<br>><br>><br>> for (int i=0; i<numberOfVTKPoints; i++)=""><br>> {<br>> cloudCells->InsertCellPoint(i);<br>> }<br>><br>><br>> cloudPData->SetPoints(cloudPoints);<br>> cloudPData->SetLines(cloudCells);<br>><br>><br>>the only weird thing you may see is these getX(), getY(), getZ() methods. <br>>The reason why i use these
methods is that i store my points in <br>>std::vector<Point3D><br>>where Point3D is a custom class for 3D points (in your case you use <br>>vtkPoints).<br>><br>>Try it and tell me if it worked. I am not 100% this is the correct way <br>>though<br>><br>>Good luck :-)<br>><br>><br>><br>>学志 杨 <shulo1978@hotmail.com> wrote: Hi all, I extract vtkpoints from a <br>>polydata and want to reconstruct them<br>>back into vtkCell. Can anyone give me some hint to do this? The points are<br>>taken out based on some conditions so I can't use getCell from vtkpolydata<br>>to take the cell straignthaway. Thank you!<br>><br>>_________________________________________________________________<br>>Could you be the guest MSN Movies presenter? Click Here to Audition<br>>http://www.lightscameraaudition.co.uk<br>><br>>_______________________________________________<br>>This is the private VTK discussion list.<br>>Please keep
messages on-topic. Check the FAQ at: <br>>http://www.vtk.org/Wiki/VTK_FAQ<br>>Follow this link to subscribe/unsubscribe:<br>>http://www.vtk.org/mailman/listinfo/vtkusers<br>><br>><br>><br>>---------------------------------<br>>Ahhh...imagining that irresistible "new car" smell?<br>> Check outnew cars at Yahoo! Autos.<br><br>_________________________________________________________________<br>Txt a lot? Get Messenger FREE on your mobile. <br>https://livemessenger.mobile.uk.msn.com/<br><br></shulo1978@hotmail.com></Point3D></numberOfVTKPoints;></shulo1978@hotmail.com></moshman65@yahoo.com></blockquote><br><p> 
<hr size=1>Ahhh...imagining that irresistible "new car" smell?<br> Check out
<a href="http://us.rd.yahoo.com/evt=48245/*http://autos.yahoo.com/new_cars.html;_ylc=X3oDMTE1YW1jcXJ2BF9TAzk3MTA3MDc2BHNlYwNtYWlsdGFncwRzbGsDbmV3LWNhcnM-">new cars at Yahoo! Autos.</a>