Class DoubleComplexPixArray


final class DoubleComplexPixArray extends DoublePixArray
A representation of an array of complex (real, imaginary) 2-double pixels. Note that all pixel values handled by this class are of the primitive double class. However, it is up to the user to convert these to complex before the pixel values are used. This would typically be done using statements like:

for (int i = 0; i < nPixels; i++) {
double real = pixel[2*i];
double imag = pixel[2*i+1];
}
Double values that make up the complex pixels are ordered: real1, imag1, real2, imag2, real3, imag3, ... etc.
  • Method Details

    • getHisto

      public int[] getHisto(int nbins) throws InvalidImageException
      Computes a brightness histogram of a DoubleComplexPixArray. A brighness value is computed by taking the magnitude of the complex number.
      Overrides:
      getHisto in class DoublePixArray
      Parameters:
      nbins - the number of bins in the histogram.
      Returns:
      an int[] of nbins the first element is the number of pixels with the minimum brightness, and the last element is the number of pixels with the brightness (minimum + nbins - 1).
      Throws:
      InvalidImageException - if the histogram can't be computed.
    • getPutPix

      public Object getPutPix(Object pix, int[] pixIdx, PixelOp op) throws IllegalArgumentException
      Description copied from class: DoublePixArray
      Gets/puts a single pixel value from/to an an image. Returns a java.lang.Double cast to Object corresponding to the picture primitve type. This represents the pixel intensity value for the pixel indexed by each element of pixIdx.
      Overrides:
      getPutPix in class DoublePixArray
      Parameters:
      pix - a pixel value for a put operation or null for a get operation.
      pixIdx - an array of length at least nDim with elements 0 to nDim-1 equal to the index in that image dimension.
      op - the type of operation (GET or PUT).
      Returns:
      a pixel value for a get operation or the supplied pixel for a put operation.
      Throws:
      IllegalArgumentException - if the pixIdx is bad.