[vtkusers] Update Extents

Kevin Teich kteich at nmr.mgh.harvard.edu
Thu Jan 16 17:46:26 EST 2003


So I have a custom StructuredPointsSource with a SetValue() method that I
use to implement a kind of volume editor with a paint brush. In an attempt
to speed up the redraw as the user is painting, I want to set the
UpdateExtent so that whenever the Source Execute()s, only the changes
values are drawn. In the Source's Execute() function, I use

  output->GetPointData()->SetScalars
    ( this->ImageData->GetPointData()->GetScalars() );

to set the scalars in the output. This eventually goes to an ImageReslice, 
which appears to look out the extent it gets as an argument to 
its ThreadedExecute() function to determine the area to update.

What do I need to do to get the right extent passed into the process?  
Ideally, I would keep track of which voxels were changed in the Source,
and then on Execute() or ExecuteInformation(), the Source would set the
UpdateExtent with a cuboid containing those voxels. Is this the right
thing to do? On whom should I call UpdateExtent()? I tried calling it on
the output of the Source, but it doesn't seem to have any effect.

Thanks.

-- 
Kevin Teich





More information about the vtkusers mailing list