Tabnine Logo
it.geosolutions.jaiext.lookup
Code IndexAdd Tabnine to your IDE (free)

How to use it.geosolutions.jaiext.lookup

Best Java code snippets using it.geosolutions.jaiext.lookup (Showing top 20 results out of 315)

origin: geotools/geotools

/** Simple utility method generating a Byte Based lookup table */
private static LookupTable generateLookupTableByte(byte[] lut) {
  return LookupTableFactory.create(lut, DataBuffer.TYPE_BYTE);
}
origin: it.geosolutions.jaiext.lookup/jt-lookup

/**
 * Constructs a single-banded double lookup table with an index offset.
 * 
 * @param data The single-banded double data.
 * @param offset The offset.
 * @throws IllegalArgumentException if data is null.
 */
public static LookupTable create(double[] data, int offset) {
  return new LookupTable(data, offset);
}
origin: geotools/geotools

/**
 * Builds a lookup table that is the identity on all bands but the alpha one, where the opacity
 * is applied
 *
 * @param opacity
 * @param bands
 * @param alphaBand
 * @return
 */
LookupTable buildOpacityLookupTable(
    float opacity, final int bands, int alphaBand, int dataType) {
  byte[][] matrix = new byte[bands][256];
  for (int band = 0; band < matrix.length; band++) {
    if (band == alphaBand) {
      for (int i = 0; i < 256; i++) {
        matrix[band][i] = (byte) Math.round(i * opacity);
      }
    } else {
      for (int i = 0; i < 256; i++) {
        matrix[band][i] = (byte) i;
      }
    }
  }
  LookupTable table = LookupTableFactory.create(matrix, dataType);
  return table;
}
origin: it.geosolutions.jaiext.lookup/jt-lookup

/**
 * Constructs a multi-banded double lookup table. The index offset for each band is 0.
 * 
 * @param data The multi-banded double data in [band][index] format.
 * @throws IllegalArgumentException if data is null.
 */
public static LookupTable create(double[][] data) {
  return new LookupTable(data);
}
origin: geotools/geotools

private LookupTable createLookupTableByte(List<Range<Integer>> exclusionValues, int dataType) {
  final byte[] b = new byte[256];
  Arrays.fill(b, (byte) 0);
  for (Range<Integer> exclusionValue : exclusionValues) {
    final int minValue = exclusionValue.getMinValue();
    final int maxValue = exclusionValue.getMaxValue();
    for (int i = minValue; i <= maxValue; i++) {
      b[i] = (byte) INVALID_PIXEL_I;
    }
  }
  return LookupTableFactory.create(b, dataType);
}
origin: it.geosolutions.jaiext.lookup/jt-lookup

/**
 * Constructs a multi-banded double lookup table where all bands have the same index offset.
 * 
 * @param data The multi-banded double data in [band][index] format.
 * @param offset The common offset for all bands.
 * @throws IllegalArgumentException if data is null.
 */
public static LookupTable create(double[][] data, int offset) {
  return new LookupTable(data, offset);
}
origin: geotools/geotools

  private LookupTable createLookupTableUShort(
      List<Range<Integer>> exclusionValues, int dataType) {
    final byte[] bUShort = new byte[65536];
    Arrays.fill(bUShort, (byte) 0);
    for (Range<Integer> exclusionValue : exclusionValues) {
      final int minValue = exclusionValue.getMinValue();
      final int maxValue = exclusionValue.getMaxValue();
      for (int i = minValue; i <= maxValue; i++) {
        bUShort[i] = (byte) INVALID_PIXEL_I;
      }
    }
    return LookupTableFactory.create(bUShort, dataType);
  }
}
origin: it.geosolutions.jaiext.lookup/jt-lookup

/**
 * Constructs a multi-banded double lookup table where each band has a different index offset.
 * 
 * @param data The multi-banded double data in [band][index] format.
 * @param offsets The offsets for the bands.
 * @throws IllegalArgumentException if data is null.
 */
