Login  Register

Re: Get Image type in a macro

Posted by Michael Cammer on Sep 03, 2007; 1:14pm
URL: http://imagej.273.s1.nabble.com/Get-Image-type-in-a-macro-tp3698462p3698463.html

bitDepth()

e.g.

if (bitDepth() != 8) exit ("8 bit image required.");


> Hi everyone,
>
> I would like to know if there is a macro function that returns the type
> (8-bit, 16-bit, RGB, etc...) of the active image. I can get it by
> spitting "Image Info" to retrieve it but I would be very surprized if
> there is not a direct function for that. Unfortuntely my eyes are still
> a bit closed on this monday morning and I can't find it on the macro
> reference page...
>
> Thank you very much,
>
> Christophe Leterrier
>
>
> PS/ Thanks a lot to Jerome Mutterer and Johannes Schindelin for their
> macros (that streamline an iterative name using zeros) !
>


_________________________________________
Michael Cammer   http://www.aecom.yu.edu/aif/