19 #ifndef __vtkCaptureScreen_h
20 #define __vtkCaptureScreen_h
23 #include "vtkSmartPointer.h"
24 #include "vtkWindowToImageFilter.h"
25 #include "vtkRenderWindow.h"
27 template <
class TImageWriter >
42 void operator( ) (
const std::string& iFileName )
const
47 void operator( ) ( vtkRenderWindow* iRenderer,
48 const std::string& iFileName )
const
61 const std::string& iFileName )
const
65 vtkSmartPointer< vtkWindowToImageFilter > Dumper =
66 vtkSmartPointer< vtkWindowToImageFilter >::New( );
67 Dumper->SetInput( iRenderer );
70 vtkSmartPointer< ImageWriterType > writer =
71 vtkSmartPointer< ImageWriterType >::New( );
72 writer->SetFileName ( iFileName.c_str( ) );
73 writer->SetInputConnection ( Dumper->GetOutputPort( ) );