[vtk-developers] updating the update extent?

Stephen Langer stephen.langer at nist.gov
Mon Oct 1 11:12:33 EDT 2012


Hi --

I've created a subclass of vtkRectilinearGridAlgorithm that converts 3D vtkImageData into a 3D rectilinear grid.  When I use it in a pipeline it appears to work correctly, until I replace the original image data with a smaller image.  When I do that, I see a message like this:

vtkStreamingDemandDrivenPipeline (0x7fd54243e120): The update extent specified in the information for output port 0 on algorithm oofImageToGrid(0x7fd54243db00) is 0 100 0 100 0 100, which is outside the whole extent 0 10 0 10 0 10.

What is the correct way to tell the algorithm that the image size has changed?  I thought that the downstream parts of the pipeline would be automatically updated when the upstream data changed.  I have redefined RequestUpdateExtent, but it's not called until after the error message appears.

I've attached my filter (oofImageToGrid.C, oofImageToGrid.h) and a test program that uses it (replaceimage3.C).  Running "replaceimage3 -1 bigimage -2 littleimage" will demonstrate the problem, where bigimage and littleimage are directories containing image slices, and bigimage is larger, voxel-wise, than littleimage.

Thanks for any advice!

      -- Steve

-------------- next part --------------
A non-text attachment was scrubbed...
Name: oofImageToGrid.C
Type: application/octet-stream
Size: 4728 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20121001/0cdd9a30/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: oofImageToGrid.h
Type: application/octet-stream
Size: 1437 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20121001/0cdd9a30/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: replaceimage3.C
Type: application/octet-stream
Size: 4086 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20121001/0cdd9a30/attachment-0005.obj>
-------------- next part --------------


--
-- stephen.langer at nist.gov                    Tel: (301) 975-5423 --
-- http://math.nist.gov/~SLanger/             Fax: (301) 975-3553 --
-- NIST, 100 Bureau Drive, Stop 8910, Gaithersburg, Md 20899-8910 --

"I've just had the best idea. I'm going to make hats out of Nutella."
                                       -- Nadia Langer, 10 Mar 2012 
(Not intended as a product endorsement or statement of suitability.)




More information about the vtk-developers mailing list