Skip to content

Fiji Connect Panel

Back to MIB | User Guide | Panels


Overview

Fiji Connect Panel

The Fiji Connect Panel enables communication with Fiji, an image processing software, using the MIJ Java package for bidirectional data exchange between MATLAB and ImageJ/Fiji. MIJ is developed by Daniel Sage, Dimiter Prodanov, Jean-Yves Tinevez, and Johannes Schindelin. Ensure Fiji is installed and MIJ is integrated (see System Requirements).

Visualization of datasets and models using Fiji


Start Fiji and Stop Fiji buttons

Fiji Connect Panel

Start Fiji: launches Fiji from MATLAB, required for communication.

Warning

Press this button first before any actions!

Stop Fiji closes Fiji when it is not needed anymore.


Image Type and Import/Export buttons

Fiji Connect Panel

Image Type dropdown

Specifies the layer (e.g., Image, Model, Mask, Selection) to exchange with Fiji.

Example

For example, selecting Image and pressing Export sends the current image to Fiji. See Finding Edges using Fiji below for details.

Export: sends the current dataset (based on Image Type) to Fiji for processing or analysis.

Import: iImports datasets from Fiji into MIB’s Image, Model, Mask, or Selection layers, as set by Image Type.
Ensure Model, Mask, and Selection sizes match the Image layer in MIB.



Run macro or send a command to Fiji

Fiji Connect Panel

Run macro edit box Enter a Fiji macro command (e.g., <span class="code">run('Flip Z')</span> to flip the Z-dimension). A template is shown by default.
Alternatively, input a path to a text file with multiple macros, selected via Select file....
Check Miji for syntax.

Select file... button: opens a dialog to choose a text file containing macro commands for execution with Run.
See Miji for syntax.

Run button: executes the macro in Run macro. If a file path is provided, it runs all macros in that script.


Help button

?: opens the help documentation for detailed instructions.


Example: Finding edges using Fiji

This example shows how to detect edges in a 3D grayscale dataset and import a binary mask into MIB.

Steps (assuming Fiji is installed and configured)
  1. Get a test dataset from Menu -> File -> Example datasets -> SBEM -> Huh7 and model.
  2. Open the dataset in MIB.
  3. Press Start Fiji to launch Fiji.
  4. To send the image to Fiji, select Image in Image Type and press Export.
  5. Name the dataset in the dialog that appears.
  6. In Fiji, find edges: Menu -> Process -> Find Edges.
  7. Generate a binary image: Menu -> Image -> Adjust -> Auto Threshold, set Method to Mean, check Stack, and press OK.
  8. In MIB, select Mask in Image Type and press Import.
  9. MIB now has a new Mask layer from Fiji.

Back to MIB | User Guide | Panels