Class: RTP::SiteSetup
Overview
Relations:
-
Parent: Prescription
-
Children: none
The SiteSetup class.
Constant Summary
Constants inherited from Record
Instance Attribute Summary collapse
-
#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.
-
#frame_of_ref_uid ⇒ Object
Returns the value of attribute frame_of_ref_uid.
-
#iso_pos_x ⇒ Object
Returns the value of attribute iso_pos_x.
-
#iso_pos_y ⇒ Object
Returns the value of attribute iso_pos_y.
-
#iso_pos_z ⇒ Object
Returns the value of attribute iso_pos_z.
-
#parent ⇒ Object
The Record which this instance belongs to.
-
#patient_orientation ⇒ Object
Returns the value of attribute patient_orientation.
-
#rx_site_name ⇒ Object
Returns the value of attribute rx_site_name.
-
#structure_set_uid ⇒ Object
Returns the value of attribute structure_set_uid.
-
#table_top_lat_displacement ⇒ Object
Returns the value of attribute table_top_lat_displacement.
-
#table_top_long_displacement ⇒ Object
Returns the value of attribute table_top_long_displacement.
-
#table_top_vert_displacement ⇒ Object
Returns the value of attribute table_top_vert_displacement.
-
#tolerance_table ⇒ Object
Returns the value of attribute tolerance_table.
-
#treatment_machine ⇒ Object
Returns the value of attribute treatment_machine.
Attributes inherited from Record
Class Method Summary collapse
-
.load(string, parent) ⇒ SiteSetup
Creates a new SiteSetup by parsing a RTPConnect string line.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Checks for equality.
-
#children ⇒ Array
Gives an empty array, as these instances are child-less by definition.
-
#hash ⇒ Fixnum
Computes a hash code for this object.
-
#initialize(parent) ⇒ SiteSetup
constructor
Creates a new SiteSetup.
-
#to_site_setup ⇒ SiteSetup
Returns self.
Methods inherited from Record
#encode, #get_parent, #load, #to_record, #to_s, #values
Constructor Details
#initialize(parent) ⇒ SiteSetup
Creates a new SiteSetup.
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 |
# File 'lib/rtp-connect/site_setup.rb', line 47 def initialize(parent) super('SITE_SETUP_DEF', 5, 19) # Parent relation (always expecting a Prescription here): @parent = get_parent(parent.to_prescription, Prescription) @parent.add_site_setup(self) @attributes = [ # Required: :keyword, :rx_site_name, :patient_orientation, :treatment_machine, # Optional: :tolerance_table, :iso_pos_x, :iso_pos_y, :iso_pos_z, :structure_set_uid, :frame_of_ref_uid, :couch_vertical, :couch_lateral, :couch_longitudinal, :couch_angle, :couch_pedestal, :table_top_vert_displacement, :table_top_long_displacement, :table_top_lat_displacement ] end |
Instance Attribute Details
#couch_angle ⇒ Object
Returns the value of attribute couch_angle.
25 26 27 |
# File 'lib/rtp-connect/site_setup.rb', line 25 def couch_angle @couch_angle end |
#couch_lateral ⇒ Object
Returns the value of attribute couch_lateral.
23 24 25 |
# File 'lib/rtp-connect/site_setup.rb', line 23 def couch_lateral @couch_lateral end |
#couch_longitudinal ⇒ Object
Returns the value of attribute couch_longitudinal.
24 25 26 |
# File 'lib/rtp-connect/site_setup.rb', line 24 def couch_longitudinal @couch_longitudinal end |
#couch_pedestal ⇒ Object
Returns the value of attribute couch_pedestal.
26 27 28 |
# File 'lib/rtp-connect/site_setup.rb', line 26 def couch_pedestal @couch_pedestal end |
#couch_vertical ⇒ Object
Returns the value of attribute couch_vertical.
22 23 24 |
# File 'lib/rtp-connect/site_setup.rb', line 22 def couch_vertical @couch_vertical end |
#frame_of_ref_uid ⇒ Object
Returns the value of attribute frame_of_ref_uid.
21 22 23 |
# File 'lib/rtp-connect/site_setup.rb', line 21 def frame_of_ref_uid @frame_of_ref_uid end |
#iso_pos_x ⇒ Object
Returns the value of attribute iso_pos_x.
17 18 19 |
# File 'lib/rtp-connect/site_setup.rb', line 17 def iso_pos_x @iso_pos_x end |
#iso_pos_y ⇒ Object
Returns the value of attribute iso_pos_y.
18 19 20 |
# File 'lib/rtp-connect/site_setup.rb', line 18 def iso_pos_y @iso_pos_y end |
#iso_pos_z ⇒ Object
Returns the value of attribute iso_pos_z.
19 20 21 |
# File 'lib/rtp-connect/site_setup.rb', line 19 def iso_pos_z @iso_pos_z end |
#parent ⇒ Object
The Record which this instance belongs to.
12 13 14 |
# File 'lib/rtp-connect/site_setup.rb', line 12 def parent @parent end |
#patient_orientation ⇒ Object
Returns the value of attribute patient_orientation.
14 15 16 |
# File 'lib/rtp-connect/site_setup.rb', line 14 def patient_orientation @patient_orientation end |
#rx_site_name ⇒ Object
Returns the value of attribute rx_site_name.
13 14 15 |
# File 'lib/rtp-connect/site_setup.rb', line 13 def rx_site_name @rx_site_name end |
#structure_set_uid ⇒ Object
Returns the value of attribute structure_set_uid.
20 21 22 |
# File 'lib/rtp-connect/site_setup.rb', line 20 def structure_set_uid @structure_set_uid end |
#table_top_lat_displacement ⇒ Object
Returns the value of attribute table_top_lat_displacement.
29 30 31 |
# File 'lib/rtp-connect/site_setup.rb', line 29 def table_top_lat_displacement @table_top_lat_displacement end |
#table_top_long_displacement ⇒ Object
Returns the value of attribute table_top_long_displacement.
28 29 30 |
# File 'lib/rtp-connect/site_setup.rb', line 28 def table_top_long_displacement @table_top_long_displacement end |
#table_top_vert_displacement ⇒ Object
Returns the value of attribute table_top_vert_displacement.
27 28 29 |
# File 'lib/rtp-connect/site_setup.rb', line 27 def table_top_vert_displacement @table_top_vert_displacement end |
#tolerance_table ⇒ Object
Returns the value of attribute tolerance_table.
16 17 18 |
# File 'lib/rtp-connect/site_setup.rb', line 16 def tolerance_table @tolerance_table end |
#treatment_machine ⇒ Object
Returns the value of attribute treatment_machine.
15 16 17 |
# File 'lib/rtp-connect/site_setup.rb', line 15 def treatment_machine @treatment_machine end |
Class Method Details
.load(string, parent) ⇒ SiteSetup
Creates a new SiteSetup by parsing a RTPConnect string line.
38 39 40 41 |
# File 'lib/rtp-connect/site_setup.rb', line 38 def self.load(string, parent) s = self.new(parent) s.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.
84 85 86 87 88 |
# File 'lib/rtp-connect/site_setup.rb', line 84 def ==(other) if other.respond_to?(:to_site_setup) other.send(:state) == state end end |
#children ⇒ Array
Gives an empty array, as these instances are child-less by definition.
96 97 98 |
# File 'lib/rtp-connect/site_setup.rb', line 96 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.
106 107 108 |
# File 'lib/rtp-connect/site_setup.rb', line 106 def hash state.hash end |
#to_site_setup ⇒ SiteSetup
Returns self.
114 115 116 |
# File 'lib/rtp-connect/site_setup.rb', line 114 def to_site_setup self end |