V-ARTContributions
Public Member Functions | Protected Attributes | List of all members
VART::PNMExporter Class Reference

Exports the frame buffer to a PNM file. More...

#include <pnmexporter.h>

Inheritance diagram for VART::PNMExporter:
VART::ViewerGlutOGL::DrawHandler

Public Member Functions

 PNMExporter ()
 
virtual ~PNMExporter ()
 
void SetBufferSize (int columns, int lines)
 Changes the buffer size. More...
 
virtual void OnDraw ()
 Reads frame buffer and writes to file. More...
 
- Public Member Functions inherited from VART::ViewerGlutOGL::DrawHandler
virtual ~DrawHandler ()
 

Protected Attributes

unsigned int * dataPtr
 buffer for image data More...
 
int numColumns
 number of columns in buffer More...
 
int numLines
 number of lines in buffer More...
 
- Protected Attributes inherited from VART::ViewerGlutOGL::DrawHandler
ViewerGlutOGLviewerPtr
 Points to the viewer on which the handler was attached. More...
 

Detailed Description

Exports the frame buffer to a PNM file.

Bug:

The frame buffer size needs to be mannualy set. Beware of screen resizes. Please fix this by creating a resize handler for viewers.

PNMs are as bad as BMPs. Saving several frames will eat all your HD space. Please fix this by creating a PNG exporter :-).

A PNMExporter is a ViewerGlutOGL::DrawHandler that reads the frame buffer and writes it to a file. Created to make videos from V-ART display.

Definition at line 20 of file pnmexporter.h.

Constructor & Destructor Documentation

VART::PNMExporter::PNMExporter ( )

Definition at line 14 of file pnmexporter.cpp.

VART::PNMExporter::~PNMExporter ( )
virtual

Definition at line 19 of file pnmexporter.cpp.

Member Function Documentation

void VART::PNMExporter::OnDraw ( )
virtual

Reads frame buffer and writes to file.

Output goes to file "frame00000.pnm" where "00000" gets incremented on every call.

Implements VART::ViewerGlutOGL::DrawHandler.

Definition at line 34 of file pnmexporter.cpp.

void VART::PNMExporter::SetBufferSize ( int  columns,
int  lines 
)

Changes the buffer size.

Definition at line 25 of file pnmexporter.cpp.

Member Data Documentation

unsigned int* VART::PNMExporter::dataPtr
protected

buffer for image data

Definition at line 40 of file pnmexporter.h.

int VART::PNMExporter::numColumns
protected

number of columns in buffer

Definition at line 42 of file pnmexporter.h.

int VART::PNMExporter::numLines
protected

number of lines in buffer

Definition at line 44 of file pnmexporter.h.


The documentation for this class was generated from the following files: