Login  Register

Programatically apply LUT to 16 bit gray image

Posted by Robert Lockwood on Nov 29, 2014; 11:04pm
URL: http://imagej.273.s1.nabble.com/Programatically-apply-LUT-to-16-bit-gray-image-tp5010690.html

I have dropped a couple of LUT's in the LUT folder of FiJi and want to
apply them in my Java Application to some test images (RAW) that I've been
able to read in and display.

My testing code:

fi = new FileInfo();
fi.fileName = input_file;
fi.fileType = FileInfo.GRAY16_UNSIGNED;
fi.width = imgWidth;
fi.height = imgHeight;
fi.intelByteOrder = false;
fo = new FileOpener(fi);
imp = fo.open(false);
if (imp != null) {
ip = (ShortProcessor) imp.getProcessor();
bi = ip.get16BitBufferedImage();
new ImagePlus(input_file, bi).show();
}


How to I import the LUT into my code.  It appears that if I have an LUT I
can set it but I don't know how to import it.

My objective, after a suitable LUT is found, is to save the image as a PNG.


--
When I was 12 I thought I would live forever.
So far, so good.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html