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_reference ⇒ Object
Returns the value of attribute couch_reference.
-
#couch_reference_index ⇒ Object
Returns the value of attribute couch_reference_index.
-
#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.
-
#mrl_coil_index ⇒ Object
Returns the value of attribute mrl_coil_index.
-
#mrl_coil_name ⇒ Object
Returns the value of attribute mrl_coil_name.
-
#parent ⇒ Object
The Record which this instance belongs to.
-
#patient_orientation ⇒ Object
Returns the value of attribute patient_orientation.
-
#respiratory_motion_compensation_technique ⇒ Object
Returns the value of attribute respiratory_motion_compensation_technique.
-
#respiratory_signal_source ⇒ Object
Returns the value of attribute respiratory_signal_source.
-
#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.
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 |
# File 'lib/rtp-connect/site_setup.rb', line 53 def initialize(parent) super('SITE_SETUP_DEF', 5, 25) # 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, :mrl_coil_name, :mrl_coil_index, :couch_reference, :couch_reference_index, :respiratory_motion_compensation_technique, :respiratory_signal_source ] 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_reference ⇒ Object
Returns the value of attribute couch_reference.
32 33 34 |
# File 'lib/rtp-connect/site_setup.rb', line 32 def couch_reference @couch_reference end |
#couch_reference_index ⇒ Object
Returns the value of attribute couch_reference_index.
33 34 35 |
# File 'lib/rtp-connect/site_setup.rb', line 33 def couch_reference_index @couch_reference_index 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 |
#mrl_coil_index ⇒ Object
Returns the value of attribute mrl_coil_index.
31 32 33 |
# File 'lib/rtp-connect/site_setup.rb', line 31 def mrl_coil_index @mrl_coil_index end |
#mrl_coil_name ⇒ Object
Returns the value of attribute mrl_coil_name.
30 31 32 |
# File 'lib/rtp-connect/site_setup.rb', line 30 def mrl_coil_name @mrl_coil_name 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 |
#respiratory_motion_compensation_technique ⇒ Object
Returns the value of attribute respiratory_motion_compensation_technique.
34 35 36 |
# File 'lib/rtp-connect/site_setup.rb', line 34 def respiratory_motion_compensation_technique @respiratory_motion_compensation_technique end |
#respiratory_signal_source ⇒ Object
Returns the value of attribute respiratory_signal_source.
35 36 37 |
# File 'lib/rtp-connect/site_setup.rb', line 35 def respiratory_signal_source @respiratory_signal_source 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.
44 45 46 47 |
# File 'lib/rtp-connect/site_setup.rb', line 44 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.
96 97 98 99 100 |
# File 'lib/rtp-connect/site_setup.rb', line 96 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.
108 109 110 |
# File 'lib/rtp-connect/site_setup.rb', line 108 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.
118 119 120 |
# File 'lib/rtp-connect/site_setup.rb', line 118 def hash state.hash end |
#to_site_setup ⇒ SiteSetup
Returns self.
126 127 128 |
# File 'lib/rtp-connect/site_setup.rb', line 126 def to_site_setup self end |