Do you have multiple versions of VTK dll&#39;s in your PATH?<div><br></div><div>What is the output in the Visual Studio output window when you run your program in the debugger? Does it really indicate that VTK 5.2 dlls are getting loaded?</div>
<div><br><br><div class="gmail_quote">On Thu, Oct 23, 2008 at 4:25 PM, Ming Chao <span dir="ltr">&lt;<a href="mailto:mingchao2005@gmail.com">mingchao2005@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi,<div><br></div><div>A couple of weeks ago I posted a problem with the GetNumberOfPoints() when doing the following:</div><div><br></div><div>&nbsp;&nbsp;<span style="white-space:pre">        </span>vtkPolyDataReader *contourReader = vtkPolyDataReader::New();</div>

<div><span style="white-space:pre">        </span>contourReader-&gt;SetFileName( &quot;Test.vtk&quot; ); // test contour file in vtk format</div><div><span style="white-space:pre">        </span>contourReader-&gt;Update();</div>
<div><br></div><div><span style="white-space:pre">        </span>vtkPolyData *poly = vtkPolyData::New();</div><div><span style="white-space:pre">        </span>poly-&gt;DeepCopy( contourReader-&gt;GetOutput() );</div>
<div><br></div><div><span style="white-space:pre">        </span>vtkPoints *points = poly-&gt;GetPoints();</div><div><span style="white-space:pre">        </span>int NumberOfTotalPoints = points-&gt;GetNumberOfPoints(); &lt;======= &nbsp;here the problem occurs!!!!</div>

<div><br></div><div>I am using the latest version 5.2.0 and visual studio 7. The compiling and linking are fine, but when running the executable there was an error. I tried to debug, and found that the break point in file crtexe.c at</div>

<div><br></div><div><div>#ifdef WPRFLAG</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;__winitenv = envp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mainret = wmain(argc, argv, envp);</div><div>#else &nbsp;/* WPRFLAG */</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;__initenv = envp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mainret = main(argc, argv, envp); &nbsp; &nbsp;&lt;================= break point !!!</div>

<div>#endif &nbsp;/* WPRFLAG */</div><div><br></div><div>#endif &nbsp;/* _WINMAIN_ */</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ( !managedapp )</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit(mainret);</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;_cexit();</div>

<div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</div></div><div><br></div><div>When I was running the same code using older version vtk (before 5.0 release), everything was fine. Is there any change in vtkPoints?&nbsp;</div><div><br></div><div>

I need to use this function urgently. I could not fine a workaround. Thanks again for any suggestion and help.</div><div><br></div><font color="#888888"><div>Ming</div><div><br></div>
</font><br>_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a 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 href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>