class RTP::SiteSetup
The SiteSetup
class.
@note Relations:
* Parent: Prescription * Children: none
Attributes
The Record
which this instance belongs to.
Public Class Methods
Creates a new SiteSetup
by parsing a RTPConnect string line.
@param [#to_s] string the site setup definition record string line @param [Record] parent a record which is used to determine the proper parent of this instance @return [SiteSetup] the created SiteSetup
instance @raise [ArgumentError] if given a string containing an invalid number of elements
# File lib/rtp-connect/site_setup.rb, line 44 def self.load(string, parent) s = self.new(parent) s.load(string) end
Creates a new SiteSetup
.
@param [Record] parent a record which is used to determine the proper parent of this instance
RTP::Record::new
# 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
Public Instance Methods
Checks for equality.
Other and self are considered equivalent if they are of compatible types and their attributes are equivalent.
@param other an object to be compared with self. @return [Boolean] true if self and other are considered equivalent
# File lib/rtp-connect/site_setup.rb, line 96 def ==(other) if other.respond_to?(:to_site_setup) other.send(:state) == state end end
Gives an empty array, as these instances are child-less by definition.
@return [Array] an emtpy array
# File lib/rtp-connect/site_setup.rb, line 108 def children return Array.new end
Sets the couch_angle
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 230 def couch_angle=(value) @couch_angle = value && value.to_s.strip end
Sets the couch_lateral
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 214 def couch_lateral=(value) @couch_lateral = value && value.to_s.strip end
Sets the couch_longitudinal
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 222 def couch_longitudinal=(value) @couch_longitudinal = value && value.to_s.strip end
Sets the couch_pedestal
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 238 def couch_pedestal=(value) @couch_pedestal = value && value.to_s.strip end
Sets the couch_reference
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 286 def couch_reference=(value) @couch_reference = value && value.to_s.strip end
Sets the couch_reference_index
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 294 def couch_reference_index=(value) @couch_reference_index = value && value.to_s.strip end
Sets the couch_vertical
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 206 def couch_vertical=(value) @couch_vertical = value && value.to_s.strip end
Sets the frame_of_ref_uid
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 198 def frame_of_ref_uid=(value) @frame_of_ref_uid = value && value.to_s end
Computes a hash code for this object.
@note Two objects with the same attributes will have the same hash code.
@return [Fixnum] the object's hash code
# File lib/rtp-connect/site_setup.rb, line 118 def hash state.hash end
Sets the mrl_coil_index
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 278 def mrl_coil_index=(value) @mrl_coil_index = value && value.to_s.strip end
Sets the mrl_coil_name
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 270 def mrl_coil_name=(value) @mrl_coil_name = value && value.to_s.strip end
Sets the patient_orientation
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 142 def patient_orientation=(value) @patient_orientation = value && value.to_s end
Sets the respiratory_motion_compensation_technique
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 302 def respiratory_motion_compensation_technique=(value) @respiratory_motion_compensation_technique = value && value.to_s.strip end
Sets the respiratory_signal_source
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 310 def respiratory_signal_source=(value) @respiratory_signal_source = value && value.to_s.strip end
Sets the rx_site_name
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 134 def rx_site_name=(value) @rx_site_name = value && value.to_s end
Sets the structure_set_uid
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 190 def structure_set_uid=(value) @structure_set_uid = value && value.to_s end
Sets the table_top_lat_displacement
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 262 def table_top_lat_displacement=(value) @table_top_lat_displacement = value && value.to_s.strip end
Sets the table_top_long_displacement
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 254 def table_top_long_displacement=(value) @table_top_long_displacement = value && value.to_s.strip end
Sets the table_top_vert_displacement
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 246 def table_top_vert_displacement=(value) @table_top_vert_displacement = value && value.to_s.strip end
Returns self.
@return [SiteSetup] self
# File lib/rtp-connect/site_setup.rb, line 126 def to_site_setup self end
Sets the tolerance_table
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 158 def tolerance_table=(value) @tolerance_table = value && value.to_s.strip end
Sets the treatment_machine
attribute.
@param [nil, to_s
] value the new attribute value
# File lib/rtp-connect/site_setup.rb, line 150 def treatment_machine=(value) @treatment_machine = value && value.to_s end