[vtk-developers] Changes to the way the pipeline is updated
Sean McBride
sean at rogue-research.com
Tue Mar 1 12:39:34 EST 2016
On Fri, 15 Jan 2016 10:57:36 -0500, Berk Geveci said:
>In an effort to address a bug reported on the mailing list, I ended up
>making a change to the way the pipeline is updated. I made a minor change
>to the way update behaves but more importantly, I'd like to make an API
>change that is biggish.
Berk,
After rebuilding my app with VTK master I've run into this.
I just went through the change with git show f020ebb6 and had 2 comments on the code change:
1) Did you mean to commit that commented code in Accelerators/Piston/vtkPistonMapper.cxx ?
2)
+The following new methods were added:
+
+### vtkAlgorithm:
+
+ int Update(int port, vtkInformationVector* requests);
+ int Update(vtkInformation* requests);
+ int UpdatePiece(int piece, int numPieces, int ghostLevels, int* extents=0);
+ int UpdateExtent(int piece, int numPieces, int ghostLevels, int* extents=0);
+ int UpdateTimeStep(double time,
+ int piece=-1, int numPieces=1, int ghostLevels=0, int* extents=0);
Couldn't those 'extents' params be const? I know many VTK API are not very const friendly, but seems a shame to perpetuate that with new API.
>Here is how an algorithm is updated currently.
>
>anAlgorithm->Update();
>
>If you want the algorithm to produce a particular subset in space or time,
>you need to do this:
>
>anAlgorithm->UpdateInformation();
>anAlgorithm->SetUpdateExtent(0, 2, 0);
>anAlgorithm->SetUpdateExtent(0, 10, 0, 10, 1, 1);
>anAlgorithm->SetUpdateTimeStep(0.5);
>anAlgorithm->Update();
My app has a few of this pattern:
slicer->UpdateInformation();
slicer->SetUpdateExtentToWholeExtent();
slicer->Update();
do I understand correctly that I can now just do:
slicer->UpdateWholeExtent();
>Here is the branch that passes all of the tests:
>
>https://gitlab.kitware.com/berkgeveci/vtk/commits/setupdateextent-change
Shame that link is dead just 6 weeks later. Makes it harder to research what/when changes broke things... :(
Thanks,
--
____________________________________________________________
Sean McBride, B. Eng sean at rogue-research.com
Rogue Research www.rogue-research.com
Mac Software Developer Montréal, Québec, Canada
More information about the vtk-developers
mailing list