Method: RTKIT::StructureSet#rois_in_frame

Defined in:
lib/rtkit/structure_set.rb

#rois_in_frame(uid) ⇒ Object

Returns all ROIs defined in this structure set that belongs to the specified Frame of Reference UID. Returns an empty array if no matching ROIs are found.

Raises:

  • (ArgumentError)


282
283
284
285
286
287
288
289
# File 'lib/rtkit/structure_set.rb', line 282

def rois_in_frame(uid)
  raise ArgumentError, "Expected String, got #{uid.class}." unless uid.is_a?(String)
  frame_rois = Array.new
  @rois.each do |roi|
    frame_rois << roi if roi.frame.uid == uid
  end
  return frame_rois
end