how to use ImageProcessor convertToShortProcessor() ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

how to use ImageProcessor convertToShortProcessor() ?

Leon Espinosa-3
Hello, I'm trying to convert a 32bits image processor (float processor) in a 16-bits (short processor) but "it" says that FloatProcessor object has no convertToShortProcessor() method. This script fails :

imp = IJ.createImage("Untitled", "32-bit black", 500, 500, 1);
imp.show();
ip = imp.getProcessor();
ip16b = ip.convertToShortProcessor();

In my script I'm trying to avoid IJ.run(imp, "16-bit", ""); in order to avoid to generate an ImagePlus for each processor that I need to convert...

Thank you very much for any help

Leon

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