Jiffy image display for image reconstruction
Author JeffFessler
7 Stars
Updated Last
7 Months Ago
Started In
March 2021



action status codecov license docs-stable docs-dev code-style

This Julia language repo exports the jim method that provides a "jiffy image display" for showing 2D grayscale images (and 3D grayscale images as a mosaic). It is basically a wrapper around Plots.heatmap with natural defaults. As of v0.9 it supports axes, colorbar limit (clim) and images with physical units.

Getting started

using Pkg


using MIRTjim: jim
z = (1:7) .+ (1:4)' # 7 × 4 matrix
jim(z ; title="example") # figure

For more examples, see the documentation.

Helper functions

This repo also exports some small helper functions.

  • prompt() first calls Plots.gui() to display the current plot, then waits for a user key press.

    Some keys have special effects:

    • [q]uit throws an error
    • [d]raw disables further prompting and the plots are just drawn
    • [n]odraw avoids the gui() call (useful for non-interactive testing)

    Calling prompt(:prompt) reverts the default key-press behavior.

  • caller_name() uses stacktrace (in Base) to return the file name and line number that called the current function. It can be helpful for debugging and for giving warnings some context.

  • mid3() extracts the middle three slices (transaxial, coronal, sagittal) of a 3D array and arranges them in a 2D mosaic for quick display.


This method is used in many of the image reconstruction examples in https://github.com/JuliaImageRecon.

Isolating these functions in this repo, separate from other repos like the Michigan Image Reconstruction Toolbox (MIRT) keeps those repos lighter by avoiding a dependence on Plots.jl there.


Tested with Julia ≥ 1.8.

Related packages

Used By Packages

No packages found.