Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4RTJpegMaker Class Reference

#include <G4RTJpegMaker.hh>

Inheritance diagram for G4RTJpegMaker:
Collaboration diagram for G4RTJpegMaker:

Public Member Functions

 G4RTJpegMaker ()
 
virtual ~G4RTJpegMaker ()
 
virtual void CreateFigureFile (const G4String &fileName, int nColumn, int nRow, u_char *colorR, u_char *colorG, u_char *colorB)
 
- Public Member Functions inherited from G4VFigureFileMaker
 G4VFigureFileMaker ()
 
virtual ~G4VFigureFileMaker ()
 

Detailed Description

Definition at line 45 of file G4RTJpegMaker.hh.

Constructor & Destructor Documentation

G4RTJpegMaker::G4RTJpegMaker ( )

Definition at line 37 of file G4RTJpegMaker.cc.

38 {;}
G4RTJpegMaker::~G4RTJpegMaker ( )
virtual

Definition at line 40 of file G4RTJpegMaker.cc.

41 {;}

Member Function Documentation

void G4RTJpegMaker::CreateFigureFile ( const G4String fileName,
int  nColumn,
int  nRow,
u_char colorR,
u_char colorG,
u_char colorB 
)
virtual

Implements G4VFigureFileMaker.

Definition at line 43 of file G4RTJpegMaker.cc.

48 {
49  G4JpegCoder aFigure(colorR,colorG,colorB);
50  G4JpegProperty aProperty;
51  aProperty.nColumn = nColumn;
52  aProperty.nRow = nRow;
53  aProperty.Units = 0;
54  aProperty.HDensity = 1;
55  aProperty.VDensity = 1;
56  aProperty.ExtensionCode = 0;
57  aProperty.Comment = "Geant4 Ray Tracer Version 1.0 by M.Asai K.Minamimoto C.Kishinaga";
58 
59  aFigure.SetJpegProperty(aProperty);
60  aFigure.DoCoding();
61 
62  char* jpegAddress;
63  int jpegSize;
64 
65  aFigure.GetJpegData(&jpegAddress,jpegSize);
66 
67  std::ofstream ofs;
68  ofs.open(fileName,std::ios::out|std::ios::trunc|std::ios::binary);
69  ofs.write(jpegAddress,jpegSize);
70  ofs.close();
71 }
const char * Comment
Definition: G4RTJpeg.hh:161

Here is the call graph for this function:


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