Tabnine Logo
HistogramDescriptor
Code IndexAdd Tabnine to your IDE (free)

How to use
HistogramDescriptor
in
javax.media.jai.operator

Best Java code snippets using javax.media.jai.operator.HistogramDescriptor (Showing top 7 results out of 315)

origin: it.geosolutions.jaiext.utilities/jt-utilities

public void setImage(PlanarImage wrapRenderedImage)
{
  try {
    setHistogram((Histogram) HistogramDescriptor.create(
        wrapRenderedImage,
        null,
        1,
        1,
        new int[] { 65536 },
        new double[] { 0 },
        new double[] { 65535 },
        null).getProperty("histogram"));
  } catch(Exception e) {
    e.printStackTrace();
    setHistogram(null);
  }
}
origin: geosolutions-it/jai-ext

public void setImage(PlanarImage wrapRenderedImage)
{
  try {
    setHistogram((Histogram) HistogramDescriptor.create(
        wrapRenderedImage,
        null,
        1,
        1,
        new int[] { 65536 },
        new double[] { 0 },
        new double[] { 65535 },
        null).getProperty("histogram"));
  } catch(Exception e) {
    e.printStackTrace();
    setHistogram(null);
  }
}
origin: bcdev/beam

public static Histogram computeHistogram(RenderedImage image, ROI roi, int numBins, Range range) {
  final double min = range.getMin();
  final double max = range.getMax();
  Histogram histogram;
  if (min < max) {
    final RenderedOp histogramOp = HistogramDescriptor.create(image, 
                                 roi, 
                                 1, 
                                 1, 
                                 new int[]{numBins},
                                 new double[]{min},
                                 new double[]{max},
                                 null);
    histogram = getBeamHistogram(histogramOp);
  } else {
    final long imageSize = (long) image.getWidth() * image.getHeight();
    final int numPixels = (int) Math.min(Integer.MAX_VALUE, imageSize);
    histogram = new Histogram(new int[]{numPixels} , min, min);
  }
  return histogram;
}

origin: org.imajine.image/org-imajine-image-plugin-jai

/*******************************************************************************
 * 
 * @inheritDoc
 * 
 *******************************************************************************/
private void compute()
 {
  SampleModel sampleModel = renderedImage.getSampleModel();
  bandCount = sampleModel.getNumBands();
  int bits = DataBuffer.getDataTypeSize(sampleModel.getDataType());
  ROI roi = null;
  int[] bins = new int[bandCount];
  min = new double[bandCount];
  max = new double[bandCount];
  int maxxx = 1 << bits;
  for (int i = 0; i < bandCount; i++)
   {
    bins[i] = maxxx;
    min[i] = 0;
    max[i] = maxxx;
   }
  RenderingHints renderingHints = null;
  Integer xPeriod = new Integer(1);
  Integer yPeriod = new Integer(1);
  RenderedOp op = HistogramDescriptor.create(renderedImage, roi, xPeriod, yPeriod, bins, min, max, renderingHints);
  delegate = (Histogram)op.getProperty("histogram");
 }
origin: org.imajine/org-imajine-image-plugin-jai

/*******************************************************************************
 * 
 * @inheritDoc
 * 
 *******************************************************************************/
private void compute()
 {
  SampleModel sampleModel = renderedImage.getSampleModel();
  bandCount = sampleModel.getNumBands();
  int bits = DataBuffer.getDataTypeSize(sampleModel.getDataType());
  ROI roi = null;
  int[] bins = new int[bandCount];
  min = new double[bandCount];
  max = new double[bandCount];
  int maxxx = 1 << bits;
  for (int i = 0; i < bandCount; i++)
   {
    bins[i] = maxxx;
    min[i] = 0;
    max[i] = maxxx;
   }
  RenderingHints renderingHints = null;
  Integer xPeriod = new Integer(1);
  Integer yPeriod = new Integer(1);
  RenderedOp op = HistogramDescriptor.create(renderedImage, roi, xPeriod, yPeriod, bins, min, max, renderingHints);
  delegate = (Histogram)op.getProperty("histogram");
 }
origin: geosolutions-it/jai-ext

      xPeriod, yPeriod, false, 1, null);
} else if (STATISTIC == 2) {
  imageStats = javax.media.jai.operator.HistogramDescriptor.create(testImage,
      roi, xPeriod, yPeriod, numBinsTest, minBoundsTest, maxBoundsTest, null);
origin: org.geotools/gt-render

final RenderedOp hist = HistogramDescriptor.create(inputImage,
    null, Integer.valueOf(1), Integer.valueOf(1),
    new int[] { 256 }, new double[] { 0 },
javax.media.jai.operatorHistogramDescriptor

Most used methods

  • create

Popular in Java

  • Making http post requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • compareTo (BigDecimal)
  • findViewById (Activity)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • JButton (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Best plugins for Eclipse
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