def color=(value)
      # Make sure that the color string is of valid format before saving it:
      raise ArgumentError, "Invalid argument 'value'. Expected String, got #{value.class}." unless value.is_a?(String)
      colors = value.split("\\")
      raise ArgumentError, "Invalid argument 'value'. Expected 3 color values, got #{colors.length}." unless colors.length == 3
      colors.each do |str|
        c = str.to_i
        raise ArgumentError, "Invalid argument 'value'. Expected valid integer (0-255), got #{str}." if c < 0 or c > 255
        raise ArgumentError, "Invalid argument 'value'. Expected an integer, got #{str}." if c == 0 and str != "0"
      end
      @color = value
    end
def color=(value)
      # Make sure that the color string is of valid format before saving it:
      raise ArgumentError, "Invalid argument 'value'. Expected String, got #{value.class}." unless value.is_a?(String)
      colors = value.split("\\")
      raise ArgumentError, "Invalid argument 'value'. Expected 3 color values, got #{colors.length}." unless colors.length == 3
      colors.each do |str|
        c = str.to_i
        raise ArgumentError, "Invalid argument 'value'. Expected valid integer (0-255), got #{str}." if c < 0 or c > 255
        raise ArgumentError, "Invalid argument 'value'. Expected an integer, got #{str}." if c == 0 and str != "0"
      end
      @color = value
    end
=begin
    # Attaches a Structure to a specified ImageSeries, by setting the structure's frame
    # reference to the Frame which the ImageSeries belongs to, and setting the
    # Image reference of each of the Slices belonging to the ROI to an Image
    # instance which matches the coordinates of the Slice's Contour(s).
    #
    # 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. This method uses
    # coordinate information to calculate plane equations, which allows it to
    # identify the corresponding image slice even in the case of slice geometry
    # being non-perpendicular with respect to the patient geometry (direction
    # cosine values != [0,1]).
    #
    # @param [Series] series the new ImageSeries instance which the ROI shall be associated with
    # @raise [ArgumentError] if a suitable match is not found for any of the ROI's slices
    #
    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_roi(self)
        StructureSet.new(RTKIT.series_uid, series) unless series.struct
        series.struct.add_roi(self)
        @struct = series.struct
      end
      # Change Frame if different:
      if @frame != series.frame
        @frame = series.frame
      end
      # Update slices:
      @slices.each do |slice|
        slice.attach_to(series)
      end
    end
=end
 Sets a new color for this Structure.

 @param [String] value a properly formatted color string (3 integers 0-255 - each separated by a '\') (3006,002A)