37 #include "dcmtk/dcmdata/dcfilefo.h"
38 #include "dcmtk/dcmdata/dcdeftag.h"
39 #include "dcmtk/dcmrt/drtplan.h"
40 #include "dcmtk/dcmrt/seq/drtfgs.h"
41 #include "dcmtk/dcmrt/seq/drtrbs8.h"
42 #include "dcmtk/dcmrt/seq/drtbs.h"
43 #include "dcmtk/dcmrt/seq/drtblds1.h"
44 #include "dcmtk/dcmrt/seq/drtcps.h"
45 #include "dcmtk/dcmrt/seq/drtbldps.h"
46 #include "dcmtk/dcmrt/seq/drtcos.h"
47 #include "dcmtk/dcmrt/seq/drtbl2.h"
48 #include "dcmtk/dcmrt/seq/drtws.h"
69 OFVector<Float64> fvfloat;
71 DRTFractionGroupSequence frgSeq = rtplan.getFractionGroupSequence();
72 if( frgSeq.isEmpty() ) {
76 "DRTFractionGroupSequence is empty");
78 G4cout <<
"@@@@@ NUMBER OF FractionSequences " << frgSeq.getNumberOfItems() <<
G4endl;
79 frgSeq.gotoFirstItem();
80 for(
size_t i1 = 0; i1 < frgSeq.getNumberOfItems(); i1++ ) {
81 DRTFractionGroupSequence::Item &rfgItem = frgSeq.getCurrentItem();
82 rfgItem.getBeamDoseMeaning(fstr);
83 G4cout <<
" " << i1 <<
" BeamDoseMeaning " << fstr <<
G4endl;
84 rfgItem.getFractionGroupDescription(fstr);
85 G4cout <<
" " << i1 <<
" FractionGroupDescription " << fstr <<
G4endl;
86 rfgItem.getFractionGroupNumber(fint);
87 G4cout <<
" " << i1 <<
" FractionGroupNumber " << fint <<
G4endl;
88 rfgItem.getFractionPattern(fstr);
89 G4cout <<
" " << i1 <<
" FractionPattern " << fstr <<
G4endl;
90 rfgItem.getNumberOfBeams(fint);
91 G4cout <<
" " << i1 <<
" NumberOfBeams " << fint <<
G4endl;
92 theNumberOfBeams = fint;
93 rfgItem.getNumberOfBrachyApplicationSetups(fint);
94 G4cout <<
" " << i1 <<
" NumberOfBrachyApplicationSetups " << fint <<
G4endl;
95 CheckData0(
" NumberOfBrachyApplicationSetups ", fint);
96 rfgItem.getNumberOfFractionPatternDigitsPerDay(fint);
97 G4cout <<
" " << i1 <<
" NumberOfFractionPatternDigitsPerDay " << fint <<
G4endl;
98 rfgItem.getNumberOfFractionsPlanned(fint);
99 G4cout <<
" " << i1 <<
" NumberOfFractionsPlanned " << fint <<
G4endl;
100 rfgItem.getRepeatFractionCycleLength(fint);
101 G4cout <<
" " << i1 <<
" RepeatFractionCycleLength " << fint <<
G4endl;
102 DRTReferencedBeamSequenceInRTFractionSchemeModule refBeamSeq =
103 rfgItem.getReferencedBeamSequence();
104 G4cout <<
" @@@ NUMBER OF ReferencedBeamSequences " << refBeamSeq.getNumberOfItems() <<
G4endl;
106 refBeamSeq.gotoFirstItem();
107 for(
size_t i2 = 0; i2 < refBeamSeq.getNumberOfItems(); i2++ ) {
109 theBeams.push_back(db);
110 DRTReferencedBeamSequenceInRTFractionSchemeModule::Item &rbsItem =
111 refBeamSeq.getCurrentItem();
112 rbsItem.getBeamDeliveryDurationLimit(ffloat);
113 G4cout <<
" " << i2 <<
" BeamDeliveryDurationLimit " << ffloat <<
G4endl;
114 rbsItem.getBeamDose(ffloat);
115 G4cout <<
" " << i2 <<
" BeamDose " << ffloat <<
G4endl;
116 rbsItem.getBeamDoseSpecificationPoint(fvfloat);
117 G4cout <<
" " << i2 <<
" BeamDoseSpecificationPoint (" << fvfloat[0] <<
"," << fvfloat[1]
118 <<
"," << fvfloat[2] <<
")" <<
G4endl;
120 rbsItem.getBeamMeterset(ffloat);
121 G4cout <<
" " << i2 <<
" BeamMeterset " << ffloat <<
G4endl;
123 rbsItem.getReferencedBeamNumber(fint);
124 G4cout <<
" " << i2 <<
" ReferencedBeamNumber " << fint <<
G4endl;
126 refBeamSeq.gotoNextItem();
129 frgSeq.gotoNextItem();
133 DRTBeamSequence beamSeq = rtplan.getBeamSequence();
134 if( beamSeq.isEmpty() ) {
138 "DRTBeamSequence is empty");
140 G4cout <<
"@@@@@ NUMBER OF BeamSequences " << beamSeq.getNumberOfItems() <<
G4endl;
141 beamSeq.gotoFirstItem();
142 for(
size_t i1 = 0; i1 < beamSeq.getNumberOfItems(); i1++ ) {
144 DRTBeamSequence::Item &beamItem = beamSeq.getCurrentItem();
146 beamItem.getManufacturer(fstr);
147 G4cout <<
" " << i1 <<
" Manufacturer " << fstr <<
G4endl;
148 beamItem.getManufacturerModelName(fstr);
149 G4cout <<
" " << i1 <<
" ManufacturerModelName " << fstr <<
G4endl;
150 beamItem.getTreatmentMachineName(fstr);
151 G4cout <<
" " << i1 <<
" TreatmentMachineName " << fstr <<
G4endl;
152 beamItem.getPrimaryDosimeterUnit(fstr);
153 G4cout <<
" " << i1 <<
" PrimaryDosimeterUnit " << fstr <<
G4endl;
154 beamItem.getSourceAxisDistance(ffloat);
155 G4cout <<
" " << i1 <<
" SourceAxisDistance " << ffloat <<
G4endl;
158 DRTBeamLimitingDeviceSequenceInRTBeamsModule beamLDS = beamItem.getBeamLimitingDeviceSequence();
159 G4cout <<
" @@@ NUMBER OF BeamLimitingDeviceSequence " << beamLDS.getNumberOfItems() <<
G4endl;
160 beamLDS.gotoFirstItem();
161 for(
size_t i2 = 0; i2 < beamLDS.getNumberOfItems(); i2++ ) {
162 DRTBeamLimitingDeviceSequenceInRTBeamsModule::Item bldsItem = beamLDS.getCurrentItem();
166 beamLDS.gotoNextItem();
169 beamItem.getBeamNumber(fint);
170 G4cout <<
" " << i1 <<
" BeamNumber " << fint <<
G4endl;
172 beamItem.getBeamName(fstr);
174 beamItem.getBeamDescription(fstr);
175 G4cout <<
" " << i1 <<
" BeamDescription " << fstr <<
G4endl;
176 beamItem.getBeamType(fstr);
178 beamItem.getRadiationType(fstr);
179 G4cout <<
" " << i1 <<
" RadiationType " << fstr <<
G4endl;
181 beamItem.getTreatmentDeliveryType(fstr);
182 G4cout <<
" " << i1 <<
" TreatmentDeliveryType " << fstr <<
G4endl;
183 beamItem.getNumberOfWedges(fint);
184 G4cout <<
" " << i1 <<
" NumberOfWedges " << fint <<
G4endl;
185 DRTWedgeSequence beamWedge = beamItem.getWedgeSequence();
186 beamWedge.gotoFirstItem();
187 for(
size_t i2 = 0; i2 < beamWedge.getNumberOfItems(); i2++ ) {
188 DRTWedgeSequence::Item bwedItem = beamWedge.getCurrentItem();
191 beamWedge.gotoNextItem();
194 beamItem.getNumberOfCompensators(fint);
195 G4cout <<
" " << i1 <<
" NumberOfCompensators " << fint <<
G4endl;
196 DRTCompensatorSequence beamCompens = beamItem.getCompensatorSequence();
197 beamCompens.gotoFirstItem();
198 for(
size_t i2 = 0; i2 < beamCompens.getNumberOfItems(); i2++ ) {
199 DRTCompensatorSequence::Item bcompItem = beamCompens.getCurrentItem();
202 beamCompens.gotoNextItem();
205 beamItem.getNumberOfBoli(fint);
206 G4cout <<
" " << i1 <<
" NumberOfBoli " << fint <<
G4endl;
209 beamItem.getNumberOfBlocks(fint);
210 G4cout <<
" " << i1 <<
" NumberOfBlocks " << fint <<
G4endl;
211 DRTBlockSequenceInRTBeamsModule beamBlock = beamItem.getBlockSequence();
212 beamBlock.gotoFirstItem();
213 for(
size_t i2 = 0; i2 < beamBlock.getNumberOfItems(); i2++ ) {
214 DRTBlockSequenceInRTBeamsModule::Item bblItem = beamBlock.getCurrentItem();
217 beamBlock.gotoNextItem();
220 beamItem.getFinalCumulativeMetersetWeight(fstr);
221 G4cout <<
" " << i1 <<
" FinalCumulativeMetersetWeight " << fstr <<
G4endl;
222 beamItem.getDeviceSerialNumber(fstr);
223 G4cout <<
" " << i1 <<
" DeviceSerialNumber " << fstr <<
G4endl;
224 beamItem.getHighDoseTechniqueType(fstr);
225 G4cout <<
" " << i1 <<
" HighDoseTechniqueType " << fstr <<
G4endl;
226 beamItem.getInstitutionAddress(fstr);
227 G4cout <<
" " << i1 <<
" InstitutionAddress " << fstr <<
G4endl;
228 beamItem.getInstitutionName(fstr);
229 G4cout <<
" " << i1 <<
" InstitutionName " << fstr <<
G4endl;
230 beamItem.getInstitutionalDepartmentName(fstr);
231 G4cout <<
" " << i1 <<
" InstitutionalDepartmentName " << fstr <<
G4endl;
232 beamItem.getReferencedPatientSetupNumber(fint);
233 G4cout <<
" " << i1 <<
" ReferencedPatientSetupNumber " << fint <<
G4endl;
234 beamItem.getReferencedToleranceTableNumber(fint);
235 G4cout <<
" " << i1 <<
" ReferencedToleranceTableNumber " << fint <<
G4endl;
236 beamItem.getTotalBlockTrayFactor(ffloat);
237 G4cout <<
" " << i1 <<
" TotalBlockTrayFactor " << ffloat <<
G4endl;
238 beamItem.getTotalCompensatorTrayFactor(ffloat);
239 G4cout <<
" " << i1 <<
" TotalCompensatorTrayFactor " << ffloat <<
G4endl;
241 beamItem.getNumberOfControlPoints(fint);
242 DRTControlPointSequence controlPSeq = beamItem.getControlPointSequence();
243 G4cout <<
" @@@ NUMBER OF ControlPointSequences " << controlPSeq.getNumberOfItems() <<
" = "
245 controlPSeq.gotoFirstItem();
248 for(
size_t i2 = 0; i2 < controlPSeq.getNumberOfItems(); i2++ ) {
249 DRTControlPointSequence::Item &cpItem = controlPSeq.getCurrentItem();
253 controlPSeq.gotoNextItem();
257 beamSeq.gotoNextItem();
274 (title +
" exists, and code is not ready ").c_str());
281 for(
size_t ii = 0; ii < theBeams.size(); ii++ ){
282 theBeams[ii]->SetControlPointMetersets();
289 for(
size_t ii = 0; ii < theBeams.size(); ii++ ){
290 theBeams[ii]->DumpToFile();
G4double G4ParticleHPJENDLHEData::G4double result
void SetMeterset(Float64 dat)
CLHEP::Hep3Vector G4ThreeVector
void SetRadiationType(OFString dat)
DicomFilePlan(DcmDataset *dset)
void AddDevice(DicomVBeamDevice *db)
void CheckData0(OFString title, Sint32 val)
void SetDoseSpecificationPoint(G4ThreeVector point)
DicomBeamControlPoint * GetControlPoint(size_t ii)
G4GLOB_DLL std::ostream G4cout
void AddCompensator(DicomBeamCompensator *db)
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *comments)
void AddControlPoint(DicomBeamControlPoint *db)
size_t GetNControlPoints() const
void AddWedge(DicomBeamWedge *db)
void SetSourceAxisDistance(Float64 dat)
void SetControlPointMetersets()
void SetNumber(Sint32 dat)
void AddBlock(DicomBeamBlock *db)