\name{utilities}
\alias{rip.flip}
\alias{rip.shift}
\title{Helper utilities}
\usage{
rip.flip(k, cv)
rip.shift(x, inverse = FALSE,
          orow = 1 + ceiling(nrow(x)/2), 
          ocol = 1 + ceiling(ncol(x)/2))
}
\arguments{

  \item{k, x}{
    A \code{"rip"} object (or an object that can be coerced to
    one). Typically a convolution kernel for \code{rip.flip}.
  }

  \item{cv}{
    Logical flag indicating whether to use the OpenCV funtion
    \code{flip} instead of an R implementation. The R implementation
    only supports single channel image matrices.
  }

  \item{inverse}{
    Whether to (conceptually) invert a previous shift operation,
    accounting for rounding differences.
  }

  \item{orow, ocol}{
    Integer giving the index of the \sQuote{origin} row / column. The
    image is shifted (and wrapped) to that these become the first row
    and column of the resulting image.
  }

}
\description{

  \code{rip.flip} flips a convolution kernel by reversing row and column
  order.

  \code{rip.shift} shift-wraps an image. This is typically used for the
  result of \code{rip.dft}, where it has the effect of shifting the
  frequency range.

}


