[vtkusers] Further update on VTK 4 compatibility removal
Berk Geveci
berk.geveci at kitware.com
Tue Sep 27 11:55:42 EDT 2011
Hi folks,
I made some more progress on removing the VTK 4 compatibility layer. The
goals of this work are described here:
http://www.vtk.org/Wiki/VTK/Remove_VTK_4_Compatibility
I am going to regularly send updates to mailing list so that folks can
try out these changes and see if they need to update their own software. For
now, I am publishing a branch called remove-vtk-4-compatibility to
https://gitorious.org/~berkgeveci/kitware/berkgevecis-vtk. In the
future, there will be a branch in the VTK stage as well. If you cloned
from this repo before, you may not be able to "git pull" or merge because
I made some destructive changes with git rebase.
As of my last changes, the entire VTK compiles on my Mac and on Linux.
Also all C++ tests pass on both platforms. Of course, you need to use the
right SHA for VTKData, which is 6b45ca817... There are some changes that
were done in a quick and dirty way. I am working on cleaning those. I can
give a list of open items to those interested.
See my previous commits for information about previous changes. The
biggest change in this update is the removal of SetInput() and its ilk as well
as the addition of SetInputData() and its ilk. SetInput() had to go because
it is no longer possible to connect pipelines using data objects - data object
is no longer associated with the pipeline in any way. Use SetInputConnection()
and its ilk to replace SetInput() that was connecting pipeline objects. I also
added SetInputData() to use in cases where you want to process a data
object without connecting the pipeline. For example,
vtkImageData* id = vtkImageData::New();
// fill image data here
vtkContourFilter* cf = vtkContourFilter::New();
cf->SetInputData(id);
cf->Update();
If you have code that depends on VTK, I'd suggest giving this version a try
and see what breaks. I expect most failures to be compile time but
there may be some run-time failures as well. Please report any
unexpected failures.
As for timeline, there will be a VTK 5.10 that has the new API (such
as SetInputData()
and other methods mentioned previously) but that will be backwards
compatible with
other 5.X. The full backwards-incomptabile changes will be in VTK 6
which we hope to
release in late fall to early winter.
Best,
-berk
More information about the vtkusers
mailing list