Featured image of post ImageJ Color Splitter Into Stacks

ImageJ Color Splitter Into Stacks

An easy-to-use plugin for ImageJ and Fiji that splits an RGB image or image stack into multiple color spaces.

Introduction

The ImageJ Color Splitter Into Stacks plugin is designed for scientists, researchers, and imaging enthusiasts who need to break down complex RGB images into their constituent color channels. Whether you’re analyzing microscopy images or preparing data for further image processing, this plugin simplifies the process by converting the image into multiple color spaces.

The plugin provides an interactive dialog to choose the desired color space and even offers the option to display the original image alongside the split channels.

Features

  • Multi-Color Space Support: Split images into HSV, RGB, CMYK, and CIELAB color channels.
  • Batch Processing: Works with both single images and stacks.
  • User-Friendly Interface: Simple dialog box for choosing color spaces and options.
  • Lightweight & Fast: Optimized to handle large images/stacks with real-time progress updates.
  • Open Source: Free to use, modify, and distribute under the MIT License.

Requirements

  • ImageJ or Fiji: Version 1.53+ (Fiji is recommended for an enhanced feature set).
  • Java: Compatible Java runtime environment.
  • Operating System: Cross-platform compatibility (Windows, macOS, Linux).

Installation

Via the ImageJ Official Website

  1. Download: Navigate to the ImageJ website and download the latest version of the plugin file (Color_Splitter_Into_Stacks.class).
  2. Install: Open ImageJ and navigate to Plugins > Install or press CTRL + SHIFT + M.
  3. Select Plugin: Browse to and select the downloaded Color_Splitter_Into_Stacks.class file.
  4. Restart (if necessary): Some installations might require a restart of ImageJ.

Via Custom Download

  1. Download: Visit the release section of the project repository and download the latest Color_Splitter_Into_Stacks.class file.
  2. Install: Open ImageJ and navigate to Plugins > Install or press CTRL + SHIFT + M.
  3. Select Plugin: Choose the downloaded class file.
  4. Restart (if necessary): Restart ImageJ if the plugin does not load immediately.

Usage

  1. Launch ImageJ/Fiji: Open the application.
  2. Load an Image or Stack: Open your desired RGB image or image stack.
  3. Run the Plugin: Navigate to Plugins and select Color Splitter Into Stacks.
  4. Select Options:
    • Color Space Choice: Choose from “HSV (HSB)”, “RGB”, “CMYK”, or “CIELAB” via the provided dropdown.
    • Display Option: Optionally check the box if you don’t want original image to disappear after stacks creation.
  5. Process: Click OK and watch as the plugin processes the image, showing progress updates. The plugin will then display each channel as a separate grayscale image.

How It Works

The plugin processes images by converting the input RGB data into the selected color space. Each conversion method (HSV, RGB, CMYK, CIELAB) is implemented to handle both single images and stacks efficiently.

Color Spaces Explained

  • HSV (HSB):
    Separates the image into Hue (color type), Saturation (vividness), and Value/Brightness.

  • RGB:
    Splits the image into its fundamental Red, Green, and Blue components, useful for understanding the primary color makeup.

  • CMYK:
    Converts the RGB data into Cyan, Magenta, Yellow, and Black channels using an approximated conversion formula—ideal for print-related workflows.

  • CIELAB:
    Transforms the image to the CIELAB color space, where:

    • L* represents lightness,
    • a* represents the green-red component,
    • b* represents the blue-yellow component.

    This conversion involves transforming sRGB to linear RGB, then to the XYZ color space, and finally to CIELAB. The output is scaled to a 0–255 range for compatibility with grayscale imaging.

Demo

Below are examples demonstrating how this plugin splits an image of a leopard into various color spaces. Each channel is shown as a grayscale image for clarity.

Original

RGB Split

HSV Split

CMYK Split

CIELAB Split

Each channel highlights the corresponding grayscale contribution in the original image.