Posted by
Herbie on
Oct 10, 2016; 3:58pm
URL: http://imagej.273.s1.nabble.com/Custom-brightness-contrast-on-a-image-tp5017336p5017340.html
well Danae,
you may use the Recorder-functionality of ImageJ to get an idea of the
relevant Java calls. Don't forget to select "Java" in the recorder.
Here is what I get for example when I change the contrast of an 8bit
ramp image:
//////////////////////////////////
import ij.*;
import ij.process.*;
import ij.gui.*;
import java.awt.*;
import ij.plugin.*;
public class My_Plugin implements PlugIn {
public void run(String arg) {
ImagePlus imp = IJ.getImage();
IJ.setMinAndMax(imp, 73, 181);
}
}
//////////////////////////////////
Besides, you should have an idea of how you define contrast. There are
at least three different and common ways of doing so. Furthermore, you
must consider whether you want to deal with different image types (RGB,
gray 8bit, 16bit, 32bit)...
Good luck
Herbie
:::::::::::::::::::::::::::::::::::
Am 10.10.16 um 17:43 schrieb Danae:
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html