[vtkusers] Problem to crop an image
wyssa1
wyssa1 at hta-bi.bfh.ch
Thu Nov 25 12:26:40 EST 2004
Hello
I get the RenderWindow and set it as Input of a vtkWindowToImageFilter.
Now I want to get only a Portion of the hole image. I do this by the 2
functions SetUpdateExtent() and Crop(). Then I save the Data (bmp or jpg).
But that doesn't work as excpeted: I want to save only that new extent and
not the whole image. What I'm doing wrong?
pWindowToImageFilter->SetInput(m_pRenderWindow);
pWindowToImageFilter->GetOutput()->SetUpdateExtent(0, 10, 0, 10, 0, 0);
pWindowToImageFilter->GetOutput()->Crop();
SaveImageData(pWindowToImageFilter->GetOutput(), strFilename);
Adrian
More information about the vtkusers
mailing list