<div dir="ltr">Thanks for the direction. I am did the following: (myvtkPoints are points representative of a contour line which I want to resample with a given density):<div><br></div><div><div> density = 100;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkPoints> dense_points; </div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkPoints> sparse_points = myvtkPoints</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkKochanekSpline> spline_type = vtkSmartPointer<vtkKochanekSpline>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>spline_type->SetDefaultContinuity(0.5);</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkPolyData> sparse_poly = vtkSmartPointer<vtkPolyData>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>sparse_poly->SetPoints(sparse_points);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>sparse_poly->Update();</div><div><br></div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkSplineFilter> spline_filter = vtkSmartPointer<vtkSplineFilter>::New();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>spline_filter->SetSpline(spline_type);</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>spline_filter->SetInput(sparse_poly);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>spline_filter->SetSubdivideToSpecified();</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>spline_filter->SetNumberOfSubdivisions(density);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>spline_filter->Update();</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>vtkSmartPointer<vtkPolyData> dense_poly = spline_filter->GetOutput();</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>dense_points = dense_poly->GetPoints(); //FAILS HERE: dense_points is NULL</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int number_of_sparse_points = sparse_points->GetNumberOfPoints();</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>int number_of_dense_points = dense_points->GetNumberOfPoints();</div>
<div><br></div><div>Could someone please tell me if I am doing something conceptually wrong here? </div><div><br></div><div>Thanks,</div><div>Prathamesh</div><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 12:27 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com">bill.lorensen@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Look at this example:<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/PolyData/FitSplineToCutterOutput" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/PolyData/FitSplineToCutterOutput</a><br>
it resamples contour lines using splines.<br>
<div><div></div><div class="h5"><br>
<br>
On Thu, Jul 22, 2010 at 12:38 PM, Prathamesh Kulkarni<br>
<<a href="mailto:prathameshmkulkarni@gmail.com">prathameshmkulkarni@gmail.com</a>> wrote:<br>
><br>
> Hello all,<br>
><br>
> I have a set of points which represent a contour line. I want to be able to<br>
> resample them to a given density. I have looked at vvtkSheperdMethod<br>
> documentation but could not find a method similar SetDensity() for its<br>
> source.<br>
><br>
> What would be the best way to resample a contour data?<br>
><br>
><br>
> Thanks,<br>
> Prathamesh<br>
><br>
</div></div><div><div></div><div class="h5">> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at:<br>
> <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><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>
><br>
</div></div></blockquote></div><br></div></div>