[vtk-developers] RE: Problem when creating vtkImageData by hand

Brad King brad.king at kitware.com
Fri Aug 12 20:58:53 EDT 2005


Prabhu Ramachandran wrote:
>>>>>>"Dean" == Dean Inglis <dean.inglis at camris.ca> writes:
> 
> 
>     Dean> and removed the outline filter from the pipeline and
>     Dean> everything runs fine.  As soon as I add the outline filter,
>     Dean> I get the same weird results.  I haven't figured out if this
>     Dean> is a pipeline problem, IPW problem or outline filter
>     Dean> pb.... :{
> 
> Thanks for the confirmation of the problem!  This means there is a
> nasty bug lurking somewhere in there.

I've found the problem.  The vtkOutlineFilter derives from 
vtkPolyDataAlgorithm.  vtkPolyDataAlgorithm::RequestUpdateExtent sets 
RequestExactExtent to 1 so that it requests the exact unstructured 
extent.  However when the input of vtkOutlineFilter is a structured data 
set this may not be what we want.  When the input to the outline filter 
is from the reader then it can produce the exact extent for each update 
without losing anything.  When the input to the outline filter is a 
stand-alone data object it is given a vtkTrivialProducer.

Since vtkTrivialProducer has only one copy of the data it will never 
actually generate or re-initialize its output.  However when 
RequestExactExtent is on then the executive crops the data and it is 
lost forever!

The reason this did not happen in VTK 4.4 is that vtkOutlineFilter did 
not set RequestExactExtent.  If I add a RequestUpdateExtent method to 
vtkOutlineFilter and change RequestExactExtent back to 0 then the 
problem is fixed.  I'm not sure this is the correct solution though.  Ken?

Comments?
-Brad



More information about the vtk-developers mailing list