[vtkusers] SetInputData migration VTK 6
Laurent Chauvin
lchauvin at bwh.harvard.edu
Tue Jul 22 19:07:35 EDT 2014
Hi Sam,
Thank you for your answer.
Here is my pipeline (just an overview):
vtkSplineFilter->SetInputData(polydata)
vtkTubeFilter->SetInputConnection(vtkSplineFilter->GetOutputPort())
vtkMRMLModelNode->SetAndObservePolyData(vtkTubeFilter->GetOutput())
I would like to have one vtkMRMLModelNode with one polydata.
The problem if I do what you suggested, is all my vtkMRMLModelNodes are
gonna observe TubeFilter. So when I will modify my polydata and call
vtkSplineFilter->Update() and vtkTubeFilter->Update(), all my
vtkMRMLModelNodes will be updated, but I only want the last one to be.
Should I do a copy of the output of vtkTubeFilter instead ? to avoid they
all change when I update the TubeFilter ?
Thank you.
-Laurent
On Tue, Jul 22, 2014 at 7:02 PM, Sam Raby <rabysam28 at gmail.com> wrote:
> Hi Laurent,
>
> After feeding the vtkPolyData into the vtkSplineFilter by SetInputData and
> setting the parameters of the filter, did you try to manually update the
> vtkSplineFilter?
>
>
>
>
> On Tue, Jul 22, 2014 at 4:55 PM, Laurent Chauvin <lchauvin at bwh.harvard.edu
> > wrote:
>
>> Hello,
>>
>> I created a pipeline with a vtkSplineFilter, with a polydata as input.
>> However, now that I try to make it compatible with VTK 6, it's not
>> working anymore.
>>
>> I replaced SetInput by SetInputData, and I read that SetInputData doesn't
>> create the pipeline. That's probably why now, when I update my polydata,
>> it's not updating the spline.
>> But I was wondering then how should I do to keep creating the pipeline
>> then ?
>>
>> I read to use SetInputConnection, but I think SetInputConnection take as
>> argument the OutputPort of another filter, but the spline is the 'entry
>> point' of my pipeline, taking a polydata as input, and applying some
>> filters on it.
>>
>> How could I do to update the pipeline when modifying the polydata ?
>>
>> Thank you.
>> -Laurent
>>
>> --
>> Laurent Chauvin, MS
>> Surgical Navigation and Robotics Laboratory, Radiology Department
>> Brigham And Women's Hospital, Harvard Medical School
>> http://wiki.ncigt.org/index.php/User:Lchauvin
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at:
>> http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/vtkusers
>>
>>
> The information in this e-mail is intended only for the person to whom
> it is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
--
Laurent Chauvin, MS
Surgical Navigation and Robotics Laboratory, Radiology Department
Brigham And Women's Hospital, Harvard Medical School
http://wiki.ncigt.org/index.php/User:Lchauvin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20140722/e17b3243/attachment.html>
More information about the vtkusers
mailing list