Class: RTP::SimulationField
- Defined in:
- lib/rtp-connect/simulation_field.rb
Overview
Relations:
-
Parent: Prescription
-
Children: none
The simulation field class.
Constant Summary
Constants inherited from Record
Instance Attribute Summary collapse
-
#ap_separation ⇒ Object
Returns the value of attribute ap_separation.
-
#blade_x ⇒ Object
Returns the value of attribute blade_x.
-
#blade_x1 ⇒ Object
Returns the value of attribute blade_x1.
-
#blade_x2 ⇒ Object
Returns the value of attribute blade_x2.
-
#blade_x_mode ⇒ Object
Returns the value of attribute blade_x_mode.
-
#blade_y ⇒ Object
Returns the value of attribute blade_y.
-
#blade_y1 ⇒ Object
Returns the value of attribute blade_y1.
-
#blade_y2 ⇒ Object
Returns the value of attribute blade_y2.
-
#blade_y_mode ⇒ Object
Returns the value of attribute blade_y_mode.
-
#collimator_angle ⇒ Object
Returns the value of attribute collimator_angle.
-
#collimator_x1 ⇒ Object
Returns the value of attribute collimator_x1.
-
#collimator_x2 ⇒ Object
Returns the value of attribute collimator_x2.
-
#collimator_y1 ⇒ Object
Returns the value of attribute collimator_y1.
-
#collimator_y2 ⇒ Object
Returns the value of attribute collimator_y2.
-
#couch_angle ⇒ Object
Returns the value of attribute couch_angle.
-
#couch_lateral ⇒ Object
Returns the value of attribute couch_lateral.
-
#couch_longitudinal ⇒ Object
Returns the value of attribute couch_longitudinal.
-
#couch_pedestal ⇒ Object
Returns the value of attribute couch_pedestal.
-
#couch_vertical ⇒ Object
Returns the value of attribute couch_vertical.
-
#field_id ⇒ Object
Returns the value of attribute field_id.
-
#field_name ⇒ Object
Returns the value of attribute field_name.
-
#field_note ⇒ Object
Returns the value of attribute field_note.
-
#field_x ⇒ Object
Returns the value of attribute field_x.
-
#field_x_mode ⇒ Object
Returns the value of attribute field_x_mode.
-
#field_y ⇒ Object
Returns the value of attribute field_y.
-
#field_y_mode ⇒ Object
Returns the value of attribute field_y_mode.
-
#gantry_angle ⇒ Object
Returns the value of attribute gantry_angle.
-
#ii_lateral ⇒ Object
Returns the value of attribute ii_lateral.
-
#ii_longitudinal ⇒ Object
Returns the value of attribute ii_longitudinal.
-
#ii_vertical ⇒ Object
Returns the value of attribute ii_vertical.
-
#kvp ⇒ Object
Returns the value of attribute kvp.
-
#lateral_separation ⇒ Object
Returns the value of attribute lateral_separation.
-
#ma ⇒ Object
Returns the value of attribute ma.
-
#other_label_1 ⇒ Object
Returns the value of attribute other_label_1.
-
#other_label_2 ⇒ Object
Returns the value of attribute other_label_2.
-
#other_label_3 ⇒ Object
Returns the value of attribute other_label_3.
-
#other_label_4 ⇒ Object
Returns the value of attribute other_label_4.
-
#other_measurement_1 ⇒ Object
Returns the value of attribute other_measurement_1.
-
#other_measurement_2 ⇒ Object
Returns the value of attribute other_measurement_2.
-
#other_measurement_3 ⇒ Object
Returns the value of attribute other_measurement_3.
-
#other_measurement_4 ⇒ Object
Returns the value of attribute other_measurement_4.
-
#other_measurement_5 ⇒ Object
Returns the value of attribute other_measurement_5.
-
#other_measurement_6 ⇒ Object
Returns the value of attribute other_measurement_6.
-
#pa_separation ⇒ Object
Returns the value of attribute pa_separation.
-
#parent ⇒ Object
The Record which this instance belongs to.
-
#rx_site_name ⇒ Object
Returns the value of attribute rx_site_name.
-
#sad ⇒ Object
Returns the value of attribute sad.
-
#seconds ⇒ Object
Returns the value of attribute seconds.
-
#sfd_1 ⇒ Object
Returns the value of attribute sfd_1.
-
#ssd_1 ⇒ Object
Returns the value of attribute ssd_1.
-
#tangential_separation ⇒ Object
Returns the value of attribute tangential_separation.
-
#treatment_machine ⇒ Object
Returns the value of attribute treatment_machine.
Attributes inherited from Record
Class Method Summary collapse
-
.load(string, parent) ⇒ Field
Creates a new SimulationField by parsing a RTPConnect string line.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Checks for equality.
-
#children ⇒ Array
Collects the child records of this instance in a properly sorted array.
-
#hash ⇒ Fixnum
Computes a hash code for this object.
-
#initialize(parent) ⇒ SimulationField
constructor
Creates a new SimulationField.
-
#to_simulation_field ⇒ SimulationField
Returns self.
Methods inherited from Record
#encode, #get_parent, #load, #to_record, #to_s, #values
Constructor Details
#initialize(parent) ⇒ SimulationField
Creates a new SimulationField.
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 |
# File 'lib/rtp-connect/simulation_field.rb', line 81 def initialize(parent) super('SIM_DEF', 17, 53) # Parent relation (may get more than one type of record here): @parent = get_parent(parent.to_record, Prescription) @parent.add_simulation_field(self) @attributes = [ # Required: :keyword, :rx_site_name, :field_name, :field_id, :field_note, :treatment_machine, :gantry_angle, :collimator_angle, :field_x_mode, :field_x, :collimator_x1, :collimator_x2, :field_y_mode, :field_y, :collimator_y1, :collimator_y2, # Optional: :couch_vertical, :couch_lateral, :couch_longitudinal, :couch_angle, :couch_pedestal, :sad, :ap_separation, :pa_separation, :lateral_separation, :tangential_separation, :other_label_1, :ssd_1, :sfd_1, :other_label_2, :other_measurement_1, :other_measurement_2, :other_label_3, :other_measurement_3, :other_measurement_4, :other_label_4, :other_measurement_5, :other_measurement_6, :blade_x_mode, :blade_x, :blade_x1, :blade_x2, :blade_y_mode, :blade_y, :blade_y1, :blade_y2, :ii_lateral, :ii_longitudinal, :ii_vertical, :kvp, :ma, :seconds ] end |
Instance Attribute Details
#ap_separation ⇒ Object
Returns the value of attribute ap_separation.
34 35 36 |
# File 'lib/rtp-connect/simulation_field.rb', line 34 def ap_separation @ap_separation end |
#blade_x ⇒ Object
Returns the value of attribute blade_x.
51 52 53 |
# File 'lib/rtp-connect/simulation_field.rb', line 51 def blade_x @blade_x end |
#blade_x1 ⇒ Object
Returns the value of attribute blade_x1.
52 53 54 |
# File 'lib/rtp-connect/simulation_field.rb', line 52 def blade_x1 @blade_x1 end |
#blade_x2 ⇒ Object
Returns the value of attribute blade_x2.
53 54 55 |
# File 'lib/rtp-connect/simulation_field.rb', line 53 def blade_x2 @blade_x2 end |
#blade_x_mode ⇒ Object
Returns the value of attribute blade_x_mode.
50 51 52 |
# File 'lib/rtp-connect/simulation_field.rb', line 50 def blade_x_mode @blade_x_mode end |
#blade_y ⇒ Object
Returns the value of attribute blade_y.
55 56 57 |
# File 'lib/rtp-connect/simulation_field.rb', line 55 def blade_y @blade_y end |
#blade_y1 ⇒ Object
Returns the value of attribute blade_y1.
56 57 58 |
# File 'lib/rtp-connect/simulation_field.rb', line 56 def blade_y1 @blade_y1 end |
#blade_y2 ⇒ Object
Returns the value of attribute blade_y2.
57 58 59 |
# File 'lib/rtp-connect/simulation_field.rb', line 57 def blade_y2 @blade_y2 end |
#blade_y_mode ⇒ Object
Returns the value of attribute blade_y_mode.
54 55 56 |
# File 'lib/rtp-connect/simulation_field.rb', line 54 def blade_y_mode @blade_y_mode end |
#collimator_angle ⇒ Object
Returns the value of attribute collimator_angle.
19 20 21 |
# File 'lib/rtp-connect/simulation_field.rb', line 19 def collimator_angle @collimator_angle end |
#collimator_x1 ⇒ Object
Returns the value of attribute collimator_x1.
22 23 24 |
# File 'lib/rtp-connect/simulation_field.rb', line 22 def collimator_x1 @collimator_x1 end |
#collimator_x2 ⇒ Object
Returns the value of attribute collimator_x2.
23 24 25 |
# File 'lib/rtp-connect/simulation_field.rb', line 23 def collimator_x2 @collimator_x2 end |
#collimator_y1 ⇒ Object
Returns the value of attribute collimator_y1.
26 27 28 |
# File 'lib/rtp-connect/simulation_field.rb', line 26 def collimator_y1 @collimator_y1 end |
#collimator_y2 ⇒ Object
Returns the value of attribute collimator_y2.
27 28 29 |
# File 'lib/rtp-connect/simulation_field.rb', line 27 def collimator_y2 @collimator_y2 end |
#couch_angle ⇒ Object
Returns the value of attribute couch_angle.
31 32 33 |
# File 'lib/rtp-connect/simulation_field.rb', line 31 def couch_angle @couch_angle end |
#couch_lateral ⇒ Object
Returns the value of attribute couch_lateral.
29 30 31 |
# File 'lib/rtp-connect/simulation_field.rb', line 29 def couch_lateral @couch_lateral end |
#couch_longitudinal ⇒ Object
Returns the value of attribute couch_longitudinal.
30 31 32 |
# File 'lib/rtp-connect/simulation_field.rb', line 30 def couch_longitudinal @couch_longitudinal end |
#couch_pedestal ⇒ Object
Returns the value of attribute couch_pedestal.
32 33 34 |
# File 'lib/rtp-connect/simulation_field.rb', line 32 def couch_pedestal @couch_pedestal end |
#couch_vertical ⇒ Object
Returns the value of attribute couch_vertical.
28 29 30 |
# File 'lib/rtp-connect/simulation_field.rb', line 28 def couch_vertical @couch_vertical end |
#field_id ⇒ Object
Returns the value of attribute field_id.
15 16 17 |
# File 'lib/rtp-connect/simulation_field.rb', line 15 def field_id @field_id end |
#field_name ⇒ Object
Returns the value of attribute field_name.
14 15 16 |
# File 'lib/rtp-connect/simulation_field.rb', line 14 def field_name @field_name end |
#field_note ⇒ Object
Returns the value of attribute field_note.
16 17 18 |
# File 'lib/rtp-connect/simulation_field.rb', line 16 def field_note @field_note end |
#field_x ⇒ Object
Returns the value of attribute field_x.
21 22 23 |
# File 'lib/rtp-connect/simulation_field.rb', line 21 def field_x @field_x end |
#field_x_mode ⇒ Object
Returns the value of attribute field_x_mode.
20 21 22 |
# File 'lib/rtp-connect/simulation_field.rb', line 20 def field_x_mode @field_x_mode end |
#field_y ⇒ Object
Returns the value of attribute field_y.
25 26 27 |
# File 'lib/rtp-connect/simulation_field.rb', line 25 def field_y @field_y end |
#field_y_mode ⇒ Object
Returns the value of attribute field_y_mode.
24 25 26 |
# File 'lib/rtp-connect/simulation_field.rb', line 24 def field_y_mode @field_y_mode end |
#gantry_angle ⇒ Object
Returns the value of attribute gantry_angle.
18 19 20 |
# File 'lib/rtp-connect/simulation_field.rb', line 18 def gantry_angle @gantry_angle end |
#ii_lateral ⇒ Object
Returns the value of attribute ii_lateral.
58 59 60 |
# File 'lib/rtp-connect/simulation_field.rb', line 58 def ii_lateral @ii_lateral end |
#ii_longitudinal ⇒ Object
Returns the value of attribute ii_longitudinal.
59 60 61 |
# File 'lib/rtp-connect/simulation_field.rb', line 59 def ii_longitudinal @ii_longitudinal end |
#ii_vertical ⇒ Object
Returns the value of attribute ii_vertical.
60 61 62 |
# File 'lib/rtp-connect/simulation_field.rb', line 60 def ii_vertical @ii_vertical end |
#kvp ⇒ Object
Returns the value of attribute kvp.
61 62 63 |
# File 'lib/rtp-connect/simulation_field.rb', line 61 def kvp @kvp end |
#lateral_separation ⇒ Object
Returns the value of attribute lateral_separation.
36 37 38 |
# File 'lib/rtp-connect/simulation_field.rb', line 36 def lateral_separation @lateral_separation end |
#ma ⇒ Object
Returns the value of attribute ma.
62 63 64 |
# File 'lib/rtp-connect/simulation_field.rb', line 62 def ma @ma end |
#other_label_1 ⇒ Object
Returns the value of attribute other_label_1.
38 39 40 |
# File 'lib/rtp-connect/simulation_field.rb', line 38 def other_label_1 @other_label_1 end |
#other_label_2 ⇒ Object
Returns the value of attribute other_label_2.
41 42 43 |
# File 'lib/rtp-connect/simulation_field.rb', line 41 def other_label_2 @other_label_2 end |
#other_label_3 ⇒ Object
Returns the value of attribute other_label_3.
44 45 46 |
# File 'lib/rtp-connect/simulation_field.rb', line 44 def other_label_3 @other_label_3 end |
#other_label_4 ⇒ Object
Returns the value of attribute other_label_4.
47 48 49 |
# File 'lib/rtp-connect/simulation_field.rb', line 47 def other_label_4 @other_label_4 end |
#other_measurement_1 ⇒ Object
Returns the value of attribute other_measurement_1.
42 43 44 |
# File 'lib/rtp-connect/simulation_field.rb', line 42 def other_measurement_1 @other_measurement_1 end |
#other_measurement_2 ⇒ Object
Returns the value of attribute other_measurement_2.
43 44 45 |
# File 'lib/rtp-connect/simulation_field.rb', line 43 def other_measurement_2 @other_measurement_2 end |
#other_measurement_3 ⇒ Object
Returns the value of attribute other_measurement_3.
45 46 47 |
# File 'lib/rtp-connect/simulation_field.rb', line 45 def other_measurement_3 @other_measurement_3 end |
#other_measurement_4 ⇒ Object
Returns the value of attribute other_measurement_4.
46 47 48 |
# File 'lib/rtp-connect/simulation_field.rb', line 46 def other_measurement_4 @other_measurement_4 end |
#other_measurement_5 ⇒ Object
Returns the value of attribute other_measurement_5.
48 49 50 |
# File 'lib/rtp-connect/simulation_field.rb', line 48 def other_measurement_5 @other_measurement_5 end |
#other_measurement_6 ⇒ Object
Returns the value of attribute other_measurement_6.
49 50 51 |
# File 'lib/rtp-connect/simulation_field.rb', line 49 def other_measurement_6 @other_measurement_6 end |
#pa_separation ⇒ Object
Returns the value of attribute pa_separation.
35 36 37 |
# File 'lib/rtp-connect/simulation_field.rb', line 35 def pa_separation @pa_separation end |
#parent ⇒ Object
The Record which this instance belongs to.
12 13 14 |
# File 'lib/rtp-connect/simulation_field.rb', line 12 def parent @parent end |
#rx_site_name ⇒ Object
Returns the value of attribute rx_site_name.
13 14 15 |
# File 'lib/rtp-connect/simulation_field.rb', line 13 def rx_site_name @rx_site_name end |
#sad ⇒ Object
Returns the value of attribute sad.
33 34 35 |
# File 'lib/rtp-connect/simulation_field.rb', line 33 def sad @sad end |
#seconds ⇒ Object
Returns the value of attribute seconds.
63 64 65 |
# File 'lib/rtp-connect/simulation_field.rb', line 63 def seconds @seconds end |
#sfd_1 ⇒ Object
Returns the value of attribute sfd_1.
40 41 42 |
# File 'lib/rtp-connect/simulation_field.rb', line 40 def sfd_1 @sfd_1 end |
#ssd_1 ⇒ Object
Returns the value of attribute ssd_1.
39 40 41 |
# File 'lib/rtp-connect/simulation_field.rb', line 39 def ssd_1 @ssd_1 end |
#tangential_separation ⇒ Object
Returns the value of attribute tangential_separation.
37 38 39 |
# File 'lib/rtp-connect/simulation_field.rb', line 37 def tangential_separation @tangential_separation end |
#treatment_machine ⇒ Object
Returns the value of attribute treatment_machine.
17 18 19 |
# File 'lib/rtp-connect/simulation_field.rb', line 17 def treatment_machine @treatment_machine end |
Class Method Details
.load(string, parent) ⇒ Field
Creates a new SimulationField by parsing a RTPConnect string line.
72 73 74 75 |
# File 'lib/rtp-connect/simulation_field.rb', line 72 def self.load(string, parent) sf = self.new(parent) sf.load(string) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Checks for equality.
Other and self are considered equivalent if they are of compatible types and their attributes are equivalent.
152 153 154 155 156 |
# File 'lib/rtp-connect/simulation_field.rb', line 152 def ==(other) if other.respond_to?(:to_simulation_field) other.send(:state) == state end end |
#children ⇒ Array
Collects the child records of this instance in a properly sorted array.
164 165 166 |
# File 'lib/rtp-connect/simulation_field.rb', line 164 def children return Array.new end |
#hash ⇒ Fixnum
Two objects with the same attributes will have the same hash code.
Computes a hash code for this object.
174 175 176 |
# File 'lib/rtp-connect/simulation_field.rb', line 174 def hash state.hash end |
#to_simulation_field ⇒ SimulationField
Returns self.
182 183 184 |
# File 'lib/rtp-connect/simulation_field.rb', line 182 def to_simulation_field self end |