Login  Register

Re: Color LUT question

Posted by Jonathan Hilmer on Aug 18, 2006; 10:26pm
URL: http://imagej.273.s1.nabble.com/Color-LUT-question-tp3701748p3701752.html

Heiko:

The way I understood your original question, you want to apply a color
LUT that is either entirely one fixed transparency or a gradient of
transparency that might also have associated gradients of color.

I'm guessing you want to make an overlay image like the following:
http://images.google.com/imgres?imgurl=http://www.nature.com/nmat/journal/v4/n6/images/nmat1390-f4.jpg&imgrefurl=http://www.nature.com/nmat/journal/v4/n6/fig_tab/nmat1390_f4.html&h=473&w=500&sz=37&hl=en&start=13&tbnid=kA7oFryCyPQPbM:&tbnh=123&tbnw=130&prev=/images%3Fq%3Dvivo%2Bir%2Bimaging%26svnum%3D10%26hl%3Den%26lr%3D%26client%3Dfirefox-a%26rls%3Dorg.mozilla:en-US:official%26sa%3DN

Since ImageJ doesn't really deal with transparency channels, your
alternatives are to perform some fancy Image Calculator operations
with different color channels to generate the effect of transparency,
or to use ImageJ to make some images which will be interpreted by
other software as alpha layers.

Here's how could create images like the ones in the Nature link above
entirely in ImageJ:

Start with the signal image (middle column in the linked example).
Convert it using whatever LUT you want into a color, fully opaque
image.  Convert this color image to the same bit depth you want for
the final result.  Restarting with the original grayscale image,
threshold only the area you want, apply, convert to a 32-bit
grayscale, and normalize for the standard 0-1 range.  Duplicate this
image and invert it.  With Image Calculator operations, add together
your two color images (the LUT and the background it will be put
over): background*inverted_32b_mask+LUT*32b_mask.

You'll have to make sure the raw numbers for the images all match the
way you want (white = high, etc), but this should work.

The alternative method is to generate an opaque color LUT, create a
grayscale alpha mask with thresholds and/or grayscale LUT, and use an
external program to composite it together.  If you're doing much
post-processing, this would probably be easier.

http://www.cit.gu.edu.au/~anthony/graphics/imagick6/channels/


Jonathan



On 8/18/06, Heiko Gleitsmann <[hidden email]> wrote:

> Hi all,
>
> is it possible to add opacity information via LUT in ImageJ. I need
> something to create a Color LUT with specified opacity.
>
> regards heiko
>
> --
> * *********************************
> * Heiko Gleitsmann c/o Kramer
> * Wohlgemuthstr. 19
> * 12437 Berlin
>
> * phone: 030/99190249
> * mobile: 0719/7013401
> * ICQ: 342985916
> * *********************************