def create_slices(contour_sequence)
      raise ArgumentError, "Invalid argument 'contour_sequence'. Expected DICOM::Sequence, got #{contour_sequence.class}." unless contour_sequence.is_a?(DICOM::Sequence)
      # Sort the contours by slices:
      slice_collection = Hash.new
      contour_sequence.each do |slice_contour_item|
        sop_uid = slice_contour_item[CONTOUR_IMAGE_SQ][0].value(REF_SOP_UID)
        slice_collection[sop_uid] = Array.new unless slice_collection[sop_uid]
        slice_collection[sop_uid] << slice_contour_item
      end
      # Create slices:
      slice_collection.each_pair do |sop_uid, items|
        Slice.create_from_items(sop_uid, items, self)
      end
    end
def create_slices(contour_sequence)
      raise ArgumentError, "Invalid argument 'contour_sequence'. Expected DICOM::Sequence, got #{contour_sequence.class}." unless contour_sequence.is_a?(DICOM::Sequence)
      # Sort the contours by slices:
      slice_collection = Hash.new
      contour_sequence.each do |slice_contour_item|
        sop_uid = slice_contour_item[CONTOUR_IMAGE_SQ][0].value(REF_SOP_UID)
        slice_collection[sop_uid] = Array.new unless slice_collection[sop_uid]
        slice_collection[sop_uid] << slice_contour_item
      end
      # Create slices:
      slice_collection.each_pair do |sop_uid, items|
        Slice.create_from_items(sop_uid, items, self)
      end
    end
Creates Slice instances from the contour sequence items of the contour
 sequence, and connects these slices to this ROI instance.

 @param [DICOM::Sequence] contour_sequence a Contour Sequence