class RTP::SiteSetup

The SiteSetup class.

@note Relations:

* Parent: Prescription
* Children: none

Attributes

couch_angle[R]
couch_lateral[R]
couch_longitudinal[R]
couch_pedestal[R]
couch_reference[R]
couch_reference_index[R]
couch_vertical[R]
frame_of_ref_uid[R]
iso_pos_x[R]
iso_pos_y[R]
iso_pos_z[R]
mrl_coil_index[R]
mrl_coil_name[R]
parent[RW]

The Record which this instance belongs to.

patient_orientation[R]
respiratory_motion_compensation_technique[R]
respiratory_signal_source[R]
rx_site_name[R]
structure_set_uid[R]
table_top_lat_displacement[R]
table_top_long_displacement[R]
table_top_vert_displacement[R]
tolerance_table[R]
treatment_machine[R]

Public Class Methods

load(string, parent) click to toggle source

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
new(parent) click to toggle source

Creates a new SiteSetup.

@param [Record] parent a record which is used to determine the proper parent of this instance

Calls superclass method 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

==(other) click to toggle source

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
Also aliased as: eql?
children() click to toggle source

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
couch_angle=(value) click to toggle source

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
couch_lateral=(value) click to toggle source

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
couch_longitudinal=(value) click to toggle source

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
couch_pedestal=(value) click to toggle source

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
couch_reference=(value) click to toggle source

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
couch_reference_index=(value) click to toggle source

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
couch_vertical=(value) click to toggle source

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
eql?(other)
Alias for: ==
frame_of_ref_uid=(value) click to toggle source

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
hash() click to toggle source

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
iso_pos_x=(value) click to toggle source

Sets the iso_pos_x attribute.

@param [nil, to_s] value the new attribute value

# File lib/rtp-connect/site_setup.rb, line 166
def iso_pos_x=(value)
  @iso_pos_x = value && value.to_s.strip
end
iso_pos_y=(value) click to toggle source

Sets the iso_pos_y attribute.

@param [nil, to_s] value the new attribute value

# File lib/rtp-connect/site_setup.rb, line 174
def iso_pos_y=(value)
  @iso_pos_y = value && value.to_s.strip
end
iso_pos_z=(value) click to toggle source

Sets the iso_pos_z attribute.

@param [nil, to_s] value the new attribute value

# File lib/rtp-connect/site_setup.rb, line 182
def iso_pos_z=(value)
  @iso_pos_z = value && value.to_s.strip
end
mrl_coil_index=(value) click to toggle source

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
mrl_coil_name=(value) click to toggle source

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
patient_orientation=(value) click to toggle source

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
respiratory_motion_compensation_technique=(value) click to toggle source

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
respiratory_signal_source=(value) click to toggle source

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
rx_site_name=(value) click to toggle source

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
structure_set_uid=(value) click to toggle source

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
table_top_lat_displacement=(value) click to toggle source

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
table_top_long_displacement=(value) click to toggle source

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
table_top_vert_displacement=(value) click to toggle source

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
to_site_setup() click to toggle source

Returns self.

@return [SiteSetup] self

# File lib/rtp-connect/site_setup.rb, line 126
def to_site_setup
  self
end
tolerance_table=(value) click to toggle source

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
treatment_machine=(value) click to toggle source

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