Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/examples/extended/medical/DICOM/dicomReader/src/DicomFilePlan.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/medical/DICOM/dicomReader/src/DicomFilePlan.cc (Version 11.3.0) and /examples/extended/medical/DICOM/dicomReader/src/DicomFilePlan.cc (Version 10.6.p1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 #include "DicomFilePlan.hh"                        26 #include "DicomFilePlan.hh"
 27                                                << 
 28 #include "DicomBeam.hh"                            27 #include "DicomBeam.hh"
 29 #include "DicomBeamBlock.hh"                   << 
 30 #include "DicomBeamCompensator.hh"             << 
 31 #include "DicomBeamControlPoint.hh"            << 
 32 #include "DicomBeamDevicePos.hh"               << 
 33 #include "DicomBeamDeviceRef.hh"                   28 #include "DicomBeamDeviceRef.hh"
                                                   >>  29 #include "DicomBeamDevicePos.hh"
                                                   >>  30 #include "DicomBeamControlPoint.hh"
                                                   >>  31 #include "DicomBeamCompensator.hh"
                                                   >>  32 #include "DicomBeamBlock.hh"
 34 #include "DicomBeamWedge.hh"                       33 #include "DicomBeamWedge.hh"
 35 #include "dcmtk/dcmdata/dcdeftag.h"            <<  34 
                                                   >>  35 #include "G4ThreeVector.hh"
                                                   >>  36 
 36 #include "dcmtk/dcmdata/dcfilefo.h"                37 #include "dcmtk/dcmdata/dcfilefo.h"
                                                   >>  38 #include "dcmtk/dcmdata/dcdeftag.h"
 37 #include "dcmtk/dcmrt/drtplan.h"                   39 #include "dcmtk/dcmrt/drtplan.h"
 38 #include "dcmtk/dcmrt/seq/drtbl2.h"  // for Bl <<  40 #include "dcmtk/dcmrt/seq/drtfgs.h" // DRTFractionGroupSequence
 39 #include "dcmtk/dcmrt/seq/drtbldps.h"  // for  <<  41 #include "dcmtk/dcmrt/seq/drtrbs8.h" // DRTReferencedBeamSequenceInRTFractionSchemeModule
                                                   >>  42 #include "dcmtk/dcmrt/seq/drtbs.h"     // for BeamSequence
 40 #include "dcmtk/dcmrt/seq/drtblds1.h"  // for      43 #include "dcmtk/dcmrt/seq/drtblds1.h"  // for BeamLimitingDeviceSequence
 41 #include "dcmtk/dcmrt/seq/drtbs.h"  // for Bea <<  44 #include "dcmtk/dcmrt/seq/drtcps.h"    // for ControlPointSequence
 42 #include "dcmtk/dcmrt/seq/drtcos.h"  // for Co <<  45 #include "dcmtk/dcmrt/seq/drtbldps.h"  // for BeamLimitingDevicePositionSequence
 43 #include "dcmtk/dcmrt/seq/drtcps.h"  // for Co <<  46 #include "dcmtk/dcmrt/seq/drtcos.h" // for CompensatorSequence
 44 #include "dcmtk/dcmrt/seq/drtfgs.h"  // DRTFra <<  47 #include "dcmtk/dcmrt/seq/drtbl2.h" // for BlockSequence
 45 #include "dcmtk/dcmrt/seq/drtrbs8.h"  // DRTRe <<  48 #include "dcmtk/dcmrt/seq/drtws.h"     // for WedgeSequence
 46 #include "dcmtk/dcmrt/seq/drtws.h"  // for Wed << 
 47                                                << 
 48 #include "G4ThreeVector.hh"                    << 
 49                                                    49 
 50 //....oooOO0OOooo........oooOO0OOooo........oo     50 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 51 DicomFilePlan::DicomFilePlan(DcmDataset* dset) <<  51 DicomFilePlan::DicomFilePlan(DcmDataset* dset) : DicomVFile(dset)
                                                   >>  52 {
                                                   >>  53 }
 52                                                    54 
 53 //....oooOO0OOooo........oooOO0OOooo........oo     55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
 54 void DicomFilePlan::ReadData()                     56 void DicomFilePlan::ReadData()
 55 {                                                  57 {
 56   DRTPlanIOD rtplan;                               58   DRTPlanIOD rtplan;
 57   OFCondition result = rtplan.read(*theDataset     59   OFCondition result = rtplan.read(*theDataset);
 58   if (!result.good()) {                            60   if (!result.good()) {
 59     G4Exception("DicomFilePlan::ReadData", "DF <<  61     G4Exception("DicomFilePlan::ReadData",
                                                   >>  62                 "DFS001",
                                                   >>  63                 FatalException,
                                                   >>  64                 result.text());
 60   }                                                65   }
 61   OFString fstr;                                   66   OFString fstr;
 62   Sint32 fint;                                     67   Sint32 fint;
 63   Float64 ffloat;                                  68   Float64 ffloat;
 64   OFVector<Float64> fvfloat;                   <<  69   OFVector<Float64> fvfloat; 
 65                                                <<  70   
 66   DRTFractionGroupSequence frgSeq = rtplan.get     71   DRTFractionGroupSequence frgSeq = rtplan.getFractionGroupSequence();
 67   if (frgSeq.isEmpty()) {                      <<  72   if( frgSeq.isEmpty() ) {
 68     G4Exception("DicomFilePlan::ReadData", "DF <<  73     G4Exception("DicomFilePlan::ReadData",
                                                   >>  74                 "DFS002",
                                                   >>  75                 JustWarning,
 69                 "DRTFractionGroupSequence is e     76                 "DRTFractionGroupSequence is empty");
 70   }                                                77   }
 71   G4cout << "@@@@@ NUMBER OF FractionSequences     78   G4cout << "@@@@@ NUMBER OF FractionSequences " << frgSeq.getNumberOfItems() << G4endl;
 72   frgSeq.gotoFirstItem();                          79   frgSeq.gotoFirstItem();
 73   for (size_t i1 = 0; i1 < frgSeq.getNumberOfI <<  80   for( size_t i1 = 0; i1 < frgSeq.getNumberOfItems(); i1++ ) {
 74     DRTFractionGroupSequence::Item& rfgItem =  <<  81     DRTFractionGroupSequence::Item &rfgItem = frgSeq.getCurrentItem();
 75     rfgItem.getBeamDoseMeaning(fstr);              82     rfgItem.getBeamDoseMeaning(fstr);
 76     G4cout << " " << i1 << " BeamDoseMeaning "     83     G4cout << " " << i1 << " BeamDoseMeaning " << fstr << G4endl;
 77     rfgItem.getFractionGroupDescription(fstr);     84     rfgItem.getFractionGroupDescription(fstr);
 78     G4cout << " " << i1 << " FractionGroupDesc     85     G4cout << " " << i1 << " FractionGroupDescription " << fstr << G4endl;
 79     rfgItem.getFractionGroupNumber(fint);          86     rfgItem.getFractionGroupNumber(fint);
 80     G4cout << " " << i1 << " FractionGroupNumb     87     G4cout << " " << i1 << " FractionGroupNumber " << fint << G4endl;
 81     rfgItem.getFractionPattern(fstr);              88     rfgItem.getFractionPattern(fstr);
 82     G4cout << " " << i1 << " FractionPattern "     89     G4cout << " " << i1 << " FractionPattern " << fstr << G4endl;
 83     rfgItem.getNumberOfBeams(fint);                90     rfgItem.getNumberOfBeams(fint);
 84     G4cout << " " << i1 << " NumberOfBeams " <     91     G4cout << " " << i1 << " NumberOfBeams " << fint << G4endl;
 85     theNumberOfBeams = fint;                       92     theNumberOfBeams = fint;
 86     rfgItem.getNumberOfBrachyApplicationSetups     93     rfgItem.getNumberOfBrachyApplicationSetups(fint);
 87     G4cout << " " << i1 << " NumberOfBrachyApp     94     G4cout << " " << i1 << " NumberOfBrachyApplicationSetups " << fint << G4endl;
 88     CheckData0(" NumberOfBrachyApplicationSetu     95     CheckData0(" NumberOfBrachyApplicationSetups ", fint);
 89     rfgItem.getNumberOfFractionPatternDigitsPe     96     rfgItem.getNumberOfFractionPatternDigitsPerDay(fint);
 90     G4cout << " " << i1 << " NumberOfFractionP     97     G4cout << " " << i1 << " NumberOfFractionPatternDigitsPerDay " << fint << G4endl;
 91     rfgItem.getNumberOfFractionsPlanned(fint);     98     rfgItem.getNumberOfFractionsPlanned(fint);
 92     G4cout << " " << i1 << " NumberOfFractions     99     G4cout << " " << i1 << " NumberOfFractionsPlanned " << fint << G4endl;
 93     rfgItem.getRepeatFractionCycleLength(fint)    100     rfgItem.getRepeatFractionCycleLength(fint);
 94     G4cout << " " << i1 << " RepeatFractionCyc    101     G4cout << " " << i1 << " RepeatFractionCycleLength " << fint << G4endl;
 95     DRTReferencedBeamSequenceInRTFractionSchem << 102     DRTReferencedBeamSequenceInRTFractionSchemeModule refBeamSeq = 
 96       rfgItem.getReferencedBeamSequence();     << 103      rfgItem.getReferencedBeamSequence();
 97     G4cout << " @@@ NUMBER OF ReferencedBeamSe    104     G4cout << " @@@ NUMBER OF ReferencedBeamSequences " << refBeamSeq.getNumberOfItems() << G4endl;
 98                                                   105 
 99     refBeamSeq.gotoFirstItem();                   106     refBeamSeq.gotoFirstItem();
100     for (size_t i2 = 0; i2 < refBeamSeq.getNum << 107     for( size_t i2 = 0; i2 < refBeamSeq.getNumberOfItems(); i2++ ) {
101       DicomBeam* db = new DicomBeam();            108       DicomBeam* db = new DicomBeam();
102       theBeams.push_back(db);                     109       theBeams.push_back(db);
103       DRTReferencedBeamSequenceInRTFractionSch << 110       DRTReferencedBeamSequenceInRTFractionSchemeModule::Item &rbsItem = 
104         refBeamSeq.getCurrentItem();           << 111        refBeamSeq.getCurrentItem();
105       rbsItem.getBeamDeliveryDurationLimit(ffl    112       rbsItem.getBeamDeliveryDurationLimit(ffloat);
106       G4cout << "  " << i2 << " BeamDeliveryDu    113       G4cout << "  " << i2 << " BeamDeliveryDurationLimit " << ffloat << G4endl;
107       rbsItem.getBeamDose(ffloat);                114       rbsItem.getBeamDose(ffloat);
108       G4cout << "  " << i2 << " BeamDose " <<  << 115       G4cout << "  " << i2 << " BeamDose " << ffloat << G4endl; // dose at dose point
109       rbsItem.getBeamDoseSpecificationPoint(fv    116       rbsItem.getBeamDoseSpecificationPoint(fvfloat);
110       G4cout << "  " << i2 << " BeamDoseSpecif << 117       G4cout << "  " << i2 << " BeamDoseSpecificationPoint (" << fvfloat[0] << "," << fvfloat[1] 
111              << "," << fvfloat[2] << ")" << G4    118              << "," << fvfloat[2] << ")" << G4endl;
112       db->SetDoseSpecificationPoint(G4ThreeVec << 119       db->SetDoseSpecificationPoint(G4ThreeVector(fvfloat[0],fvfloat[1],fvfloat[2]));
113       rbsItem.getBeamMeterset(ffloat);            120       rbsItem.getBeamMeterset(ffloat);
114       G4cout << "  " << i2 << " BeamMeterset "    121       G4cout << "  " << i2 << " BeamMeterset " << ffloat << G4endl;
115       db->SetMeterset(ffloat);                    122       db->SetMeterset(ffloat);
116       rbsItem.getReferencedBeamNumber(fint);      123       rbsItem.getReferencedBeamNumber(fint);
117       G4cout << "  " << i2 << " ReferencedBeam    124       G4cout << "  " << i2 << " ReferencedBeamNumber " << fint << G4endl;
118                                                << 125     
119       refBeamSeq.gotoNextItem();                  126       refBeamSeq.gotoNextItem();
120     }                                             127     }
121                                                   128 
122     frgSeq.gotoNextItem();                        129     frgSeq.gotoNextItem();
123   }                                               130   }
124                                                   131 
                                                   >> 132 
125   DRTBeamSequence beamSeq = rtplan.getBeamSequ    133   DRTBeamSequence beamSeq = rtplan.getBeamSequence();
126   if (beamSeq.isEmpty()) {                     << 134   if( beamSeq.isEmpty() ) {
127     G4Exception("DicomFilePlan::ReadData", "DF << 135     G4Exception("DicomFilePlan::ReadData",
                                                   >> 136                 "DFS002",
                                                   >> 137                 JustWarning,
                                                   >> 138                 "DRTBeamSequence is empty");
128   }                                               139   }
129   G4cout << "@@@@@ NUMBER OF BeamSequences " <    140   G4cout << "@@@@@ NUMBER OF BeamSequences " << beamSeq.getNumberOfItems() << G4endl;
130   beamSeq.gotoFirstItem();                        141   beamSeq.gotoFirstItem();
131   for (size_t i1 = 0; i1 < beamSeq.getNumberOf << 142   for( size_t i1 = 0; i1 < beamSeq.getNumberOfItems(); i1++ ) {
132     DicomBeam* db = theBeams[i1];                 143     DicomBeam* db = theBeams[i1];
133     DRTBeamSequence::Item& beamItem = beamSeq. << 144     DRTBeamSequence::Item &beamItem = beamSeq.getCurrentItem();
134                                                   145 
135     beamItem.getManufacturer(fstr);               146     beamItem.getManufacturer(fstr);
136     G4cout << " " << i1 << " Manufacturer " <<    147     G4cout << " " << i1 << " Manufacturer " << fstr << G4endl;
137     beamItem.getManufacturerModelName(fstr);      148     beamItem.getManufacturerModelName(fstr);
138     G4cout << " " << i1 << " ManufacturerModel    149     G4cout << " " << i1 << " ManufacturerModelName " << fstr << G4endl;
139     beamItem.getTreatmentMachineName(fstr);       150     beamItem.getTreatmentMachineName(fstr);
140     G4cout << " " << i1 << " TreatmentMachineN    151     G4cout << " " << i1 << " TreatmentMachineName " << fstr << G4endl;
141     beamItem.getPrimaryDosimeterUnit(fstr);       152     beamItem.getPrimaryDosimeterUnit(fstr);
142     G4cout << " " << i1 << " PrimaryDosimeterU    153     G4cout << " " << i1 << " PrimaryDosimeterUnit " << fstr << G4endl;
143     beamItem.getSourceAxisDistance(ffloat);       154     beamItem.getSourceAxisDistance(ffloat);
144     G4cout << " " << i1 << " SourceAxisDistanc    155     G4cout << " " << i1 << " SourceAxisDistance " << ffloat << G4endl;
145     db->SetSourceAxisDistance(ffloat);            156     db->SetSourceAxisDistance(ffloat);
146                                                << 157     
147     DRTBeamLimitingDeviceSequenceInRTBeamsModu    158     DRTBeamLimitingDeviceSequenceInRTBeamsModule beamLDS = beamItem.getBeamLimitingDeviceSequence();
148     G4cout << " @@@ NUMBER OF BeamLimitingDevi    159     G4cout << " @@@ NUMBER OF BeamLimitingDeviceSequence " << beamLDS.getNumberOfItems() << G4endl;
149     beamLDS.gotoFirstItem();                      160     beamLDS.gotoFirstItem();
150     for (size_t i2 = 0; i2 < beamLDS.getNumber << 161     for( size_t i2 = 0; i2 < beamLDS.getNumberOfItems(); i2++ ) {
151       DRTBeamLimitingDeviceSequenceInRTBeamsMo    162       DRTBeamLimitingDeviceSequenceInRTBeamsModule::Item bldsItem = beamLDS.getCurrentItem();
152       DicomBeamDeviceRef* dbd = new DicomBeamD    163       DicomBeamDeviceRef* dbd = new DicomBeamDeviceRef(bldsItem);
153       db->AddDevice(dbd);                         164       db->AddDevice(dbd);
154                                                << 165       
155       beamLDS.gotoNextItem();                     166       beamLDS.gotoNextItem();
156     }                                             167     }
157                                                << 168  
158     beamItem.getBeamNumber(fint);                 169     beamItem.getBeamNumber(fint);
159     G4cout << " " << i1 << " BeamNumber " << f    170     G4cout << " " << i1 << " BeamNumber " << fint << G4endl;
160     db->SetNumber(fint);                          171     db->SetNumber(fint);
161     beamItem.getBeamName(fstr);                   172     beamItem.getBeamName(fstr);
162     G4cout << " " << i1 << " BeamName " << fst    173     G4cout << " " << i1 << " BeamName " << fstr << G4endl;
163     beamItem.getBeamDescription(fstr);            174     beamItem.getBeamDescription(fstr);
164     G4cout << " " << i1 << " BeamDescription "    175     G4cout << " " << i1 << " BeamDescription " << fstr << G4endl;
165     beamItem.getBeamType(fstr);                   176     beamItem.getBeamType(fstr);
166     G4cout << " " << i1 << " BeamType " << fst    177     G4cout << " " << i1 << " BeamType " << fstr << G4endl;
167     beamItem.getRadiationType(fstr);              178     beamItem.getRadiationType(fstr);
168     G4cout << " " << i1 << " RadiationType " <    179     G4cout << " " << i1 << " RadiationType " << fstr << G4endl;
169     db->SetRadiationType(fstr);                   180     db->SetRadiationType(fstr);
170     beamItem.getTreatmentDeliveryType(fstr);      181     beamItem.getTreatmentDeliveryType(fstr);
171     G4cout << " " << i1 << " TreatmentDelivery    182     G4cout << " " << i1 << " TreatmentDeliveryType " << fstr << G4endl;
172     beamItem.getNumberOfWedges(fint);             183     beamItem.getNumberOfWedges(fint);
173     G4cout << " " << i1 << " NumberOfWedges "     184     G4cout << " " << i1 << " NumberOfWedges " << fint << G4endl;
174     DRTWedgeSequence beamWedge = beamItem.getW    185     DRTWedgeSequence beamWedge = beamItem.getWedgeSequence();
175     beamWedge.gotoFirstItem();                    186     beamWedge.gotoFirstItem();
176     for (size_t i2 = 0; i2 < beamWedge.getNumb << 187     for( size_t i2 = 0; i2 < beamWedge.getNumberOfItems(); i2++ ) {
177       DRTWedgeSequence::Item bwedItem = beamWe    188       DRTWedgeSequence::Item bwedItem = beamWedge.getCurrentItem();
178       DicomBeamWedge* dbwed = new DicomBeamWed << 189       DicomBeamWedge* dbwed = new DicomBeamWedge( bwedItem );
179       db->AddWedge(dbwed);                     << 190       db->AddWedge( dbwed );
180       beamWedge.gotoNextItem();                   191       beamWedge.gotoNextItem();
181     }                                             192     }
182                                                << 193     
183     beamItem.getNumberOfCompensators(fint);       194     beamItem.getNumberOfCompensators(fint);
184     G4cout << " " << i1 << " NumberOfCompensat    195     G4cout << " " << i1 << " NumberOfCompensators " << fint << G4endl;
185     DRTCompensatorSequence beamCompens = beamI    196     DRTCompensatorSequence beamCompens = beamItem.getCompensatorSequence();
186     beamCompens.gotoFirstItem();                  197     beamCompens.gotoFirstItem();
187     for (size_t i2 = 0; i2 < beamCompens.getNu << 198     for( size_t i2 = 0; i2 < beamCompens.getNumberOfItems(); i2++ ) {
188       DRTCompensatorSequence::Item bcompItem =    199       DRTCompensatorSequence::Item bcompItem = beamCompens.getCurrentItem();
189       DicomBeamCompensator* dbcomp = new Dicom << 200       DicomBeamCompensator* dbcomp = new DicomBeamCompensator( bcompItem );
190       db->AddCompensator(dbcomp);              << 201       db->AddCompensator( dbcomp );
191       beamCompens.gotoNextItem();                 202       beamCompens.gotoNextItem();
192     }                                             203     }
193                                                << 204   
194     beamItem.getNumberOfBoli(fint);               205     beamItem.getNumberOfBoli(fint);
195     G4cout << " " << i1 << " NumberOfBoli " <<    206     G4cout << " " << i1 << " NumberOfBoli " << fint << G4endl;
196     // Bolus has no relevant info (see drtrbos << 207     //Bolus has no relevant info (see drtrbos1.h)
197                                                   208 
198     beamItem.getNumberOfBlocks(fint);             209     beamItem.getNumberOfBlocks(fint);
199     G4cout << " " << i1 << " NumberOfBlocks "     210     G4cout << " " << i1 << " NumberOfBlocks " << fint << G4endl;
200     DRTBlockSequenceInRTBeamsModule beamBlock     211     DRTBlockSequenceInRTBeamsModule beamBlock = beamItem.getBlockSequence();
201     beamBlock.gotoFirstItem();                    212     beamBlock.gotoFirstItem();
202     for (size_t i2 = 0; i2 < beamBlock.getNumb << 213     for( size_t i2 = 0; i2 < beamBlock.getNumberOfItems(); i2++ ) {
203       DRTBlockSequenceInRTBeamsModule::Item bb    214       DRTBlockSequenceInRTBeamsModule::Item bblItem = beamBlock.getCurrentItem();
204       DicomBeamBlock* dbbl = new DicomBeamBloc << 215       DicomBeamBlock* dbbl = new DicomBeamBlock( bblItem );
205       db->AddBlock(dbbl);                      << 216       db->AddBlock( dbbl );
206       beamBlock.gotoNextItem();                   217       beamBlock.gotoNextItem();
207     }                                             218     }
208                                                   219 
209     beamItem.getFinalCumulativeMetersetWeight(    220     beamItem.getFinalCumulativeMetersetWeight(fstr);
210     G4cout << " " << i1 << " FinalCumulativeMe    221     G4cout << " " << i1 << " FinalCumulativeMetersetWeight " << fstr << G4endl;
211     beamItem.getDeviceSerialNumber(fstr);         222     beamItem.getDeviceSerialNumber(fstr);
212     G4cout << " " << i1 << " DeviceSerialNumbe    223     G4cout << " " << i1 << " DeviceSerialNumber " << fstr << G4endl;
213     beamItem.getHighDoseTechniqueType(fstr);      224     beamItem.getHighDoseTechniqueType(fstr);
214     G4cout << " " << i1 << " HighDoseTechnique    225     G4cout << " " << i1 << " HighDoseTechniqueType " << fstr << G4endl;
215     beamItem.getInstitutionAddress(fstr);         226     beamItem.getInstitutionAddress(fstr);
216     G4cout << " " << i1 << " InstitutionAddres    227     G4cout << " " << i1 << " InstitutionAddress " << fstr << G4endl;
217     beamItem.getInstitutionName(fstr);            228     beamItem.getInstitutionName(fstr);
218     G4cout << " " << i1 << " InstitutionName "    229     G4cout << " " << i1 << " InstitutionName " << fstr << G4endl;
219     beamItem.getInstitutionalDepartmentName(fs    230     beamItem.getInstitutionalDepartmentName(fstr);
220     G4cout << " " << i1 << " InstitutionalDepa    231     G4cout << " " << i1 << " InstitutionalDepartmentName " << fstr << G4endl;
221     beamItem.getReferencedPatientSetupNumber(f    232     beamItem.getReferencedPatientSetupNumber(fint);
222     G4cout << " " << i1 << " ReferencedPatient    233     G4cout << " " << i1 << " ReferencedPatientSetupNumber " << fint << G4endl;
223     beamItem.getReferencedToleranceTableNumber    234     beamItem.getReferencedToleranceTableNumber(fint);
224     G4cout << " " << i1 << " ReferencedToleran    235     G4cout << " " << i1 << " ReferencedToleranceTableNumber " << fint << G4endl;
225     beamItem.getTotalBlockTrayFactor(ffloat);     236     beamItem.getTotalBlockTrayFactor(ffloat);
226     G4cout << " " << i1 << " TotalBlockTrayFac    237     G4cout << " " << i1 << " TotalBlockTrayFactor " << ffloat << G4endl;
227     beamItem.getTotalCompensatorTrayFactor(ffl    238     beamItem.getTotalCompensatorTrayFactor(ffloat);
228     G4cout << " " << i1 << " TotalCompensatorT    239     G4cout << " " << i1 << " TotalCompensatorTrayFactor " << ffloat << G4endl;
229                                                << 240     
230     beamItem.getNumberOfControlPoints(fint);      241     beamItem.getNumberOfControlPoints(fint);
231     DRTControlPointSequence controlPSeq = beam    242     DRTControlPointSequence controlPSeq = beamItem.getControlPointSequence();
232     G4cout << " @@@ NUMBER OF ControlPointSequ << 243     G4cout << " @@@ NUMBER OF ControlPointSequences " << controlPSeq.getNumberOfItems() << " = " 
233            << fint << G4endl;                     244            << fint << G4endl;
234     controlPSeq.gotoFirstItem();                  245     controlPSeq.gotoFirstItem();
235     DicomBeamControlPoint* dbcp0 = 0;          << 246     DicomBeamControlPoint* dbcp0 = 0; 
236     // Only first ControlPoint has some info i << 247     // Only first ControlPoint has some info if it does not change 
237     for (size_t i2 = 0; i2 < controlPSeq.getNu << 248     for( size_t i2 = 0; i2 < controlPSeq.getNumberOfItems(); i2++ ) {
238       DRTControlPointSequence::Item& cpItem =  << 249       DRTControlPointSequence::Item &cpItem = controlPSeq.getCurrentItem();
239       if (db->GetNControlPoints() != 0) dbcp0  << 250       if( db->GetNControlPoints() != 0 ) dbcp0 = db->GetControlPoint(0);
240       DicomBeamControlPoint* dbcp = new DicomB << 251       DicomBeamControlPoint* dbcp = new DicomBeamControlPoint( cpItem, dbcp0 );
241       db->AddControlPoint(dbcp);               << 252       db->AddControlPoint( dbcp );
242       controlPSeq.gotoNextItem();                 253       controlPSeq.gotoNextItem();
                                                   >> 254   
243     }                                             255     }
244                                                << 256     
245     beamSeq.gotoNextItem();                       257     beamSeq.gotoNextItem();
246   }                                               258   }
247                                                   259 
248   //(300a,0180) SQ (Sequence with explicit len    260   //(300a,0180) SQ (Sequence with explicit length #=1)      #  30, 1 PatientSetupSequence
249   //(300c,0060) SQ (Sequence with explicit len    261   //(300c,0060) SQ (Sequence with explicit length #=1)      # 112, 1 ReferencedStructureSetSequence
250   //(300e,0002) CS [UNAPPROVED]                   262   //(300e,0002) CS [UNAPPROVED]                             #  10, 1 ApprovalStatus
251   //(7fe0,0010) OW (no value available)           263   //(7fe0,0010) OW (no value available)                     #   0, 1 PixelData
                                                   >> 264 
252 }                                                 265 }
253                                                   266 
254 //....oooOO0OOooo........oooOO0OOooo........oo    267 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
255 void DicomFilePlan::CheckData0(OFString title, << 268 void DicomFilePlan::CheckData0(OFString title, Sint32 val )
256 {                                                 269 {
257   if (val != 0) {                              << 270   if( val != 0 ){
258     G4Exception("DicomFilePlan::CheckData", "D << 271     G4Exception("DicomFilePlan::CheckData",
                                                   >> 272                 "DFP003",
                                                   >> 273                 FatalException,
259                 (title + " exists, and code is    274                 (title + " exists, and code is not ready ").c_str());
260   }                                               275   }
261 }                                                 276 }
262                                                   277 
263 //....oooOO0OOooo........oooOO0OOooo........oo    278 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
264 void DicomFilePlan::SetControlPointMetersets()    279 void DicomFilePlan::SetControlPointMetersets()
265 {                                                 280 {
266   for (size_t ii = 0; ii < theBeams.size(); ii << 281   for( size_t ii = 0; ii < theBeams.size(); ii++ ){
267     theBeams[ii]->SetControlPointMetersets();     282     theBeams[ii]->SetControlPointMetersets();
268   }                                               283   }
269 }                                                 284 }
270                                                   285 
271 //....oooOO0OOooo........oooOO0OOooo........oo    286 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
272 void DicomFilePlan::DumpToFile()                  287 void DicomFilePlan::DumpToFile()
273 {                                                 288 {
274   for (size_t ii = 0; ii < theBeams.size(); ii << 289   for( size_t ii = 0; ii < theBeams.size(); ii++ ){
275     theBeams[ii]->DumpToFile();                   290     theBeams[ii]->DumpToFile();
276   }                                               291   }
277 }                                                 292 }
278                                                   293