def create_roi(frame, options={})
      raise ArgumentError, "Expected Frame, got #{frame.class}." unless frame.is_a?(Frame)
      # Set values:
      algorithm = options[:algorithm] || 'Automatic'
      name = options[:name] || 'RTKIT-VOLUME'
      interpreter = options[:interpreter] || 'RTKIT'
      type = options[:type] || 'CONTROL'
      if options[:number]
        raise ArgumentError, "Expected Integer, got #{options[:number].class} for the option :number." unless options[:number].is_a?(Integer)
        raise ArgumentError, "The specified ROI Number (#{options[:roi_number]}) is already used by one of the existing ROIs (#{roi_numbers})." if structure_numbers.include?(options[:number])
        number = options[:number]
      else
        number = (structure_numbers.max ? structure_numbers.max + 1 : 1)
      end
      # Create ROI:
      roi = ROI.new(name, number, frame, self, :algorithm => algorithm, :name => name, :number => number, :interpreter => interpreter, :type => type)
      return roi
    end
def create_roi(frame, options={})
      raise ArgumentError, "Expected Frame, got #{frame.class}." unless frame.is_a?(Frame)
      # Set values:
      algorithm = options[:algorithm] || 'Automatic'
      name = options[:name] || 'RTKIT-VOLUME'
      interpreter = options[:interpreter] || 'RTKIT'
      type = options[:type] || 'CONTROL'
      if options[:number]
        raise ArgumentError, "Expected Integer, got #{options[:number].class} for the option :number." unless options[:number].is_a?(Integer)
        raise ArgumentError, "The specified ROI Number (#{options[:roi_number]}) is already used by one of the existing ROIs (#{roi_numbers})." if structure_numbers.include?(options[:number])
        number = options[:number]
      else
        number = (structure_numbers.max ? structure_numbers.max + 1 : 1)
      end
      # Create ROI:
      roi = ROI.new(name, number, frame, self, :algorithm => algorithm, :name => name, :number => number, :interpreter => interpreter, :type => type)
      return roi
    end
Creates a ROI belonging to this StructureSet.

 @note The ROI is created without any Slice instances (these must be added
 after the ROI creation).

 @param [Frame] frame the Frame which the ROI is to be associated with
 @param [Hash] options the options to use for creating the ROI
 @option options [String] :algorithm the ROI generation algorithm (defaults to 'Automatic')
 @option options [String] :interpreter the ROI interpreter (defaults to 'RTKIT')
 @option options [String] :name the ROI name (defaults to 'RTKIT-VOLUME')
 @option options [String] :number the ROI number (defaults to the first available ROI number in the structure set)
 @option options [String] :type the ROI interpreted type (defaults to 'CONTROL')