Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slim dependencies, bump [compat] #12

Merged
merged 1 commit into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 42 additions & 37 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,37 +1,42 @@
name = "RegisterFit"
uuid = "36121b08-3789-5198-aff2-59a3443d9b59"
authors = ["Tim Holy <[email protected]>"]
version = "0.2.0"

[deps]
CenterIndexedArrays = "46a7138f-0d70-54e1-8ada-fb8296f91f24"
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
Images = "916415d5-f1e6-5110-898d-aaa5f9f070e0"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
RegisterCore = "67712758-55e7-5c3c-8e85-dda1d7758434"
RegisterPenalty = "464fa2a9-b19c-5c59-8698-f58c971f971e"
RegisterUtilities = "d4862ba2-f42c-5aeb-af4f-96a8884a16c4"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
CenterIndexedArrays = "0.0, 0.1, 0.2"
CoordinateTransformations = "0.5, 0.6"
Images = "0.24, 0.25"
Interpolations = "0.12, 0.13"
NLsolve = "4"
Optim = "0.22, 1"
RegisterCore = "0.0, 0.1, 0.2"
RegisterPenalty = "0.1, 0.2, 0.3"
RegisterUtilities = "0.0, 0.1"
StaticArrays = "0.10, 0.11, 0.12, 1"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
name = "RegisterFit"
uuid = "36121b08-3789-5198-aff2-59a3443d9b59"
authors = ["Tim Holy <[email protected]>"]
version = "0.2.0"

[deps]
CenterIndexedArrays = "46a7138f-0d70-54e1-8ada-fb8296f91f24"
CoordinateTransformations = "150eb455-5306-5404-9cee-2592286d6298"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NLsolve = "2774e3e8-f4cf-5e23-947b-6d7e65073b56"
Optim = "429524aa-4258-5aef-a3af-852621145aeb"
RegisterCore = "67712758-55e7-5c3c-8e85-dda1d7758434"
RegisterPenalty = "464fa2a9-b19c-5c59-8698-f58c971f971e"
RegisterUtilities = "d4862ba2-f42c-5aeb-af4f-96a8884a16c4"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[compat]
CenterIndexedArrays = "0.0, 0.1, 0.2"
CoordinateTransformations = "0.5, 0.6"
ImageBase = "0.1"
ImageTransformations = "0.10"
Interpolations = "0.12, 0.13, 0.14, 0.15"
LinearAlgebra = "1"
NLsolve = "4"
Optim = "0.22, 1"
RegisterCore = "0.0, 0.1, 0.2"
RegisterPenalty = "0.1, 0.2, 0.3"
RegisterUtilities = "0.0, 0.1"
StaticArrays = "0.10, 0.11, 0.12, 1"
Statistics = "1"
Test = "1"
julia = "1.6"

[extras]
ImageBase = "c817782e-172a-44cc-b673-b171935fbb9e"
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["ImageBase", "ImageTransformations", "Test"]
15 changes: 3 additions & 12 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import RegisterFit
using Test, CoordinateTransformations, Interpolations, Images, LinearAlgebra
using Test, CoordinateTransformations, Interpolations, ImageBase, ImageTransformations, LinearAlgebra
using RegisterCore

using RegisterUtilities
Expand Down Expand Up @@ -81,26 +81,17 @@ end
@test abs(S[2,2]) < 1e-8
end

if Base.VERSION >= v"1.6"
F = Images.meanfinite(abs.(fixed); dims = (1,2))[1]
else
F = Images.meanfinite(abs.(fixed), (1,2))[1]
end
F = meanfinite(abs.(fixed); dims = (1,2))[1]

df = zeros(2)
movinge = extrapolate(interpolate(moving, BSpline(Linear())), NaN)
origin_dest = center(movinge)
origin_src = center(fixed)
for i = 1:2
# mov = TransformedArray(movinge, tfm[i])
# df[i] = Images.meanfinite(abs.(fixed-AffineTransforms.transform(mov)), (1,2))[1]
translation = tfm[i].translation - tfm[i].linear*origin_dest + origin_src
tform = AffineMap(tfm[i].linear,translation)
if Base.VERSION >= v"1.6"
df[i] = Images.meanfinite(abs.(fixed-[movinge(tform([idx[1], idx[2]])...) for idx in CartesianIndices(fixed)]); dims = (1,2))[1]
else
df[i] = Images.meanfinite(abs.(fixed-[movinge(tform([idx[1], idx[2]])...) for idx in CartesianIndices(fixed)]), (1,2))[1]
end
df[i] = meanfinite(abs.(fixed-[movinge(tform([idx[1], idx[2]])...) for idx in CartesianIndices(fixed)]); dims = (1,2))[1]
end
@test minimum(df) < 1e-4*F
end
Loading