Git Product home page Git Product logo

mirtjim.jl's Introduction

MIRTjim

https://github.com/JeffFessler/MIRTjim.jl

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 and color images (and 3D 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
Pkg.add("MIRTjim")

Example

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.

Notes

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.

Compatibility

Tested with Julia ≥ 1.9.

Related packages

mirtjim.jl's People

Contributors

dependabot[bot] avatar jefffessler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mirtjim.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Tuple axes for Vector of arrays

This needs work because these both fail:

using MIRTjim: jim
z = [ones(6,4), rand(6,4), rand(6,4), rand(6,4), rand(6,4)]
jim((1:6,0:3), z)
jim((1:6,0:3,1:5), z)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.