0 Replies Latest reply: Mar 12, 2010 2:48 AM by 843802 RSS

    ImageJ and JAI

      I am using ImageJ as library and need some help. So i have jPanel1 in my
      jFrame and i need import brightness/contrast functions and link these
      functions with my opened image. This is my implementation:

      Graphics g = this.jPanel1.getGraphics();
      Point p = new Point(0,0);

      ImagePlus imp =
      ColorProcessor cp = (ColorProcessor) imp.getProcessor();
      int[] pixels = (int[]) cp.getPixels();
      BufferedImage bimg = new


      g.drawImage(bimg, p.x, p.y, this.jPanel1);

      So question: How can i change brightness and contrast in my jPanel1 image
      using ImageJ library?
      Is there some doc with examples of using ImageJ as library?

      I tried almost everything. Creating new objects of ContrastAdjuster, copying
      pieces of code in my jFrame. I think something very important is missing me.
      Please help me!

      Or maybe you will tell me about another better library to processing images
      easyli with examples? I need strong contrast algorithm. JAI?

      Thank you very much.