Geant4  10.01.p03
G4GMocrenIO.hh
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // File I/O manager class for writing or reading calcuated dose
28 // distribution and some event information
29 //
30 //
31 // Mar. 31, 2009 : release for the gMocrenFile driver
32 //
33 // Akinori Kimura
34 //
35 // gMocren home page:
36 // http://geant4.kek.jp/gMocren/
37 //
38 #ifndef GMOCRENIO_HH
39 #define GMOCRENIO_HH
40 
41 #include <vector>
42 #include <string>
43 #include <fstream>
44 #include <map>
45 
46 //
47 //----- GMocrenDataPrimitive class -----//
48 // data primitive class for volume data
49 //
50 template <typename T> class GMocrenDataPrimitive {
51 protected:
52  int kSize[3];
53  double kScale;
54  T kMinmax[2];
55  float kCenter[3];
56  std::vector<T *> kImage;
57  std::string kDataName;
58  //std::vector<std::vector<T>> image;
59 
60 public:
62  //GMocrenDataPrimitive(GMocrenDataPrimitive<T> & _prim);
64 
68 
69  void clear();
70  void clearImage();
71  void setSize(int _size[3]);
72  void getSize(int _size[3]);
73  void setScale(double & _scale);
74  double getScale();
75  void setMinMax(T _minmax[2]);
76  void getMinMax(T _minmax[2]);
77  void setImage(std::vector<T *> & _image);
78  void addImage(T * _image);
79  std::vector<T *> & getImage();
80  T * getImage(int _z); // get image of each layer
81  void setCenterPosition(float _center[3]);
82  void getCenterPosition(float _center[3]);
83  void setName(std::string & _name);
84  std::string getName();
85 };
86 
87 
88 //
89 //----- GMocrenTrack class -----//
90 //
91 class GMocrenTrack {
92 public:
93  struct Step {
94  float startPoint[3];
95  float endPoint[3];
96  };
97 protected:
98  std::vector<struct Step> kTrack;
99  unsigned char kColor[3];
100 
101 public:
102  GMocrenTrack();
104 
105 
106  int getNumberOfSteps() {return (int)kTrack.size();}
107  void addStep(float _startx, float _starty, float _startz,
108  float _endx, float _endy, float _endz);
109  void getStep(float & _startx, float & _starty, float & _startz,
110  float & _endx, float & _endy, float & _endz,
111  int _num);
112  void setTrack(std::vector<struct Step> & _aTrack) {kTrack = _aTrack;}
113  void setColor(unsigned char _color[3]) {
114  for(int i = 0; i < 3; i++) kColor[i] = _color[i];
115  }
116  void getColor(unsigned char _color[3]) {
117  for(int i = 0; i < 3; i++) _color[i] = kColor[i];
118  }
119  void translate(std::vector<float> & _tranlate);
120 };
121 
122 
123 
124 //
125 //----- GMocrenDetector class -----//
126 //
128 public:
129  struct Edge {
130  float startPoint[3];
131  float endPoint[3];
132  };
133 protected:
134  std::vector<struct Edge> kDetector;
135  unsigned char kColor[3];
136  std::string kName;
137 
138 public:
139  GMocrenDetector();
141 
142 
143  int getNumberOfEdges() {return (int)kDetector.size();}
144  void addEdge(float _startx, float _starty, float _startz,
145  float _endx, float _endy, float _endz);
146  void getEdge(float & _startx, float & _starty, float & _startz,
147  float & _endx, float & _endy, float & _endz,
148  int _num);
149  void setDetector(std::vector<struct Edge> & _aDetector) {kDetector = _aDetector;}
150  void setColor(unsigned char _color[3]) {
151  for(int i = 0; i < 3; i++) kColor[i] = _color[i];
152  }
153  void getColor(unsigned char _color[3]) {
154  for(int i = 0; i < 3; i++) _color[i] = kColor[i];
155  }
156  void setName(std::string & _name) { kName = _name;}
157  std::string getName() {return kName;}
158 
159  void translate(std::vector<float> & _tranlate);
160 };
161 
162 
163 //
164 //----- G4GMocrenIO class -----//
165 //
166 class G4GMocrenIO {
167 public:
168  // file id
169  static std::string kId;
170 
171  // file version
172  static std::string kVersion;
173 
174  // data file name
175  static std::string kFileName;
176 
177  // file data endian: little or not
178  static char kLittleEndianInput;
179  static char kLittleEndianOutput;
180 
181  static std::string kComment;
182 
183  // number of events
184  static int kNumberOfEvents;
185 
186  // pointer to the modality image data
187  static unsigned int kPointerToModalityData;
188  // pointer to the dose distribution image data
189  static std::vector<unsigned int> kPointerToDoseDistData;
190  // pointer to the ROI image data
191  static unsigned int kPointerToROIData;
192  // pointer to the track data
193  static unsigned int kPointerToTrackData;
194  // pointer to the detector data
195  static unsigned int kPointerToDetectorData;
196 
197  // voxel spacing (universal size)
198  static float kVoxelSpacing[3];
199 
200  //----- modality image -----//
201  static class GMocrenDataPrimitive<short> kModality;
202  // density map to modality (CT) values
203  static std::vector<float> kModalityImageDensityMap;
204  static std::string kModalityUnit;
205 
206  //----- dose distribution -----//
207  static std::vector<class GMocrenDataPrimitive<double> > kDose;
208  //std::vector<short *> kShortDose;
209  static std::string kDoseUnit;
210 
211  //----- RoI -----//
212  static std::vector<class GMocrenDataPrimitive<short> > kRoi;
213 
214  //----- track information -----//
215  static std::vector<float *> kSteps; // begin (x,y,z), end (x,y,z)
216  static std::vector<unsigned char *> kStepColors; // r, g, b
217 
218  static std::vector<class GMocrenTrack> kTracks;
220 
221  //----- detector information -----//
222  static std::vector<class GMocrenDetector> kDetectors;
223 
224  //----- verbose information -----//
225  static int kVerbose; // verbose level : 0 - 5 (none - overtalk)
226 
227 public:
228  // constructor
229  G4GMocrenIO();
230  // destructor
231  ~G4GMocrenIO();
232 
233  // initialize
234  void initialize();
235 
236  // set the gMocren data file name
237  void setFileName(std::string & _filename) {kFileName = _filename;}
238  void setFileName(char * _filename) {kFileName = _filename;}
239  // get the gMocren data file name
240  std::string & getFileName() {return kFileName;}
241  // store all data in the gMocren data file
242  bool storeData(char * _filename); // interface for version 4
243  bool storeData();
244  bool storeData2(char * _filename); // version 2
245  bool storeData2();
246  bool storeData3(char * _filename); // version 3
247  bool storeData3();
248  bool storeData4(char * _filename); // version 4
249  bool storeData4();
250  // retrieve all data from the gMocren data file
251  bool retrieveData(char * _filename); // interface
252  bool retrieveData();
253  bool retrieveData2(char * _filename); //version 2
254  bool retrieveData2();
255  bool retrieveData3(char * _filename); // version 3
256  bool retrieveData3();
257  bool retrieveData4(char * _filename); // version 4
258  bool retrieveData4();
259 
260  // get & set the file id
261  std::string & getID() {return kId;}
262  void setID();
263  void setID(std::string & _id) {kId = _id;}
264 
265  // get & set the file version
266  std::string & getVersion();
267  void setVersion(std::string & _version);
268 
269  // set endians of input/output data
270  void setLittleEndianInput(bool _little);
271  void setLittleEndianOutput(bool _little);
272 
273  // get & set comment
274  std::string & getComment() {return kComment;}
275  void setComment(std::string & _comment) {kComment = _comment;}
276 
277 
278  // voxel spacing
279  void setVoxelSpacing(float _spacing[3]);
280  void getVoxelSpacing(float _spacing[3]);
281 
282  // get & set number of events
283  int & getNumberOfEvents();
284  void setNumberOfEvents(int & _numberOfEvents);
285  void addOneEvent();
286 
287  // set pointer the modality image data
288  void setPointerToModalityData(unsigned int & _pointer);
289  unsigned int getPointerToModalityData();
290  // set pointer the dose distribution image data
291  void addPointerToDoseDistData(unsigned int & _pointer);
292  unsigned int getPointerToDoseDistData(int _elem = 0);
293  // set pointer the ROI image data
294  void setPointerToROIData(unsigned int & _pointer);
295  unsigned int getPointerToROIData();
296  // set pointer the track data
297  void setPointerToTrackData(unsigned int & _pointer);
298  unsigned int getPointerToTrackData();
299 private:
300  // calculate pointers
301  void calcPointers4();
302  void calcPointers3();
303  void calcPointers2();
304 
305 
306  //----- Modality image -----//
307 public:
308  // get & set the modality image size
309  void getModalityImageSize(int _size[3]);
310  void setModalityImageSize(int _size[3]);
311  // get & set the modality image spacing size
312  void getModalityImageVoxelSpacing(float _size[3]); // un-usable
313  void setModalityImageVoxelSpacing(float _size[3]); // un-usable
314  // get & set the modality image size
315  void setModalityImageScale(double & _scale);
316  double getModalityImageScale();
317  // set the modality image in CT
318  void setModalityImage(short * _image);
319  short * getModalityImage(int _z);
320  void clearModalityImage();
321  // set/get the modality image density map
322  void setModalityImageDensityMap(std::vector<float> & _map);
323  std::vector<float> & getModalityImageDensityMap();
324  // set the modality image min./max.
325  void setModalityImageMinMax(short _minmax[2]);
326  // get min. & max. of the modality image
327  void getModalityImageMinMax(short _minmax[2]);
328  short getModalityImageMax();
329  short getModalityImageMin();
330  // set center of the modality image position
331  void setModalityCenterPosition(float _center[3]);
332  void getModalityCenterPosition(float _center[3]);
333  // get & set the modality image unit
334  std::string getModalityImageUnit();
335  void setModalityImageUnit(std::string & _unit);
336 
337  short convertDensityToHU(float & _dens);
338 
339  //----- Dose distribution -----//
340 
341  // instanciate a dose distribution data object
342  void newDoseDist();
343  // get number of dose distribion data
344  int getNumDoseDist();
345  // get & set the dose distribution unit
346  std::string getDoseDistUnit(int _num = 0);
347  void setDoseDistUnit(std::string & _unit, int _num = 0);
348  // get & set the dose distribution image size
349  void getDoseDistSize(int _size[3], int _num = 0);
350  void setDoseDistSize(int _size[3], int _num = 0);
351  // get min. & max. of the dose distribution image
352  void setDoseDistMinMax(short _minmax[2], int _num = 0);
353  void getDoseDistMinMax(short _minmax[2], int _num = 0);
354  // get min. & max. of the dose distribution
355  void setDoseDistMinMax(double _minmax[2], int _num = 0);
356  void getDoseDistMinMax(double _minmax[2], int _num = 0);
357  // get & set scale value of the dose distribution for the image
358  void setDoseDistScale(double & _scale, int _num = 0);
359  double getDoseDistScale(int _num = 0);
360  // set the dose distribution image
361  void setShortDoseDist(short * _image, int _num = 0);
362  void getShortDoseDist(short * _data, int _z, int _num = 0);
363  void getShortDoseDistMinMax(short _minmax[2], int _num = 0);
364  // set the dose distribution
365  void setDoseDist(double * _image, int _num = 0);
366  double * getDoseDist(int _z, int _num = 0);
367  // add another dose ditribution map to this map
368  bool addDoseDist(std::vector<double *> & _image, int _num = 0);
369 
370  // get & get center position of calculated dose region
371  void getDoseDistCenterPosition(float _center[3], int _num = 0);
372  void setDoseDistCenterPosition(float _center[3], int _num = 0);
373 
374  // get & get name of calculated dose distribution
375  std::string getDoseDistName(int _num = 0);
376  void setDoseDistName(std::string _name, int _num = 0);
377 
378  // copy dose distributions
379  void copyDoseDist(std::vector<class GMocrenDataPrimitive<double> > & _dose);
380  // merge two dose distributions
381  bool mergeDoseDist(std::vector<class GMocrenDataPrimitive<double> > & _dose);
382 
383  // clear all dose distributions
384  void clearDoseDistAll();
385 protected:
386  // check whether dose variable is empty or not
387  bool isDoseEmpty();
388  // calcuated scale value to convert dose distribution into image
389  void calcDoseDistScale();
390 
391 public:
392  //----- RoI -----//
393 
394  // instanciate an RoI data object
395  void newROI();
396  // get number of RoI data
397  int getNumROI();
398  // get & set the ROI image scale
399  double getROIScale(int _num = 0);
400  void setROIScale(double & _scale, int _num = 0);
401  // get & set the ROI image
402  short * getROI(int _z, int _num = 0);
403  void setROI(short * _image, int _num = 0);
404  // get & set the ROI image size
405  void getROISize(int _size[3], int _num = 0);
406  void setROISize(int _size[3], int _num = 0);
407  // get & set position of the ROI region center
408  void getROICenterPosition(float _center[3], int _num = 0);
409  void setROICenterPosition(float _center[3], int _num = 0);
410  // get & set the ROI image min. and max.
411  void getROIMinMax(short _minmax[2], int _num = 0);
412  void setROIMinMax(short _minmax[2], int _num = 0);
413  void clearROIAll();
414 protected:
415  // check whether RoI variable is empty or not
416  bool isROIEmpty();
417 
418 
419 public:
420  //----- Track -----//
421  // get number of tracks
422  int getNumTracks();
423  int getNumTracks4();
424  // get & set tracks
425  std::vector<float *> & getTracks();
426  void getTrack(int _num, std::vector<float *> & _steps,
427  std::vector<unsigned char * > & _color);
428  void addTrack(float * _tracks);
429  void setTracks(std::vector<float *> & _tracks);
430  std::vector<unsigned char *> & getTrackColors();
431  void addTrackColor(unsigned char * _colors);
432  void setTrackColors(std::vector<unsigned char *> & _trackColors);
433  void copyTracks(std::vector<float *> & _tracks, std::vector<unsigned char *> & _colors);
434  void mergeTracks(std::vector<float *> & _tracks, std::vector<unsigned char *> & _colors);
435  void addTrack(std::vector<float *> & _steps, unsigned char _color[3]);
436 
437  void notStoredTracks() {kTracksWillBeStored = false;};
438  void translateTracks(std::vector<float> & _translateo);
439  void clearTracks() {kTracks.clear();}
440 
441 
442  //----- Detectors -----//
443  // get number of detectors
444  int getNumberOfDetectors();
445  // add one detector which consists of edges (float[6])
446  void addDetector(std::string & _name, std::vector<float *> & _det, unsigned char _color[3]);
447  void getDetector(int _num, std::vector<float *> & _edges,
448  std::vector<unsigned char *> & _color,
449  std::string & _detectorName);
450  void translateDetector(std::vector<float> & _translate);
451  void clearDetector() {kDetectors.clear();}
452 
453 protected:
454  // endian conversion
455  template <typename Type> void convertEndian(char *, Type &);
456  // byte order inversion
457  template <typename T> void invertByteOrder(char * _val, T & _rval);
458 
459 
460 public:
461  //----- verbose information -----//
462  void setVerboseLevel(int _level);
463 
464 };
465 
466 #endif
467 
void getEdge(float &_startx, float &_starty, float &_startz, float &_endx, float &_endy, float &_endz, int _num)
Definition: G4GMocrenIO.cc:317
void getModalityImageSize(int _size[3])
std::string getName()
Definition: G4GMocrenIO.hh:157
std::vector< T * > kImage
Definition: G4GMocrenIO.hh:56
void convertEndian(char *, Type &)
unsigned int getPointerToTrackData()
void initialize()
Definition: G4GMocrenIO.cc:413
bool storeData4()
Definition: G4GMocrenIO.cc:462
static std::vector< float > kModalityImageDensityMap
Definition: G4GMocrenIO.hh:203
void getModalityCenterPosition(float _center[3])
void setVerboseLevel(int _level)
void setFileName(std::string &_filename)
Definition: G4GMocrenIO.hh:237
void newDoseDist()
short convertDensityToHU(float &_dens)
void setDoseDistUnit(std::string &_unit, int _num=0)
int getNumTracks()
void getColor(unsigned char _color[3])
Definition: G4GMocrenIO.hh:153
double getModalityImageScale()
unsigned int getPointerToROIData()
bool isROIEmpty()
void addImage(T *_image)
Definition: G4GMocrenIO.cc:217
void setVersion(std::string &_version)
double getDoseDistScale(int _num=0)
bool storeData3()
void clearModalityImage()
static char kLittleEndianOutput
Definition: G4GMocrenIO.hh:179
std::string & getFileName()
Definition: G4GMocrenIO.hh:240
double getROIScale(int _num=0)
void setROI(short *_image, int _num=0)
void getColor(unsigned char _color[3])
Definition: G4GMocrenIO.hh:116
void addTrack(float *_tracks)
std::vector< float > & getModalityImageDensityMap()
bool kTracksWillBeStored
Definition: G4GMocrenIO.hh:219
std::vector< float * > & getTracks()
unsigned int getPointerToModalityData()
void invertByteOrder(char *_val, T &_rval)
short * getROI(int _z, int _num=0)
void setDoseDistMinMax(short _minmax[2], int _num=0)
void setModalityImageUnit(std::string &_unit)
static std::vector< class GMocrenDataPrimitive< short > > kRoi
Definition: G4GMocrenIO.hh:212
void setTrack(std::vector< struct Step > &_aTrack)
Definition: G4GMocrenIO.hh:112
void setModalityImageSize(int _size[3])
void getShortDoseDist(short *_data, int _z, int _num=0)
bool storeData2()
bool addDoseDist(std::vector< double * > &_image, int _num=0)
void setComment(std::string &_comment)
Definition: G4GMocrenIO.hh:275
short getModalityImageMax()
std::vector< struct Step > kTrack
Definition: G4GMocrenIO.hh:98
std::vector< unsigned char * > & getTrackColors()
GMocrenDataPrimitive< T > & operator=(const GMocrenDataPrimitive< T > &_right)
Definition: G4GMocrenIO.cc:74
void setID(std::string &_id)
Definition: G4GMocrenIO.hh:263
void getROICenterPosition(float _center[3], int _num=0)
GMocrenDataPrimitive< T > & operator+(const GMocrenDataPrimitive< T > &_right)
Definition: G4GMocrenIO.cc:93
static std::vector< class GMocrenDataPrimitive< double > > kDose
Definition: G4GMocrenIO.hh:207
void translate(std::vector< float > &_tranlate)
Definition: G4GMocrenIO.cc:334
void copyTracks(std::vector< float * > &_tracks, std::vector< unsigned char * > &_colors)
std::string getDoseDistName(int _num=0)
unsigned char kColor[3]
Definition: G4GMocrenIO.hh:135
void setROIMinMax(short _minmax[2], int _num=0)
static std::vector< unsigned char * > kStepColors
Definition: G4GMocrenIO.hh:216
void clearDetector()
Definition: G4GMocrenIO.hh:451
std::string getName()
Definition: G4GMocrenIO.cc:242
void translateDetector(std::vector< float > &_translate)
void getDoseDistSize(int _size[3], int _num=0)
static std::vector< class GMocrenDetector > kDetectors
Definition: G4GMocrenIO.hh:222
static float kVoxelSpacing[3]
Definition: G4GMocrenIO.hh:198
void setDoseDist(double *_image, int _num=0)
double * getDoseDist(int _z, int _num=0)
std::string kName
Definition: G4GMocrenIO.hh:136
void clearROIAll()
bool retrieveData()
void setColor(unsigned char _color[3])
Definition: G4GMocrenIO.hh:150
void setPointerToROIData(unsigned int &_pointer)
void addTrackColor(unsigned char *_colors)
std::string & getComment()
Definition: G4GMocrenIO.hh:274
void addOneEvent()
static int kVerbose
Definition: G4GMocrenIO.hh:225
void setFileName(char *_filename)
Definition: G4GMocrenIO.hh:238
void calcPointers3()
static char kLittleEndianInput
Definition: G4GMocrenIO.hh:178
static std::string kVersion
Definition: G4GMocrenIO.hh:172
std::vector< T * > & getImage()
Definition: G4GMocrenIO.cc:221
void getShortDoseDistMinMax(short _minmax[2], int _num=0)
void notStoredTracks()
Definition: G4GMocrenIO.hh:437
void setScale(double &_scale)
Definition: G4GMocrenIO.cc:196
void getModalityImageVoxelSpacing(float _size[3])
void mergeTracks(std::vector< float * > &_tracks, std::vector< unsigned char * > &_colors)
void getCenterPosition(float _center[3])
Definition: G4GMocrenIO.cc:234
void setMinMax(T _minmax[2])
Definition: G4GMocrenIO.cc:204
void setROICenterPosition(float _center[3], int _num=0)
static int kNumberOfEvents
Definition: G4GMocrenIO.hh:184
void clearDoseDistAll()
GMocrenDataPrimitive< T > & operator+=(const GMocrenDataPrimitive< T > &_right)
Definition: G4GMocrenIO.cc:135
void addEdge(float _startx, float _starty, float _startz, float _endx, float _endy, float _endz)
Definition: G4GMocrenIO.cc:306
std::string kDataName
Definition: G4GMocrenIO.hh:57
void setImage(std::vector< T * > &_image)
Definition: G4GMocrenIO.cc:213
int getNumTracks4()
void getROISize(int _size[3], int _num=0)
void setModalityImageMinMax(short _minmax[2])
std::string getDoseDistUnit(int _num=0)
int getNumberOfSteps()
Definition: G4GMocrenIO.hh:106
std::string & getVersion()
void calcDoseDistScale()
void setModalityImage(short *_image)
void setCenterPosition(float _center[3])
Definition: G4GMocrenIO.cc:230
int getNumberOfEdges()
Definition: G4GMocrenIO.hh:143
void setVoxelSpacing(float _spacing[3])
void setSize(int _size[3])
Definition: G4GMocrenIO.cc:188
bool retrieveData2()
std::string & getID()
Definition: G4GMocrenIO.hh:261
void copyDoseDist(std::vector< class GMocrenDataPrimitive< double > > &_dose)
static unsigned int kPointerToModalityData
Definition: G4GMocrenIO.hh:187
int getNumDoseDist()
void getTrack(int _num, std::vector< float * > &_steps, std::vector< unsigned char * > &_color)
void clearTracks()
Definition: G4GMocrenIO.hh:439
static std::vector< class GMocrenTrack > kTracks
Definition: G4GMocrenIO.hh:218
void setTrackColors(std::vector< unsigned char * > &_trackColors)
void getMinMax(T _minmax[2])
Definition: G4GMocrenIO.cc:208
short * getModalityImage(int _z)
void getModalityImageMinMax(short _minmax[2])
void translate(std::vector< float > &_tranlate)
Definition: G4GMocrenIO.cc:283
bool retrieveData4()
std::vector< struct Edge > kDetector
Definition: G4GMocrenIO.hh:134
void getStep(float &_startx, float &_starty, float &_startz, float &_endx, float &_endy, float &_endz, int _num)
Definition: G4GMocrenIO.cc:266
void setModalityImageScale(double &_scale)
static std::string kFileName
Definition: G4GMocrenIO.hh:175
bool retrieveData3()
static std::string kDoseUnit
Definition: G4GMocrenIO.hh:209
bool mergeDoseDist(std::vector< class GMocrenDataPrimitive< double > > &_dose)
void getVoxelSpacing(float _spacing[3])
void setDoseDistCenterPosition(float _center[3], int _num=0)
void translateTracks(std::vector< float > &_translateo)
unsigned int getPointerToDoseDistData(int _elem=0)
void setNumberOfEvents(int &_numberOfEvents)
void setPointerToModalityData(unsigned int &_pointer)
bool storeData()
Definition: G4GMocrenIO.cc:454
void calcPointers4()
void calcPointers2()
void setName(std::string &_name)
Definition: G4GMocrenIO.hh:156
static std::string kId
Definition: G4GMocrenIO.hh:169
void getROIMinMax(short _minmax[2], int _num=0)
int & getNumberOfEvents()
void setShortDoseDist(short *_image, int _num=0)
void setDoseDistScale(double &_scale, int _num=0)
void addDetector(std::string &_name, std::vector< float * > &_det, unsigned char _color[3])
void setLittleEndianInput(bool _little)
static class GMocrenDataPrimitive< short > kModality
Definition: G4GMocrenIO.hh:201
void setColor(unsigned char _color[3])
Definition: G4GMocrenIO.hh:113
void setDoseDistSize(int _size[3], int _num=0)
static std::string kComment
Definition: G4GMocrenIO.hh:181
static std::vector< unsigned int > kPointerToDoseDistData
Definition: G4GMocrenIO.hh:189
static unsigned int kPointerToDetectorData
Definition: G4GMocrenIO.hh:195
void setModalityCenterPosition(float _center[3])
void getDetector(int _num, std::vector< float * > &_edges, std::vector< unsigned char * > &_color, std::string &_detectorName)
void setROISize(int _size[3], int _num=0)
void setDetector(std::vector< struct Edge > &_aDetector)
Definition: G4GMocrenIO.hh:149
static std::vector< float * > kSteps
Definition: G4GMocrenIO.hh:215
unsigned char kColor[3]
Definition: G4GMocrenIO.hh:99
void setROIScale(double &_scale, int _num=0)
void getDoseDistCenterPosition(float _center[3], int _num=0)
void getSize(int _size[3])
Definition: G4GMocrenIO.cc:192
void setName(std::string &_name)
Definition: G4GMocrenIO.cc:238
bool isDoseEmpty()
void setPointerToTrackData(unsigned int &_pointer)
void addPointerToDoseDistData(unsigned int &_pointer)
void setTracks(std::vector< float * > &_tracks)
void getDoseDistMinMax(short _minmax[2], int _num=0)
void setLittleEndianOutput(bool _little)
void setDoseDistName(std::string _name, int _num=0)
short getModalityImageMin()
int getNumberOfDetectors()
std::string getModalityImageUnit()
static std::string kModalityUnit
Definition: G4GMocrenIO.hh:204
void setModalityImageVoxelSpacing(float _size[3])
void setModalityImageDensityMap(std::vector< float > &_map)
void addStep(float _startx, float _starty, float _startz, float _endx, float _endy, float _endz)
Definition: G4GMocrenIO.cc:255
static unsigned int kPointerToROIData
Definition: G4GMocrenIO.hh:191
static unsigned int kPointerToTrackData
Definition: G4GMocrenIO.hh:193