[vtkusers] Question on using vtkMFCWindow, vtkWindowToImageFilter, and vtkTIFFWriter
James Weng
jjames_weng at yahoo.com
Fri Feb 23 21:13:46 EST 2007
Dear All,
I am using vtkMFCWindow, vtkVolume16Reader, vtkContourFilter, for a 3D GUI rendering of a raw image volume data. It works fine (the rendered object¡¯s center is in the GUI window¡¯s center). However, after I add the code using vtkWindowToImageFilter, vtkTIFFWriter to save the render window content, there is a problem. In the GUI window, the position of the rendered object is shifted and the object is enlarged (object is scaled larger by several times, and its lower-left corner is in the GUI window center). So is the saved image file.
The added code is as the following,
//////////////////
this->pvtkWindowToImageFilter->SetInput(this->pvtkMFCWindow->GetRenderWindow());
this->pvtkTIFFWriter->SetInput(this->pvtkWindowToImageFilter->GetOutput());
this->pvtkTIFFWriter->SetFileName(¡°screen_image.tif¡±);
this->pvtkTIFFWriter->Write();
//////////////
I do not know what causes the problem, and how to correct it.
Thanks a lot for any suggestion.
James
---------------------------------
Expecting? Get great news right away with email Auto-Check.
Try the Yahoo! Mail Beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070223/f15d7b96/attachment.htm>
More information about the vtkusers
mailing list