[vtkusers] How to print VtkBmpWriter

David Doria daviddoria at gmail.com
Fri Oct 5 07:33:45 EDT 2012


On Thu, Oct 4, 2012 at 8:21 AM, ISTB <f.dshabarow at gmail.com> wrote:
>
> I am using VTKBMPWriter to create a bmp image from my render window:
>
>         vtkWindowToImageFilter *winToImg = vtkWindowToImageFilter::New();
>         winToImg->SetInput(mRenderWindow);
>         vtkBMPWriter *writer = vtkBMPWriter::New();
>         writer->SetInput(winToImg->GetOutput());
>         writer->SetFileName(aFilename.c_str());
>         writer->Write();

I think you would actually want writer->GetInput() right? (Which
should be equivalent to winToImg->GetOutput() ).

You might also look at vtkImageExport (a shell example here:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Images/ImageExport)

David



More information about the vtkusers mailing list