Method: RTKIT::Setup#initialize
- Defined in:
- lib/rtkit/setup.rb
#initialize(position, number, plan, options = {}) ⇒ Setup
Creates a new Setup instance.
Parameters
-
position– String. The patient position (orientation). -
number– Integer. The Setup number. -
plan– The Plan instance that this Beam belongs to. -
options– A hash of parameters.
Options
-
:technique– String. Setup technique. -
:offset_vertical– Float. Table top vertical setup displacement. -
:offset_longitudinal– Float. Table top longitudinal setup displacement. -
:offset_lateral– Float. Table top lateral setup displacement.
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/rtkit/setup.rb', line 66 def initialize(position, number, plan, ={}) raise ArgumentError, "Invalid argument 'plan'. Expected Plan, got #{plan.class}." unless plan.is_a?(Plan) # Set values: self.position = position self.number = number # Set options: self.technique = [:technique] if [:technique] self.offset_vertical = [:offset_vertical] if [:offset_vertical] self.offset_longitudinal = [:offset_longitudinal] if [:offset_longitudinal] self.offset_lateral = [:offset_lateral] if [:offset_lateral] # Set references: @plan = plan # Register ourselves with the Plan: @plan.add_setup(self) end |