JuliaImages / ImageShow.jl

Inline graphical display of images in Julia graphical environments
MIT License
25 stars 9 forks source link

ImageShow

This small package implements image show methods suitable for graphical platforms such as IJulia, VS Code and Juno. It is intended to provide convenient inline presentation of greyscale or color images.

Things that users of ImageShow need to know:

Functions

This package provides three non-exported functions play/explore and gif to interpret your 3D image or 2d images as either a video sequence or a gif.

Feel free to replace gif with play/explore and see how it works:

using ImageShow, TestImages, ImageTransformations

# 3d image
img3d = testimage("mri-stack") |> collect
ImageShow.gif(img3d)

# 2d images
toucan = testimage("toucan") # 150×162 RGBA image
moon = testimage("moon") # 256×256 Gray image
framestack = [toucan, moon];
ImageShow.gif(framestack)

# a do-function version
img = testimage("cameraman")
ImageShow.gif(-π/4:π/64:π/4; fps=10) do θ
    imrotate(img, θ, axes(img))
end

See also mosaic, provided by MosaicViews/ImageCore, for a 2d alternative of gif.

Acknowledgement

The functionality of ImageShow has historically been included in the Images umbrella package.