Method: RTKIT::Frame#initialize
- Defined in:
- lib/rtkit/frame.rb
#initialize(uid, patient, options = {}) ⇒ Frame
Creates a new Frame instance. The Frame of Reference UID tag value uniquely identifies the Frame.
Parameters
-
uid– The Frame of Reference UID string. -
patient– The Patient instance that this Frame belongs to. -
options– A hash of parameters.
Options
-
:indicator– The Position Reference Indicator string.
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/rtkit/frame.rb', line 35 def initialize(uid, patient, ={}) raise ArgumentError, "Invalid argument 'uid'. Expected String, got #{uid.class}." unless uid.is_a?(String) raise ArgumentError, "Invalid argument 'patient'. Expected Patient, got #{patient.class}." unless patient.is_a?(Patient) raise ArgumentError, "Invalid option :indicator. Expected String, got #{indicator.class}." if [:indicator] && ![:indicator].is_a?(String) @associated_series = Hash.new @associated_instance_uids = Hash.new @image_series = Array.new @rois = Array.new @uid = uid @patient = patient @indicator = [:indicator] # Register ourselves with the patient and its dataset: @patient.add_frame(self) @patient.dataset.add_frame(self) end |