File size: 18,121 Bytes
b51cd04
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
import pydicom
import numpy as np
import math
import time
import pickle, scipy



class RTplan:

  def __init__(self):
    self.SeriesInstanceUID = ""
    self.SOPInstanceUID = ""
    self.PatientInfo = {}
    self.StudyInfo = {}
    self.DcmFile = ""
    self.Modality = ""
    self.RadiationType = ""
    self.ScanMode = ""
    self.TreatmentMachineName = ""
    self.NumberOfFractionsPlanned = 1
    self.NumberOfSpots = 0
    self.Beams = []
    self.TotalMeterset = 0.0
    self.PlanName = ""
    self.isLoaded = 0
    self.beamlets = []
    self.OriginalDicomDataset = []
    
    
    
  def print_plan_info(self, prefix=""):
    print(prefix + "Plan: " + self.SeriesInstanceUID)
    print(prefix + "   " + self.DcmFile)
    
    
  
  def import_Dicom_plan(self):
    if(self.isLoaded == 1):
      print("Warning: RTplan " + self.SeriesInstanceUID + " is already loaded")
      return
      
    dcm = pydicom.dcmread(self.DcmFile)
    
    self.OriginalDicomDataset = dcm
    
    # Photon plan
    if dcm.SOPClassUID == "1.2.840.10008.5.1.4.1.1.481.5": 
      print("ERROR: Conventional radiotherapy (photon) plans are not supported")
      self.Modality = "Radiotherapy"
      return
  
    # Ion plan  
    elif dcm.SOPClassUID == "1.2.840.10008.5.1.4.1.1.481.8":
      self.Modality = "Ion therapy"
    
      if dcm.IonBeamSequence[0].RadiationType == "PROTON":
        self.RadiationType = "Proton"
      else:
        print("ERROR: Radiation type " + dcm.IonBeamSequence[0].RadiationType + " not supported")
        self.RadiationType = dcm.IonBeamSequence[0].RadiationType
        return
       
      if dcm.IonBeamSequence[0].ScanMode == "MODULATED":
        self.ScanMode = "MODULATED" # PBS
      else:
        print("ERROR: Scan mode " + dcm.IonBeamSequence[0].ScanMode + " not supported")
        self.ScanMode = dcm.IonBeamSequence[0].ScanMode
        return 
    
    # Other  
    else:
      print("ERROR: Unknown SOPClassUID " + dcm.SOPClassUID + " for file " + self.DcmFile)
      self.Modality = "Unknown"
      return
      
    # Start parsing PBS plan
    self.SOPInstanceUID = dcm.SOPInstanceUID
    self.NumberOfFractionsPlanned = int(dcm.FractionGroupSequence[0].NumberOfFractionsPlanned)
    self.NumberOfSpots = 0
    self.TotalMeterset = 0  
    
    if(hasattr(dcm.IonBeamSequence[0], 'TreatmentMachineName')):
      self.TreatmentMachineName = dcm.IonBeamSequence[0].TreatmentMachineName
    else:
      self.TreatmentMachineName = ""
  
    for dcm_beam in dcm.IonBeamSequence:
      if dcm_beam.TreatmentDeliveryType != "TREATMENT":
        continue
      
      first_layer = dcm_beam.IonControlPointSequence[0]
      
      beam = Plan_IonBeam()
      beam.SeriesInstanceUID = self.SeriesInstanceUID
      beam.BeamName = dcm_beam.BeamName
      beam.IsocenterPosition = [float(first_layer.IsocenterPosition[0]), float(first_layer.IsocenterPosition[1]), float(first_layer.IsocenterPosition[2])]
      beam.GantryAngle = float(first_layer.GantryAngle)
      beam.PatientSupportAngle = float(first_layer.PatientSupportAngle)
      beam.FinalCumulativeMetersetWeight = float(dcm_beam.FinalCumulativeMetersetWeight)
    
      # find corresponding beam in FractionGroupSequence (beam order may be different from IonBeamSequence)
      ReferencedBeam_id = next((x for x, val in enumerate(dcm.FractionGroupSequence[0].ReferencedBeamSequence) if val.ReferencedBeamNumber == dcm_beam.BeamNumber), -1)
      if ReferencedBeam_id == -1:
        print("ERROR: Beam number " + dcm_beam.BeamNumber + " not found in FractionGroupSequence.")
        print("This beam is therefore discarded.")
        continue
      else: beam.BeamMeterset = float(dcm.FractionGroupSequence[0].ReferencedBeamSequence[ReferencedBeam_id].BeamMeterset)
    
      self.TotalMeterset += beam.BeamMeterset
    
      if dcm_beam.NumberOfRangeShifters == 0:
        beam.RangeShifterID = ""
        beam.RangeShifterType = "none"
      elif dcm_beam.NumberOfRangeShifters == 1:
        beam.RangeShifterID = dcm_beam.RangeShifterSequence[0].RangeShifterID
        if dcm_beam.RangeShifterSequence[0].RangeShifterType == "BINARY":
          beam.RangeShifterType = "binary"
        elif dcm_beam.RangeShifterSequence[0].RangeShifterType == "ANALOG":
          beam.RangeShifterType = "analog"
        else:
          print("ERROR: Unknown range shifter type for beam " + dcm_beam.BeamName)
          beam.RangeShifterType = "none"
      else: 
        print("ERROR: More than one range shifter defined for beam " + dcm_beam.BeamName)
        beam.RangeShifterID = ""
        beam.RangeShifterType = "none"
      
      
      SnoutPosition = 0
      if hasattr(first_layer, 'SnoutPosition'):
        SnoutPosition = float(first_layer.SnoutPosition)
    
      IsocenterToRangeShifterDistance = SnoutPosition
      RangeShifterWaterEquivalentThickness = ""
      RangeShifterSetting = "OUT"
      ReferencedRangeShifterNumber = 0
    
      if hasattr(first_layer, 'RangeShifterSettingsSequence'):
        if hasattr(first_layer.RangeShifterSettingsSequence[0], 'IsocenterToRangeShifterDistance'):
          IsocenterToRangeShifterDistance = float(first_layer.RangeShifterSettingsSequence[0].IsocenterToRangeShifterDistance)
        if hasattr(first_layer.RangeShifterSettingsSequence[0], 'RangeShifterWaterEquivalentThickness'):
          RangeShifterWaterEquivalentThickness = float(first_layer.RangeShifterSettingsSequence[0].RangeShifterWaterEquivalentThickness)
        if hasattr(first_layer.RangeShifterSettingsSequence[0], 'RangeShifterSetting'):
          RangeShifterSetting = first_layer.RangeShifterSettingsSequence[0].RangeShifterSetting
        if hasattr(first_layer.RangeShifterSettingsSequence[0], 'ReferencedRangeShifterNumber'):
          ReferencedRangeShifterNumber = int(first_layer.RangeShifterSettingsSequence[0].ReferencedRangeShifterNumber)
       
      CumulativeMeterset = 0
    
      for dcm_layer in dcm_beam.IonControlPointSequence:
        if dcm_layer.NumberOfScanSpotPositions == 1: sum_weights = dcm_layer.ScanSpotMetersetWeights
        else: sum_weights = sum(dcm_layer.ScanSpotMetersetWeights)
      
        if sum_weights == 0.0:
          continue
        
        layer = Plan_IonLayer()
        layer.SeriesInstanceUID = self.SeriesInstanceUID
            
        if hasattr(dcm_layer, 'SnoutPosition'):
          SnoutPosition = float(dcm_layer.SnoutPosition)
        
        if hasattr(dcm_layer, 'NumberOfPaintings'): layer.NumberOfPaintings = int(dcm_layer.NumberOfPaintings)
        else: layer.NumberOfPaintings = 1
       
        layer.NominalBeamEnergy = float(dcm_layer.NominalBeamEnergy)
        layer.ScanSpotPositionMap_x = dcm_layer.ScanSpotPositionMap[0::2]
        layer.ScanSpotPositionMap_y = dcm_layer.ScanSpotPositionMap[1::2]
        layer.ScanSpotMetersetWeights = dcm_layer.ScanSpotMetersetWeights
        layer.SpotMU = np.array(dcm_layer.ScanSpotMetersetWeights) * beam.BeamMeterset / beam.FinalCumulativeMetersetWeight # spot weights are converted to MU
        if layer.SpotMU.size == 1: layer.SpotMU = [layer.SpotMU]
        else: layer.SpotMU = layer.SpotMU.tolist()
      
        self.NumberOfSpots += len(layer.SpotMU)
        CumulativeMeterset += sum(layer.SpotMU)
        layer.CumulativeMeterset = CumulativeMeterset
            
        if beam.RangeShifterType != "none":        
          if hasattr(dcm_layer, 'RangeShifterSettingsSequence'):
            RangeShifterSetting = dcm_layer.RangeShifterSettingsSequence[0].RangeShifterSetting
            ReferencedRangeShifterNumber = dcm_layer.RangeShifterSettingsSequence[0].ReferencedRangeShifterNumber
            if hasattr(dcm_layer.RangeShifterSettingsSequence[0], 'IsocenterToRangeShifterDistance'):
              IsocenterToRangeShifterDistance = dcm_layer.RangeShifterSettingsSequence[0].IsocenterToRangeShifterDistance
            if hasattr(dcm_layer.RangeShifterSettingsSequence[0], 'RangeShifterWaterEquivalentThickness'):
              RangeShifterWaterEquivalentThickness = dcm_layer.RangeShifterSettingsSequence[0].RangeShifterWaterEquivalentThickness
        
          layer.RangeShifterSetting = RangeShifterSetting
          layer.IsocenterToRangeShifterDistance = IsocenterToRangeShifterDistance
          layer.RangeShifterWaterEquivalentThickness = RangeShifterWaterEquivalentThickness
          layer.ReferencedRangeShifterNumber = ReferencedRangeShifterNumber
        
        
        beam.Layers.append(layer)
      
      self.Beams.append(beam)
      
    self.isLoaded = 1

  def export_Dicom_with_new_UID(self, OutputFile):
    # generate new uid
    initial_uid = self.OriginalDicomDataset.SOPInstanceUID
    new_uid = pydicom.uid.generate_uid()
    self.OriginalDicomDataset.SOPInstanceUID = new_uid

    # save dicom file
    print("Export dicom RTPLAN: " + OutputFile)
    self.OriginalDicomDataset.save_as(OutputFile)

    # restore initial uid
    self.OriginalDicomDataset.SOPInstanceUID = initial_uid

    return new_uid



  def save(self, file_path):
    beamlets = self.beamlets
    self.beamlets = []

    with open(file_path, 'wb') as fid:
      pickle.dump(self.__dict__, fid)

    self.beamlets = beamlets



  def load(self, file_path):
    with open(file_path, 'rb') as fid:
      tmp = pickle.load(fid)

    self.__dict__.update(tmp)

  def compute_cartesian_coordinates(self, CT, Scanner, beams, RangeShifters=[]):
    time_start = time.time()
    
    SPR = SPRimage()
    SPR.convert_CT_to_SPR(CT, Scanner)
    
    CTborders_x = [SPR.ImagePositionPatient[0], SPR.ImagePositionPatient[0] + SPR.GridSize[0] * SPR.PixelSpacing[0]]
    CTborders_y = [SPR.ImagePositionPatient[1], SPR.ImagePositionPatient[1] + SPR.GridSize[1] * SPR.PixelSpacing[1]]
    CTborders_z = [SPR.ImagePositionPatient[2], SPR.ImagePositionPatient[2] + SPR.GridSize[2] * SPR.PixelSpacing[2]]
    
    spot_positions = []
    spot_directions = []
    spot_ranges = []

    # initialize spot info for raytracing
    for beam in self.Beams:
      #beam = self.Beams[b]

      RangeShifter = -1
      if beam.RangeShifterType == "binary":
        RangeShifter = next((RS for RS in RangeShifters if RS.ID == beam.RangeShifterID), -1)

      for layer in beam.Layers:

        range_in_water = SPR.energyToRange(layer.NominalBeamEnergy)*10
        if(layer.RangeShifterSetting == 'IN'):
          if(layer.RangeShifterWaterEquivalentThickness != ""): RangeShifter_WET = layer.RangeShifterWaterEquivalentThickness
          elif(RangeShifter != -1): RangeShifter_WET = RangeShifter.WET
          else: RangeShifter_WET = 0.0

          if(RangeShifter_WET > 0.0): range_in_water -= RangeShifter_WET

        for s in range(len(layer.ScanSpotPositionMap_x)):
          
          # BEV coordinates to 3D coordinates: position (x,y,z) and direction (u,v,w)
          x,y,z = layer.ScanSpotPositionMap_x[s], 0, layer.ScanSpotPositionMap_y[s]
          u,v,w = 1e-10, 1.0, 1e-10
          
          # rotation for gantry angle (around Z axis)
          angle = math.radians(beam.GantryAngle)
          [x,y,z] = self.Rotate_vector([x,y,z], angle, 'z')
          [u,v,w] = self.Rotate_vector([u,v,w], angle, 'z')
          
          # rotation for couch angle (around Y axis)
          angle = math.radians(beam.PatientSupportAngle)
          [x,y,z] = self.Rotate_vector([x,y,z], angle, 'y')
          [u,v,w] = self.Rotate_vector([u,v,w], angle, 'y')
          
          # Dicom CT coordinates
          x = x + beam.IsocenterPosition[0]
          y = y + beam.IsocenterPosition[1]
          z = z + beam.IsocenterPosition[2]
          
          # translate initial position at the CT image border
          Translation = np.array([1.0, 1.0, 1.0])
          Translation[0] = (x - CTborders_x[int(u<0)]) / u
          Translation[1] = (y - CTborders_y[int(v<0)]) / v
          Translation[2] = (z - CTborders_z[int(w<0)]) / w
          Translation = Translation[np.argmin(np.absolute(Translation))]
          x = x - Translation * u
          y = y - Translation * v
          z = z - Translation * w

          # append data to the list of spots to process
          spot_positions.append([x,y,z])
          spot_directions.append([u,v,w])
          spot_ranges.append(range_in_water)


    CartesianSpotPositions = compute_position_from_range(SPR, spot_positions, spot_directions, spot_ranges)
          
    print("Spot RayTracing: " + str(time.time()-time_start) + " sec")
    return CartesianSpotPositions 

  #TO ADAPT
  def compute_spot_maps(self, CT, plan, Struct, RangeShifters):
    
    # Find BODY
    for ROI in Struct.Contours:
        if ROI.ROIName == 'BODY':
            BODY = ROI 
            break

    # Initialize Spot Maps
    SpotMapBinary = np.full((CT.GridSize[0], CT.GridSize[1], CT.GridSize[2], len(plan.Beams)), False)
    SpotMapWeights = np.zeros((CT.GridSize[0], CT.GridSize[1], CT.GridSize[2], len(plan.Beams)))

    
    #Compute cartesian coordinates
    CartesianCoordinates = plan.compute_cartesian_coordinates(CT, 'UCL_Toshiba', plan.Beams, RangeShifters)

    # Initialize SpotID
    SpotsID = np.zeros((plan.NumberOfSpots, 4),dtype=int)
    SpotNumber = 0
    SpotsOutsideBody = 0
    # Repeat = [] 
    # SpotsID_repeat = [] 

    print('ImagePositionPatient',CT.ImagePositionPatient)
    # Compute SpotsID
    print('\n')
    counter = 0
    for beamNumber, beam in enumerate(plan.Beams):
        print('nb of layers',len(beam.Layers))
        for layer in beam.Layers: 
            for weight in layer.SpotMU:
                #print('SpotNumber',SpotNumber)
                #print('CartesianCoordinates',CartesianCoordinates[SpotNumber])
                #print('ImagePositionPatient',CT.ImagePositionPatient)
                #print('PixelSpacing',CT.PixelSpacing)
                # x = int((CartesianCoordinates[SpotNumber][0] - CT.ImagePositionPatient[0])/CT.PixelSpacing[0])-1
                # y = int((CartesianCoordinates[SpotNumber][1] - CT.ImagePositionPatient[1])/CT.PixelSpacing[1])-1
                # z = int((CartesianCoordinates[SpotNumber][2] - CT.ImagePositionPatient[2])/CT.PixelSpacing[2])-1

                x = int(CartesianCoordinates[SpotNumber][0]/CT.PixelSpacing[0])
                y = int(CartesianCoordinates[SpotNumber][1]/CT.PixelSpacing[1])
                z = int(CartesianCoordinates[SpotNumber][2]/CT.PixelSpacing[2])
                
                SpotsID[SpotNumber,:] = [x,y,z,beamNumber]
                #print('coordinates',[x,y,z,beamNumber])
                #print('Spots ID',SpotsID[SpotNumber,:])
                
                SpotNumber += 1

                if BODY.Mask[x,y,z]==False:  # avoid spots outside BODY 
                    SpotsOutsideBody += 1
                    print('This spot is outside the body',[x,y,z])
                    continue
                
                # if (x,y,z,beamNumber) in SpotsID_repeat:
                #     Repeat.append((x,y,z,beamNumber))     
                
                # SpotsID_repeat.append((x,y,z,beamNumber))
                SpotMapBinary[x,y,z,beamNumber] = True
                SpotMapWeights[x,y,z,beamNumber] = weight 
                counter+=1
    # We can get SpotMapBinary as boolean SpotMapWeights 
    # plan.SpotMapBinary = SpotMapBinary
    plan.SpotMapWeights = SpotMapWeights     
    
    #     print('SpotsID beam_' + str(beamNumber) + ' computed...')    
    # print('nb of iteration',counter)
    # save_file_binary = os.path.join(dst_dir, 'SpotMapBinary_beams.npz') 
    # np.savez_compressed(save_file_binary,SpotMapBinary)   
    # print('\nSpot Map Binary saved = ' + save_file_binary)
    
    # save_file_weights = os.path.join(dst_dir, 'SpotMapWeights_beams.npz')
    # np.savez_compressed(save_file_weights, SpotMapWeights.astype(np.float16))
    # print('Spot Map Weights saved = ' + save_file_weights)
    
    # save_file_ID = os.path.join(dst_dir, 'spotsID.npz')    
    # np.savez_compressed(save_file_ID, SpotsID)
    # print('SpotsID saved = ' + save_file_ID)
    
    # print('\nNumber of Spots in plan = ' + str(plan.NumberOfSpots))
    # print('Number of Spots in binary mask = ' + str(np.ndarray.flatten(SpotMapBinary).tolist().count(True)))
    # print('Spots placed outside the body = ' + (str(SpotsOutsideBody)))  
    
    # if len(Repeat)!=0:  
    #     spots_repeated_by_patient.append(['Patient_' + str(PatientNumber) + ' (' + Patient.PatientInfo.PatientName + ')', len(Repeat)])
        
    # print('\nAt this point, there are ' + str(len(spots_repeated_by_patient)) + ' patients with spots repeated')
    # for repeat in spots_repeated_by_patient:
    #     print(repeat[0] + ' has ' + str(repeat[1]) + ' spots repeated')
    # print('\n')

  def Rotate_vector(self, vec, angle, axis):
      if axis == 'x':
        x = vec[0]
        y = vec[1] * math.cos(angle) - vec[2] * math.sin(angle)
        z = vec[1] * math.sin(angle) + vec[2] * math.cos(angle)
      elif axis ==  'y':
        x = vec[0] * math.cos(angle) + vec[2] * math.sin(angle)
        y = vec[1]
        z = -vec[0] * math.sin(angle) + vec[2] * math.cos(angle)
      elif axis == 'z':
        x = vec[0] * math.cos(angle) - vec[1] * math.sin(angle)
        y = vec[0] * math.sin(angle) + vec[1] * math.cos(angle)
        z = vec[2]
        
      return [x,y,z]
  
      
class Plan_IonBeam:

  def __init__(self):
    self.SeriesInstanceUID = ""
    self.BeamName = ""
    self.IsocenterPosition = [0,0,0]
    self.GantryAngle = 0.0
    self.PatientSupportAngle = 0.0
    self.FinalCumulativeMetersetWeight = 0.0
    self.BeamMeterset = 0.0
    self.RangeShifter = "none"
    self.Layers = []
  
  
  
class Plan_IonLayer:

  def __init__(self):
    self.SeriesInstanceUID = ""
    self.NumberOfPaintings = 1
    self.NominalBeamEnergy = 0.0
    self.ScanSpotPositionMap_x = []
    self.ScanSpotPositionMap_y = []
    self.ScanSpotMetersetWeights = []
    self.SpotMU = []
    self.CumulativeMeterset = 0.0
    self.RangeShifterSetting = 'OUT'
    self.IsocenterToRangeShifterDistance = 0.0
    self.RangeShifterWaterEquivalentThickness = 0.0
    self.ReferencedRangeShifterNumber = 0