def to_slice(roi)
      raise ArgumentError, "Invalid argument 'roi'. Expected ROI, got #{roi.class}." unless roi.is_a?(ROI)
      # Create the Slice:
      s = Slice.new(@image.uid, roi)
      # Create Contours:
      to_contours(s)
      return s
    end
def to_slice(roi)
      raise ArgumentError, "Invalid argument 'roi'. Expected ROI, got #{roi.class}." unless roi.is_a?(ROI)
      # Create the Slice:
      s = Slice.new(@image.uid, roi)
      # Create Contours:
      to_contours(s)
      return s
    end
Creates a Slice instance from the segmentation of this BinImage.

 @param [ROI] roi the ROI instance which the created Slice will be associated with
 @return [Slice] the created slice instance (including contour references if the binary image is segmented)