def update_image_position(image, new_pos)
      raise ArgumentError, "Invalid argument 'image'. Expected Image, got #{image.class}." unless image.is_a?(Image)
      # Remove old position key:
      @image_positions.delete(image.pos_slice)
      # Add the new position:
      @image_positions[new_pos] = image
    end
def update_image_position(image, new_pos)
      raise ArgumentError, "Invalid argument 'image'. Expected Image, got #{image.class}." unless image.is_a?(Image)
      # Remove old position key:
      @image_positions.delete(image.pos_slice)
      # Add the new position:
      @image_positions[new_pos] = image
    end
Updates the position that is registered for the image instance for this series.

 @param [Image] image an instance belonging to this image series
 @param [Float] new_pos a new slice position to be associated with the image instance