def contour_item
      item = DICOM::Item.new
      item.add(DICOM::Element.new(ROI_COLOR, @color))
      item.add(DICOM::Element.new(REF_ROI_NUMBER, @number.to_s))
      s = DICOM::Sequence.new(CONTOUR_SQ)
      item.add(s)
      i = s.add_item
      i.add(DICOM::Sequence.new(CONTOUR_IMAGE_SQ))
      i[CONTOUR_IMAGE_SQ].add_item
      i[CONTOUR_IMAGE_SQ][0].add(DICOM::Element.new(REF_SOP_CLASS_UID, @image ? @image.series.class_uid : '1.2.840.10008.5.1.4.1.1.2')) # Deafult to CT if image ref. doesn't exist.
      i[CONTOUR_IMAGE_SQ][0].add(DICOM::Element.new(REF_SOP_UID, @uid))
      i.add(DICOM::Element.new(CONTOUR_GEO_TYPE, 'POINT'))
      i.add(DICOM::Element.new(NR_CONTOUR_POINTS, '1'))
      i.add(DICOM::Element.new(CONTOUR_NUMBER, @number.to_s))
      i.add(DICOM::Element.new(CONTOUR_DATA, @coordinate.to_s)) if @coordinate
      return item
    end
def contour_item
      item = DICOM::Item.new
      item.add(DICOM::Element.new(ROI_COLOR, @color))
      item.add(DICOM::Element.new(REF_ROI_NUMBER, @number.to_s))
      s = DICOM::Sequence.new(CONTOUR_SQ)
      item.add(s)
      i = s.add_item
      i.add(DICOM::Sequence.new(CONTOUR_IMAGE_SQ))
      i[CONTOUR_IMAGE_SQ].add_item
      i[CONTOUR_IMAGE_SQ][0].add(DICOM::Element.new(REF_SOP_CLASS_UID, @image ? @image.series.class_uid : '1.2.840.10008.5.1.4.1.1.2')) # Deafult to CT if image ref. doesn't exist.
      i[CONTOUR_IMAGE_SQ][0].add(DICOM::Element.new(REF_SOP_UID, @uid))
      i.add(DICOM::Element.new(CONTOUR_GEO_TYPE, 'POINT'))
      i.add(DICOM::Element.new(NR_CONTOUR_POINTS, '1'))
      i.add(DICOM::Element.new(CONTOUR_NUMBER, @number.to_s))
      i.add(DICOM::Element.new(CONTOUR_DATA, @coordinate.to_s)) if @coordinate
      return item
    end
=begin
    # Attaches a POI to a specified ImageSeries.
    #
    # This method can be useful when you have multiple segmentations based on
    # the same image series from multiple raters (perhaps as part of a
    # comparison study), and the rater's software has modified the UIDs of the
    # original image series, so that the references of the returned Structure
    # Set does not match your original image series.
    #
    # @param [Series] series the new ImageSeries instance which the POI shall be associated with
    #
    def attach_to(series)
      raise ArgumentError, "Invalid argument 'series'. Expected ImageSeries, got #{series.class}." unless series.is_a?(Series)
      # Change struct association if indicated:
      if series.struct != @struct
        @struct.remove_structure(self)
        StructureSet.new(RTKIT.series_uid, series) unless series.struct
        series.struct.add_poi(self)
        @struct = series.struct
      end
      # Change Frame if different:
      if @frame != series.frame
        @frame = series.frame
      end
      # How to match the POI to a new image? It's not possible to deduce a Plane
      # equation for a single point. Leaving this method unspecified for now.
    end
=end
 Creates a POI Contour Sequence Item from the attributes of the POI instance.

 @return [DICOM::Item] a POI contour sequence item