using MIRTjim: jim, prompt # must be first! using ImageGeoms: ImageGeom, MaskCircle, MaskAllButEdge using ImageGeoms: maskit, embed, embed!, getindex!, jim #, size using ImageGeoms: mask_outline using Unitful: mm isinteractive() ? jim(:prompt, true) : prompt(:draw); ig = ImageGeom(MaskCircle() ; dims=(40,32), deltas=(1mm,1mm)) jim(ig) ig = ImageGeom(MaskAllButEdge() ; dims=(32,32,16)) jim(ig) ig = ImageGeom(MaskAllButEdge() ; dims=(6,4)) x = 1:size(ig,1) y = 1:size(ig,2) ramp = x .+ 10*y' ig.mask core = ramp[ig.mask] maskit(ramp, ig.mask) array = embed(core, ig.mask) core = Array{Float32}(undef, sum(ig.mask)) getindex!(core, ramp, ig.mask) array = collect(zeros(Float16, ig)) embed!(array, core, ig.mask) ig = ImageGeom(MaskCircle() ; dims=(40,32)) outline = mask_outline(ig.mask) jim( jim(ig.mask, "Mask"; prompt=false), jim(outline, "Outline"; prompt=false), )