[vtkusers] vtkActor2D to vtkImageData* Possible ?
Toon Huysmans
denhuys at hotmail.com
Thu Aug 5 07:48:29 EDT 2004
Hi Glenn,
You could use vtkWindowToImageFilter wich takes a window as input and generates a snapshot of the windows contents
Toon.
--------------------------------------------------------------------------------
>> Hi
>>
>> I have written some code that exports some images with
>>
>> vtkImageShiftScale *scaler = vtkImageShiftScale::New();
>> scaler->SetInput(view->GetOutput());
>> scaler->SetOutputScalarTypeToUnsignedChar();
>>
>> vtkPNGWriter* writer = vtkPNGWriter::New();
>> writer->SetInput(scaler->GetOutput());
>> writer->SetFileName((filename).c_str());
>> writer->Write();
>> writer->Delete();
>>
>>
>> However, what I really need to achieve is the export of a vtkXYPlotActor
>> but I can not find anyway to convert a vtkActor2D to vtkImageData*
>> that the vtkPNGWriter requires for input.
>>
>>
>> I would be most grateful for any advice.
>>
>> Thanks
>>
>> Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040805/25576c5a/attachment.htm>
More information about the vtkusers
mailing list