{:title "Making a lookup table (LUT) for ImageJ from an existing image" :date "2020-01-05" :updated "{{{time(%Y-%m-%d %a)}}}" :tags ["imagej" "image-analysis"]}

Making a lookup table (LUT) for ImageJ from an existing image

First published: 2020-01-05 Sun
Last updated: 2020-01-05 Sun

ImageJ lookup tables (LUTs) map integer or floating point pixel values to colors. ImageJ comes with a lot of nice LUTs and there are many available on the internet as well (Christophe Leterrier has excellent ones available here https://github.com/cleterrier/ChrisLUTs). I recently wanted to make my own based on a colormap on an image exported from our microscope (myelin is the blue-ish color below that I wanted to use).

example image of myelin and mitral cells

Here are the steps to creating your own LUT from a reference image:

  1. Open up the image and switch to your target channel (in this case channel 4).

You can view the raw values of the LUT by clicking Image>Color>Show LUT and clicking "List" on the resulting window.

how to display a LUT in imagej

  1. Split the channels so only your channel of interest is showing (Image>Color>Split Channels close all unrelated channels), and save this as a LUT by clicking File>Save As...> LUT.... I saved mine as mylein-test-lut

    saving an image as a LUT in ImageJ

  2. Move this file to Fiji.app/luts/ directory.
  3. Close and re-open Fiji and you should see your new LUT in the options menu

    see your new LUT in the LUTs menu