def slice_spacing
      if @slice_spacing
        # If the slice spacing has already been computed, return it instead of recomputing:
        return @slice_spacing
      else
        if @images.length > 1
          # Collect slice positions and sort them:
          slice_positions = NArray.to_na(@images.collect{|image| image.pos_slice}.sort)
          spacings = (slice_positions[1..-1] - slice_positions[0..-2]).abs
          @slice_spacing = spacings.to_a.most_common_value
        end
      end
    end
def slice_spacing
      if @slice_spacing
        # If the slice spacing has already been computed, return it instead of recomputing:
        return @slice_spacing
      else
        if @images.length > 1
          # Collect slice positions and sort them:
          slice_positions = NArray.to_na(@images.collect{|image| image.pos_slice}.sort)
          spacings = (slice_positions[1..-1] - slice_positions[0..-2]).abs
          @slice_spacing = spacings.to_a.most_common_value
        end
      end
    end
Gives the slice spacing (a float value in units of mm), which describes
 the distance between two neighbouring images in this image series.

 @note If the image series contains a single (or zero) images,
   a slice spacing can not be determined and nil is returned.
 @return [Float, NilClass] the distance between slices (or nil if undefined)