vtkusers:<br> Hello, I am trying to translate a 3D reconstruction programme in python to one<br> in c++. When I use vtkProgrammbleSource to get some data for vtkSurfaceReconstru<br>ctorfilter to reconstruct the surface, I get a message from msvc "vtkSurfaceRecon<br>structionFilter (0x051210C8): No points to reconstruct". So I think there may be <br>some mistake about my usage of setExecuteMethod. I find the programme have not c<br>arried out the function "ReadPoints()" I made. Part of my programme is showed bel<br>ow:<br><br><br>vtkProgrammableSource * PSP=vtkProgrammableSource::New();<br>void ReadPoints(void * PSPointer)<br>{<br> float PointsVal[10];<br> FILE * fp1;<br> PSP=(vtkProgrammableSource *) PSPointer;<br> vtkPolyData * OutPut=vtkPolyData::New();<br> vtkPoints * Points =vtkPoints::New();<br> fp1=fopen("data.txt","r");<br><br> rewind(fp1);<br> while(PointsVal[0]!=1000)<br> {<br> fscanf(fp1,"%f %f %f",PointsVal,PointsVal+1,PointsVal+2);        <br> if(PointsVal[0]>1)        break;<br> Points->InsertNextPoint(PointsVal[0],PointsVal[1],PointsVal[2]);<br> }<br><br> OutPut=PSP->GetPolyDataOutput();<br> OutPut->SetPoints(Points);<br>}                                                                                <br><br><br>void main()<br>{ <br> vtkProgrammableSource * PointSource=vtkProgrammableSource::New();<br><br> PointSource->SetExecuteMethod(ReadPoints, (void *) PointSource);//??????????<br> <br> vtkSurfaceReconstructionFilter * Surf=vtkSurfaceReconstructionFilter::New();<br> Surf->SetInput(PSP->GetPolyDataOutput());<br>..............................................<br>.............................................<br>}<br><br> I have tried a lot, but I still can not get a result, could you kindly help me <br>with this?<br> Thanks a lot!! <br><body background="http://images.163.com/images/logo/maillist/vip/background.gif" bgproperties="fixed">
<font style='font-size:9pt'>
<br>
=============================================================<br>
<a target=_blank href='http://popme.163.com/freemail/index.html'><font color=blue>免费邮箱健康杀毒大行动!</a><br>
<a target=_blank href='http://mall.163.com/servlets/productList?name=wgs&category=585009&pageno=1'><font color=blue>飞舞你的精灵 留住你的精彩 精灵全面收费!</a><br>
<a target=_blank href='http://auctions.163.com/auctionsbj/student/index.html '><font color=blue>拍卖站热推新生入学大拍卖!</a><br>