[vtkusers] vtkImageResample and extents

Sergio Andres sergio at unizar.es
Fri Oct 29 06:49:02 EDT 2004


Hi all,

I have a problem with vtkImageResample.
First I use vtkImageResample to generate a new image with a given 
magnification factor.
Then I change set a smaller magnification factor, and a vtkOutputWindow 
comes up with the message:

"Update extent does not lie within whole extent"
The update extent is 0,1008,0,1008,0,0, whereas the whole extent 0, 
504,0,504,0,0.

My code is the following:

   this->filter->SetAxisMagnificationFactor(0, factor);
    this->filter->SetAxisMagnificationFactor(1, factor);
    this->filter->SetDimensionality(2);
    this->filter->SetOutputExtent(0, imageWidth - 1,
                                    0, imageHeight - 1,
                                    0, 0);
    this->filter->Update();

The output of this filter goes to a vtkImageMapper.

I don't know what happens. I would appreciate any help.
Thank you!

Sergio.




More information about the vtkusers mailing list