def to_roi(struct, options={})
      raise ArgumentError, "Invalid argument 'struct'. Expected StructureSet, got #{struct.class}." unless struct.is_a?(StructureSet)
      # Set values:
      algorithm = options[:algorithm]
      name = options[:name] || 'BinVolume'
      number = options[:number]
      interpreter = options[:interpreter]
      type = options[:type]
      # Create the ROI:
      roi = struct.create_roi(@series.frame, :algorithm => algorithm, :name => name, :number => number, :interpreter => interpreter, :type => type)
      # Create Slices:
      @bin_images.each do |bin_image|
        bin_image.to_slice(roi)
      end
      return roi
    end
def to_roi(struct, options={})
      raise ArgumentError, "Invalid argument 'struct'. Expected StructureSet, got #{struct.class}." unless struct.is_a?(StructureSet)
      # Set values:
      algorithm = options[:algorithm]
      name = options[:name] || 'BinVolume'
      number = options[:number]
      interpreter = options[:interpreter]
      type = options[:type]
      # Create the ROI:
      roi = struct.create_roi(@series.frame, :algorithm => algorithm, :name => name, :number => number, :interpreter => interpreter, :type => type)
      # Create Slices:
      @bin_images.each do |bin_image|
        bin_image.to_slice(roi)
      end
      return roi
    end
Creates a ROI instance from the segmentation of this BinVolume.

 @param [StructureSet] struct the structure set instance which the created ROI will be associated with
 @param [Hash] options the options to use for creating the ROI
 @option options [String] :algorithm the ROI generation algorithm (defaults to 'STATIC')
 @option options [String] :name the ROI name (defaults to 'BinVolume')
 @option options [Integer] :number the ROI number (defaults to the first available ROI Number in the StructureSet)
 @option options [String] :interpreter the ROI interpreter (defaults to 'RTKIT')
 @option options [String] :type the ROI interpreted type (defaults to 'CONTROL')
 @return [ROI] the created ROI instance (including slice references from the associated binary images)