Beispiel #1
0
 def get_merged_raster_points(self):
     if hasattr(self, "raster_matrix"):
         return self.raster_matrix
     size = None
     for sub in self.rst.get_submachines():
         tmp = sub.get_raster_min_max()
         if size is None:
             size = tmp
         else:
             size[0:3:2] = min_list(size[0:3:2], tmp[0:3:2])
             size[1:4:2] = max_list(size[1:4:2], tmp[1:4:2])
     matrixs = []
     for sub in self.subfields:
         matrixs.append(sub.get_merge_raster_points(size))
     self.raster_matrix = matrixs
     return np.array(matrixs)
Beispiel #2
0
 def get_merged_raster_points(self):
     if hasattr(self, "raster_matrix"):
         return self.raster_matrix
     size = None
     for sub in self.rst.get_submachines():
         tmp = sub.raster_min_max()
         if size is None:
             size = tmp
         else:
             size[0:3:2] = min_list(size[0:3:2], tmp[0:3:2])
             size[1:4:2] = max_list(size[1:4:2], tmp[1:4:2])
     matrixs = []
     for sub in self.subfields:
         matrixs.append(sub.get_merge_raster_points(size))
     self.raster_matrix = matrixs
     return np.array(matrixs)
Beispiel #3
0
 def load_from_raster_points(self, rst):
     self.rst = rst
     self.bolus = rst.bolus
     self.couch_angle = float(rst.couchangle)
     self.gantry_angle = float(rst.gantryangle)
     self.gantry_angle, self.couch_angle = angles_from_trip(self.gantry_angle, self.couch_angle)
     self.subfields = []
     field_size = None
     for submachine in self.rst.get_submachines():
         sub = SubField(submachine, self.ddd, rst)
         self.subfields.append(sub)
         size = sub.get_size()
         if field_size is None:
             field_size = size
         else:
             field_size[0:5:2] = max_list(size[0:5:2], field_size[0:5:2])
             field_size[1:6:2] = min_list(size[1:6:2], field_size[1:6:2])
     self.field_size = field_size
     self.get_merged_raster_points()
Beispiel #4
0
 def load_from_raster_points(self, rst):
     self.rst = rst
     self.bolus = rst.bolus
     self.couch_angle = float(rst.couchangle)
     self.gantry_angle = float(rst.gantryangle)
     self.gantry_angle, self.couch_angle = angles_from_trip(
         self.gantry_angle, self.couch_angle)
     self.subfields = []
     field_size = None
     for submachine in self.rst.get_submachines():
         sub = SubField(submachine, self.ddd, rst)
         self.subfields.append(sub)
         size = sub.get_size()
         if field_size is None:
             field_size = size
         else:
             field_size[0:5:2] = max_list(size[0:5:2], field_size[0:5:2])
             field_size[1:6:2] = min_list(size[1:6:2], field_size[1:6:2])
     self.field_size = field_size
     self.get_merged_raster_points()