Hey all,<div><br></div><div>I am new to VTK, and I need a little help from y'all. </div><div><br></div><div>I basically have an ordered set of 3D points stored as vtkPoints. I basically want to filter the outliers, and fit the inliers into a smooth curve.</div>
<div>I haven't figured out how to filter the outliers. But, I am fitting the curves to a kochanek spline and am able to see the output displayed in the renderer.</div><div>But, I am not sure how to get the new set of points back as vtkPoints for processing. </div>
<div><br></div><div>This is what I have.</div><div><br></div><div> vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New();</div><div><br></div><div> /* Do something and populate the points */</div>
<div><br></div><div><div> vtkSmartPointer<vtkParametricSpline> kochanekspline = vtkSmartPointer<vtkParametricSpline>::New();</div><div> vtkSmartPointer<vtkKochanekSpline> kxSpline = vtkSmartPointer<vtkKochanekSpline>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>vtkSmartPointer<vtkKochanekSpline> kySpline = vtkSmartPointer<vtkKochanekSpline>::New();</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>vtkSmartPointer<vtkKochanekSpline> kzSpline = vtkSmartPointer<vtkKochanekSpline>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>kochanekspline->SetPoints(points);
</div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>vtkSmartPointer<vtkParametricFunctionSource> functionSource1 = vtkSmartPointer<vtkParametricFunctionSource>::New();</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>functionSource1->SetParametricFunction(kochanekspline);</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>functionSource1->Update();</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>splineMapper->SetInputConnection(functionSource1->GetOutputPort());</div></div><div><br></div><div>I would like to get the new spline fitted bunch of points back into 'points' or some other similar collection. Any idea how I should go about it?</div>
<div><br></div><div>Thanks in advance.</div>