[vtkusers] vtkImageViewer2 modifies WholeExtent - problem for feeding vtkImageStencil output back into background input

Sven Prevrhal sven.prevrhal at radiology.ucsf.edu
Tue Jul 10 06:09:17 EDT 2007

For the purpose of an image pixel editor, I would like to feed the output of an imagestencil back into its background input. I am using a vtkImageData object as the Background input and ShallowCopy the output back into  that object. When I display the output in a vtkImageViewer2, the WholeExtent of the data gets restricted to the displayed slice, say from 0,511,0,511,0,100 to 0,511,0,511,50,50. During the next update, the vtkImageStencil issues an error about Input and BackgroundInput not having the same size. Calling SetWholeExtent with the original extent before the Update does not help. 
Any idea how to avoid that? Can vtkImageViewer2 be set to not alter the WholeExtent? I don´t understand either why it has to do that anyway. Couldn´t it just alter UpdateExtent?

Thanks very much

More information about the vtkusers mailing list