http://imagej.273.s1.nabble.com/How-to-get-the-image-information-tp3693833p3693836.html
Hi, thanks a lot Joris.
Unfortunately this only solve half of my problem.
The question is : some grey-level images are saved as color_RGB. That's
awful.
So getType() shows that they are color images. But they are not.
The three values for each pixel are the same.
> 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
>>
>>
>
>