Skip to content

Commit 79e1c17

Browse files
authored
Replace Requires with package extension, update compat (#37)
* Replace Requires with ext/ * Fix doc
1 parent 9d01fed commit 79e1c17

File tree

6 files changed

+22
-23
lines changed

6 files changed

+22
-23
lines changed

Project.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,20 @@
11
name = "ImageGeoms"
22
uuid = "9ee76f2b-840d-4475-b6d6-e485c9297852"
33
authors = ["Jeff Fessler <[email protected]> and contributors"]
4-
version = "0.10"
4+
version = "0.10.1"
55

66
[deps]
77
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
88
LazyGrids = "7031d0ef-c40d-4431-b2f8-61a8d2f650db"
9-
Requires = "ae029012-a4dd-5104-9daa-d747884805df"
109

1110
[compat]
12-
FillArrays = "0.13, 1"
11+
FillArrays = "1"
1312
LazyGrids = "0.4, 0.5"
14-
Requires = "1.3"
15-
julia = "1.8"
13+
MIRTjim = "0.23"
14+
julia = "1.10"
15+
16+
[weakdeps]
17+
MIRTjim = "170b2178-6dee-4cb0-8729-b3e8b57834cc"
18+
19+
[extensions]
20+
ImageGeoms_MIRTjim = "MIRTjim"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ see the
6161

6262
### Compatibility
6363

64-
Tested with Julia ≥ 1.8.
64+
Tested with Julia ≥ 1.10.
6565

6666
<!-- URLs -->
6767
[action-img]: https://github.com/JuliaImageRecon/ImageGeoms.jl/workflows/CI/badge.svg

docs/lit/examples/2-mask.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ This page explains the `mask` aspects of the Julia package
1212

1313
# Packages needed here.
1414

15-
using MIRTjim: jim, prompt # must be first!
1615
using ImageGeoms: ImageGeom, MaskCircle, MaskAllButEdge
17-
using ImageGeoms: maskit, embed, embed!, getindex!, jim #, size
16+
using ImageGeoms: maskit, embed, embed!, getindex! # +jim +size
1817
using ImageGeoms: mask_outline
18+
using MIRTjim: jim, prompt
1919
using Unitful: mm
2020

2121

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# jim.jl
1+
# ImageGeoms_MIRTjim.jl
22

3-
import .MIRTjim: jim
3+
module ImageGeoms_MIRTjim
44

5-
#using ImageGeoms: ImageGeom
6-
7-
export jim
5+
using ImageGeoms: ImageGeom, axis, mask_or
6+
import MIRTjim: jim
87

98

109
"""
1110
jim(ig ; kwargs...)
12-
Display the support mask.
11+
Display the support mask (2D) or `mask_or` (3D).
1312
Requires package `MIRTjim` to be loaded first.
1413
"""
1514
jim(ig::ImageGeom{2} ; kwargs...) =
@@ -18,3 +17,5 @@ jim(ig::ImageGeom{3} ; kwargs...) =
1817
jim(axis(ig,1), axis(ig,2), mask_or(ig.mask) ;
1918
title = "(dx,dy,dz)=$(ig.deltas)", kwargs...)
2019
jim(ig::ImageGeom ; kwargs...) = throw("unsupported $(typeof(ig))")
20+
21+
end # module

src/ImageGeoms.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ Module for describing image geometries.
44
"""
55
module ImageGeoms
66

7-
using Requires: @require
8-
97
const RealU = Number # Union{Real, Unitful.Length}
108

119
"""
@@ -26,9 +24,4 @@ include("imresize.jl")
2624
include("makemask.jl")
2725
include("mask.jl")
2826

29-
function __init__()
30-
# support MIRTjim iff user has loaded it
31-
@require MIRTjim = "170b2178-6dee-4cb0-8729-b3e8b57834cc" include("jim.jl")
32-
end
33-
3427
end # module

src/mask.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ embed(v::AbstractVector{T}, mask::AbstractArray{Bool} ;
8989
array = embed(matrix::AbstractMatrix{<:Number}, mask::AbstractArray{Bool})
9090
9191
Embed each column of `matrix` into `mask` then `cat` along next dimension
92-
In:
92+
# In:
9393
* `matrix [count(mask) L]`
9494
* `mask [(N)]`
9595
96-
Out:
96+
# Out:
9797
* `array [(N) L]`
9898
"""
9999
function embed(x::AbstractMatrix{<:Number}, mask::AbstractArray{Bool})

0 commit comments

Comments
 (0)