thank you for the prompt reply. I will check that.<br>
<br><br><div class="gmail_quote">On Mon, Sep 17, 2012 at 12:57 PM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Anant,<br>
<br>
The example program that you are trying to run was made for VTK 6. If<br>
you have a copy of the VTK 5.10 source code, look for<br>
Hybrid/Testing/Cxx/TestBSplineWarp.cxx and use that instead.<br>
<br>
The vtkBSplineTransform doesn't manage missing points. For that,<br>
someone would need to add an algorithm to VTK like the one described<br>
in this paper:<br>
<br>
Seungyong Lee, George Wolberg, and Sung Yong Shin,<br>
Scattered Data Interpolation with Multilevel B-Splines<br>
IEEE Transactions on Visualization and Computer Graphics,<br>
Vol. 3, pp. 228-244, 1997<br>
<span class="HOEnZb"><font color="#888888"><br>
- David<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Mon, Sep 17, 2012 at 2:03 AM, Anant Vemuri <<a href="mailto:ajar108@gmail.com">ajar108@gmail.com</a>> wrote:<br>
> Hi David,<br>
><br>
> Thanks... that is exactly what I want to do. I was wondering, how does it<br>
> manage missing points.<br>
><br>
> Another thing, I tried to compile the test program on vtk documentation<br>
> website<br>
><br>
> <a href="http://vtk.org/gitweb?p=VTK.git;a=blob_plain;f=Filters/Hybrid/Testing/Cxx/TestBSplineWarp.cxx" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=blob_plain;f=Filters/Hybrid/Testing/Cxx/TestBSplineWarp.cxx</a><br>
><br>
> and I get an error as,<br>
><br>
> error: ‘class vtkBSplineTransform’ has no member named ‘SetCoefficientData’.<br>
><br>
> Thanks,<br>
> Anant.<br>
><br>
><br>
> On Fri, Sep 14, 2012 at 2:37 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>><br>
>> Hi Anant,<br>
>><br>
>> If you recompute the spline coefficients within the transform's<br>
>> Update() method, then it should provide the sort of pipeline behavior<br>
>> that you are looking for. The following paper describes the VTK<br>
>> transform update mechanism:<br>
>> <a href="http://www.ncbi.nlm.nih.gov/pubmed/12631510" target="_blank">http://www.ncbi.nlm.nih.gov/pubmed/12631510</a><br>
>><br>
>> I added a vtkBSplineTransform to VTK 5.10. It might satisfy your<br>
>> needs, and if not, you might be able to re-use parts of it:<br>
>> <a href="http://hdl.handle.net/10380/3252" target="_blank">http://hdl.handle.net/10380/3252</a><br>
>><br>
>> - David<br>
>><br>
>> On Fri, Sep 14, 2012 at 4:02 AM, Anant Vemuri <<a href="mailto:ajar108@gmail.com">ajar108@gmail.com</a>> wrote:<br>
>> > I am currently creating a spline using vtkSplineFilter. The points in<br>
>> > the<br>
>> > spline are changing as new positions for points are generated. However,<br>
>> > now<br>
>> > I want to put the position information into a vtkTransform and connect<br>
>> > the<br>
>> > Spline being created within a pipeline so that, it gets updated when the<br>
>> > the<br>
>> > transform changes.<br>
>> ><br>
>> > currently I am doing this whenever I get new positions. Is it possible<br>
>> > to<br>
>> > put this in a pipeline so that the points are updated using a<br>
>> > vtktransform<br>
>> > when the transform changes. In vtkTransform there is a function called<br>
>> > "MultiplyPoint" and "TransformPoint", however both are not indicated to<br>
>> > be<br>
>> > pipelined.<br>
>> ><br>
>> > I am curious if anyone has tried to do this, or if anyone has<br>
>> > suggestions on<br>
>> > this issue.<br>
>> ><br>
>> > myspline is a class containing vtkPoints, vtkPolyLine, vtkPolyData etc.<br>
>> ><br>
>> ><br>
>> > // In the constructor for my spline class<br>
>> > _points = vtkSmartPointer< vtkPoints >::New();<br>
>> > _polyLine = vtkSmartPointer< vtkPolyLine >::New();<br>
>> > _cells = vtkSmartPointer< vtkCellArray >::New();<br>
>> > _polyData = vtkSmartPointer< vtkPolyData >::New();<br>
>> > _splineFilter = vtkSmartPointer< vtkSplineFilter >::New();<br>
>> > _tubeFilter = vtkSmartPointer< vtkTubeFilter >::New();<br>
>> ><br>
>> > // PIPELINE<br>
>> > _cells->InsertNextCell(_polyLine);<br>
>> > _polyData->SetPoints(_points);<br>
>> > _polyData->SetLines(_cells);<br>
>> > _splinefilter->SetInput( _polyData );<br>
>> > _splinefilter->SetMaximumNumberOfSubdivisions( 48 );<br>
>> > _tubeFilter->SetInputConnection( _splineFilter->GetOutputPort());<br>
>> > _tubeFilter->SetNumberOfSides( 12 );<br>
>> > _tubeFilter->SetRadius( 5.0 );<br>
>> > _tubeFilter->SetCapping(true);<br>
>> > _mapper->SetInputConnection( _tubeFilter->GetOutputPort() );<br>
>> > _actor->SetMapper(_mapper);<br>
>> > _actor->GetProperty()->SetLineWidth(4);<br>
>> ><br>
>> > //----------------------------------------------------------------<br>
>> > // Updating for new vtkpoints<br>
>> ><br>
>> > // I want to put this part into the pipeline if possible so that<br>
>> > // i can apply a vtkTransform to lets say the _points and the spline<br>
>> > // gets updated automatically. The updated _points that I get are<br>
>> ><br>
>> > // absolute positions so I cannot appl<br>
>> > splineObj->getPoints()->Reset();<br>
>> > splineObj->getPolyLine()->GetPointIds()->Reset();<br>
>> > vtkIdType k = 0;<br>
>> ><br>
>> > // __scanorder contains the order in which the points need to be put<br>
>> > into a spline<br>
>> > // __positions contains the updated point locations<br>
>> > for (int j = 0; j < __scanOrder.size(); j++)<br>
>> > {<br>
>> > unsigned int __idx = __scanOrder[i][j]-1;<br>
>> > double &__coord = __positions[__idx]->getCoordinate();<br>
>> ><br>
>> ><br>
>> ><br>
>> > splineObj->getPoints()->InsertNextPoint(__coord[0],__coord[1],__coord[2]);<br>
>> > splineObj->getPolyLine()->GetPointIds()->InsertNextId( k );<br>
>> > k++;<br>
>> > }<br>
>> > splineObj->getCellArray()->Reset();<br>
>> > splineObj->getCellArray()->InsertNextCell(splineObj->getPolyLine());<br>
>> > splineObj->getPolyData()->Modified();<br>
>> ><br>
>> ><br>
>> > Thank you,<br>
>> ><br>
>> > Anant.<br>
><br>
><br>
</div></div></blockquote></div><br>