public static LookupTable create(double[][] data, int[] offsets) {
  return new LookupTable(data, offsets);
}

origin: geotools/geotools

if (max < 256) {
  table =
      LookupTableFactory.create(
          new byte[] {(byte) value0, (byte) value1}, DataBuffer.TYPE_BYTE);
} else if (max < 65536) {
  table =
      LookupTableFactory.create(
          new short[] {(short) value0, (short) value1}, true);
} else {
  table = LookupTableFactory.create(new int[] {value0, value1});
table = LookupTableFactory.create(new int[] {value0, value1}, DataBuffer.TYPE_BYTE);
origin: it.geosolutions.jaiext.lookup/jt-lookup

/**
 * Constructs a multi-banded byte lookup table. The index offset for each band is 0.
 * 
 * @param data The multi-banded byte data in [band][index] format.
 * @throws IllegalArgumentException if data is null.
 */
public static LookupTable create(byte[][] data) {
  return new LookupTable(data);
}
origin: geotools/geotools

  LookupTable table = LookupTableFactory.create(lut, dataType);
  worker.lookup(table);
} else {
origin: it.geosolutions.jaiext.lookup/jt-lookup

/**
 * Constructs a single-banded int lookup table with an index offset.
 * 
 * @param data The single-banded int data.
 * @param offset The offset.
 * @throws IllegalArgumentException if data is null.
 */
public static LookupTable create(int[] data, int offset) {
  return new LookupTable(data, offset);
}
origin: geotools/geotools

switch (dataType) {
  case DataBuffer.TYPE_BYTE:
    lut = LookupTableFactory.create(IDENTITY_BYTE);
    break;
    lut = LookupTableFactory.create(IDENTITY_SHORT, unsigned);
    break;
origin: it.geosolutions.jaiext.lookup/jt-lookup

/**
 * Constructs a multi-banded float lookup table where all bands have the same index offset.
 * 
 * @param data The multi-banded float data in [band][index] format.
 * @param offset The common offset for all bands.
 * @throws IllegalArgumentException if data is null.
 */
public static LookupTable create(float[][] data, int offset) {
  return new LookupTable(data, offset);
}
origin: geotools/geotools

LookupTableFactory.create(tableData, image.getSampleModel().getDataType());
origin: geosolutions-it/jai-ext

/**
 * Constructs a single-banded double lookup table with an index offset.
 * 
 * @param data The single-banded double data.
 * @param offset The offset.
 * @throws IllegalArgumentException if data is null.
 */
public static LookupTable create(double[] data, int offset) {
  return new LookupTable(data, offset);
}
origin: geotools/geotools

lut = LookupTableFactory.create(data, datatype);
lut = LookupTableFactory.create(data, datatype == DataBuffer.TYPE_USHORT);
origin: geotools/geotools

LookupTableFactory.create(lutData, mask.getSampleModel().getDataType());
origin: geotools/geotools

      LookupTableFactory.create(table, image.getSampleModel().getDataType());
} else {
  final short[] table = new short[mapSize];
    table[i] = (short) ((oldCM.getAlpha(i) == 0) ? suggestedTransparent : i);
  lookupTable = LookupTableFactory.create(table, true);
origin: geotools/geotools

.rangeLookup(lookupTable)
.bandCombine(matrix)
.lookup(LookupTableFactory.create(ALPHA_LUT))
.getRenderedImage();
it.geosolutions.jaiext.lookup

Most used classes

  • LookupTableFactory
  • LookupDescriptor
    An OperationDescriptor describing the "Lookup" operation. The Lookup operation takes a rendered imag
  • LookupTable
    This abstract class defines the general methods of a LookupTable. This class contains all the table
  • ComparisonTest
    This test class is used for compare the timing between the new LookupDescriptor and the its old JAI
  • CoverageTest
    This test class is used for expanding the code coverage of the jt-lookup project. This purpose is re
  • LookupPropertyGenerator,
  • LookupTableWrapper,
  • LookupTest
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now