[vtkusers] vtkActor2D to vtkImageData* Possible ?

Glenn Pierce glennpierce at connectfree.co.uk
Thu Aug 5 06:37:49 EDT 2004


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




More information about the vtkusers mailing list