Login  Register

Re: How to get the color information?? (isColorLut and isPseudoColorLut do not help)

Posted by Joris FA Meys on Feb 05, 2009; 4:53pm
URL: http://imagej.273.s1.nabble.com/How-to-get-the-image-information-tp3693833p3693835.html

try getType() from ImagePlus. If the return is 3 or 4, your image is in
color.
Kind regards
Joris

On Thu, Feb 5, 2009 at 5:31 PM, Xin ZHOU <[hidden email]> wrote:

> Wayne Rasband a écrit :
>
>> I'm using ij.jar for programming.
>>> How can I know one image is in color so that I can separate it from the
>>> others??
>>>
>> Dear Xin,
>>
>> RGB color images use a ColorProcessor. The getRGB() of the ColorProcessor
>> class returns the image as three byte arrays, which can be easily converted
>> into three ByteProcessors.
>>
>> -wayne
>>
> Hello, Wayne, and the others
>
> Thanks a lot for your answers.
> But my question is GreyLevel images are mixed with color ones.
> How can I separate them? If I use ColorProcessor, this means I know already
> they are color ones.
> I've tried the methods : isColorLut and isPseudoColorLut.
> Surprisingly it doesn't work. It return false to all images, even color
> ones.
>
> Any idea for that ??
>
> cheers, Xin
>