Login  Register

Re: get data type imageJ macro

Posted by Gabriel Landini on Sep 15, 2016; 12:32pm
URL: http://imagej.273.s1.nabble.com/get-data-type-imageJ-macro-tp5017187p5017188.html

On Thursday 15 Sep 2016 12:27:48 PEARSON Matthew wrote:
> I'm looking for a simple way to query the data type of an opened image
> within the ImageJ macro language?  I had a look through the built in
> functions but didn't spot something i thought would be appropriate.  Within
> a macro i'd like to determine what the data type of the active image is
> e.g. 8-bit, 16-bit, RGB then the macro will do different things depending


bitDepth()
Returns the bit depth of the active image: 8, 16, 24 (RGB) or 32 (float).

https://imagej.nih.gov/ij/developer/macro/functions.html

Cheers

Gabriel

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