def image_by_slice_pos(pos)
      # Step 1: Try for an (exact) match:
      image = @image_positions[pos.round(2)]
      # Step 2: If no match, try to search for a close match:
      # (A close match is defined as the given slice position being within 1/3 of the
      # slice distance from an existing image instance in the series)
      if !image && @images.length > 1
        proximity = @images.collect{|img| (img.pos_slice - pos).abs}
        if proximity.min < slice_spacing / 3.0
          index = proximity.index(proximity.min)
          image = @images[index]
        end
      end
      return image
    end
def image_by_slice_pos(pos)
      # Step 1: Try for an (exact) match:
      image = @image_positions[pos.round(2)]
      # Step 2: If no match, try to search for a close match:
      # (A close match is defined as the given slice position being within 1/3 of the
      # slice distance from an existing image instance in the series)
      if !image && @images.length > 1
        proximity = @images.collect{|img| (img.pos_slice - pos).abs}
        if proximity.min < slice_spacing / 3.0
          index = proximity.index(proximity.min)
          image = @images[index]
        end
      end
      return image
    end
Returns an image instance matched by the given slice position.

 @param [Float] pos image slice position
 @return [Image, NilClass] the matched image (or nil if no image is matched)