def indices_general_to_specific(indices, columns=@columns)
      if indices.is_a?(Array)
        row_indices = indices.collect {|i| i / columns}
        column_indices = [indices, row_indices].transpose.collect{|i| i[0] - i[1] * columns}
      else
        # Assume Fixnum or NArray:
        row_indices = indices / columns # Values are automatically rounded down.
        column_indices = indices - row_indices * columns
      end
      return column_indices, row_indices
    end
def indices_general_to_specific(indices, columns=@columns)
      if indices.is_a?(Array)
        row_indices = indices.collect {|i| i / columns}
        column_indices = [indices, row_indices].transpose.collect{|i| i[0] - i[1] * columns}
      else
        # Assume Fixnum or NArray:
        row_indices = indices / columns # Values are automatically rounded down.
        column_indices = indices - row_indices * columns
      end
      return column_indices, row_indices
    end
Computes a hash code for this object.

 @note Two objects with the same attributes will have the same hash code.

 @return [Fixnum] the object's hash code

 Converts general image indices to specific column and row indices based
 on the geometry of the image (the number of columns).

 @param [NArray, Array] indices general pixel array indices
 @param [Integer] columns the number of columns in the image array
 @return [Array<NArray, Array>] column & row indices