[vtkusers] [vtk-developers] Started on VTK 4 compatibility removal

Wes Turner wes.turner at kitware.com
Thu May 5 10:52:26 EDT 2011


I think that the ARB made the correct decision.

Just my $.02 ...

- Wes

On Thu, May 5, 2011 at 10:45 AM, Berk Geveci <berk.geveci at kitware.com>wrote:

> David is correct. You can and will be able use SetInput() to process a
> dataset that you created manually.
>
> IMPORTANT NOTE: The behavior of SetInput() will change:
>
> vtkDataObject* output = source->GetOutput();
> filter->SetInput(output);
>
> Currently, this sets up a pipeline connection between the filter and
> the source. After the change, it would have no effect because 1.
> GetOutput() will return NULL unless the source is updated first 2.
> SetInput() will no longer setup pipeline connections but set its
> argument (the data object) as the input to the filter.
>
> We (ARB) discussed the possibility of getting rid of SetInput() and
> creating a new function called SetInputData() to flag such issues at
> compile time rather than runtime. We decided against it because if we
> did, it would be impossible to have the same code (that sets a data
> object as input) compile for VTK 5 and 6. This would make it harder
> for application folks to transition gradually. I'd be interested in
> what the developers think about this.
>
> Best,
> -berk
>
>
> On Wed, May 4, 2011 at 4:54 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> > On Wed, May 4, 2011 at 2:37 PM, Timothy Shead <tshead at sandia.gov> wrote:
> >> On 5/4/11 2:23 PM, Berk Geveci wrote:
> >>>
> >>> Hi folks,
> >>>
> >>> For those that are interested, I started working on removing the VTK 4
> >>> backwards compatibility layer as described here:
> >>>
> >>> http://www.vtk.org/Wiki/VTK/Remove_VTK_4_Compatibility
> >>
> >> Just one question - the article mentions "Since data objects can no
> longer
> >> know about their producers ..." - what is the impact on the use-case
> where a
> >> data structure is created and populated in-place, then used as the input
> to
> >> a pipeline?
> >>
> >>  filter->SetInputConnection(0, data_structure->GetProducerPort());
> >>
> >> ... I'd really hate to let this go.
> >>
> >> Cheers,
> >> Tim
> >
> > It's my understanding that in that case, you would use
> >
> > filter->SetInput(0, data_object);
> > or
> > filter->SetInput(data_object);
> >
> > with the expectation that this will not create a pipeline connection,
> > i.e. SetInputConnection() and SetInput() are no longer equivalent.
> >
> >  - David
> >
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
>



-- 
Wesley D. Turner, Ph.D.
Kitware, Inc.
Technical Leader
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4920
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110505/b0d0afb3/attachment.htm>


More information about the vtkusers mailing list