Thu, 04 Feb 2021 13:58:31 -0500
Add ColourTools for colourmapped images
README.md | file | annotate | diff | comparison | revisions | |
src/ImageTools.jl | file | annotate | diff | comparison | revisions | |
src/Visualise.jl | file | annotate | diff | comparison | revisions |
--- a/README.md Thu Feb 04 13:58:19 2021 -0500 +++ b/README.md Thu Feb 04 13:58:31 2021 -0500 @@ -11,6 +11,7 @@ * Calculation of discrete image gradients (2D, 3D 3D vector fields) * A very simple image filtering code that seems more efficient than the `ImageFiltering` package. + * Tools to _apply_ colour maps to raw image data, that surprisingly seem to be missing from the standard libraries. The code is used, for example, by <http://dx.doi.org/10.5281/zenodo.3659180>.
--- a/src/ImageTools.jl Thu Feb 04 13:58:19 2021 -0500 +++ b/src/ImageTools.jl Thu Feb 04 13:58:31 2021 -0500 @@ -7,6 +7,7 @@ include("Gradient.jl") include("Translate.jl") include("Denoise.jl") +include("ColourTools.jl") include("Visualise.jl") include("ImFilter.jl") include("TVRecon.jl")
--- a/src/Visualise.jl Thu Feb 04 13:58:19 2021 -0500 +++ b/src/Visualise.jl Thu Feb 04 13:58:31 2021 -0500 @@ -7,7 +7,6 @@ using Printf using FileIO using Setfield -using ColorTypes: Gray #using Plots #using Measures import GR @@ -16,6 +15,7 @@ using AlgTools.StructTools using AlgTools.LinkedLists using AlgTools.Comms +using ..ColourTools ############## # Our exports @@ -24,8 +24,6 @@ export LogEntry, bg_visualise, visualise, - clip, - grayimg, secs_ns, iterate_visualise, initialise_visualisation, @@ -57,9 +55,6 @@ return convert(Float64, time_ns())*1e-9 end -clip = x -> min(max(x, 0.0), 1.0) -grayimg = im -> Gray.(clip.(im)) - ################ # Visualisation ################