Geant4 10.7.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4RTJpegMaker Class Reference

#include <G4RTJpegMaker.hh>

+ Inheritance 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 ()
 
virtual void CreateFigureFile (const G4String &fileName, int nColumn, int nRow, unsigned char *colorR, unsigned char *colorG, unsigned char *colorB)=0
 

Detailed Description

Definition at line 44 of file G4RTJpegMaker.hh.

Constructor & Destructor Documentation

◆ G4RTJpegMaker()

G4RTJpegMaker::G4RTJpegMaker ( )

Definition at line 36 of file G4RTJpegMaker.cc.

37{;}

◆ ~G4RTJpegMaker()

G4RTJpegMaker::~G4RTJpegMaker ( )
virtual

Definition at line 39 of file G4RTJpegMaker.cc.

40{;}

Member Function Documentation

◆ CreateFigureFile()

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 42 of file G4RTJpegMaker.cc.

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

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