AW: [vtkusers] UpdateExtent is not updated

John Biddiscombe biddisco at cscs.ch
Fri Oct 28 09:52:35 EDT 2005


Markus

>I have found a solution to the problem:
>I have overridden the SetInput function in the following manner:
>
>	{
>	vtkImageToImageFilter::SetInput ( input );
>	this->GetOutput()->SetUpdateExtentToWholeExtent();
>	}
>  
>
This is basically the right thing to do, but I'd probably not put the 
call to SetUpdateExtentToWholeExtent inside a setinput call. Better, 
inside your program you can usually place a SetUpdateExtentToWholeExtent 
call just around the place where your code calls render (or update). It 
may not propagate fully back up the pipeline if the filter with changing 
extents is not the last filter (in principle it should be ok - but in 
practice this has caused trouble for years).

The idea is this
Renderer says "Draw something", input to render says "Update", filters 
further upstream all update according to need etc. The image at the 
start of the pipeline may have some changed parameter (such as scale on 
a shrink filter) - so the output changes size. but downstream, the 
filters didn't know about this and are still requesting the piece that 
they previously asked for. Actually, this is the wrong behaviour because 
they should be asking for the whole extent - the trouble is that they 
might not be. A partial view of some data need not request all of it (it 
never happens though -e except when streaming, but that's different). 
Anyway, the information about the size should travel downstream and 
filters should always get the whole extent (unless they requested a 
smaller piece), but in fact it doesn't seem to quite work.

In the new pipeline (vtk5) things seem to be behaving better, though 
there are still some issues imho.

If the solution you implemented is working for you, then use it, but 
remember that SetInput is only called when setting an input and 
twiddling a parameter which causes the extents to change won't 
necessarily trigger a new setinput (unless your code is doing it manually)

etc etc

JB

-- 
John Biddiscombe,                            email:biddisco @ cscs.ch
http://www.cscs.ch/about/BJohn.php
CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91) 610.82.07
Via Cantonale, 6928 Manno, Switzerland      | Fax:  +41 (91) 610.82.82





More information about the vtkusers mailing list