Skip to content
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
11 changes: 11 additions & 0 deletions .claude/freshen-package-status
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
DONE: design review
DONE: API review
DONE: update .gitignore
DONE: format with runic
DONE: add Aqua.jl
DONE: remove deprecations
DONE: add ExplicitImports.jl
DONE: limit struct mutability
DONE: improve test coverage
DONE: add and improve docstrings
TODO: add or improve documentation
10 changes: 4 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,15 @@ jobs:
fail-fast: false
matrix:
version:
- '1.6'
- '1.1'
- '1.10'
- '1'
# - 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
Expand All @@ -42,6 +40,6 @@ jobs:
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v1
- uses: codecov/codecov-action@v4
with:
file: lcov.info
9 changes: 6 additions & 3 deletions .github/workflows/Documenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ jobs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install HolyLab Registry
run: julia -e 'using Pkg; Pkg.Registry.add([RegistrySpec(name="General"),RegistrySpec(url="https://github.com/HolyLab/HolyLabRegistry")]);'
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-docdeploy@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
*.jl.mem
deps/deps.jl
Manifest.toml
Manifest-v*.toml
docs/Manifest.toml
docs/Manifest-v*.toml
docs/build/
11 changes: 9 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "RegisterCore"
uuid = "67712758-55e7-5c3c-8e85-dda1d7758434"
version = "1.0.0"
authors = ["Tim Holy <tim.holy@gmail.com>"]
version = "0.2.5"

[deps]
CenterIndexedArrays = "46a7138f-0d70-54e1-8ada-fb8296f91f24"
Expand All @@ -10,16 +10,23 @@ ImageFiltering = "6a3955dd-da59-5b1f-98d4-e7296123deb5"
Requires = "ae029012-a4dd-5104-9daa-d747884805df"

[compat]
Aqua = "0.8"
CenterIndexedArrays = "0.2"
ExplicitImports = "1"
ImageCore = "0.8.1, 0.9, 0.10"
ImageFiltering = "0.5, 0.6, 0.7"
ImageMetadata = "0.9"
Interpolations = "0.13, 0.14, 0.15, 0.16"
Requires = "1"
Test = "1"
julia = "^1.1"

[extras]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7"
ImageMetadata = "bc367c6b-8a6b-528e-b4bd-a4b897500b49"
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["ImageMetadata", "Interpolations", "Test"]
test = ["Aqua", "ExplicitImports", "ImageMetadata", "Interpolations", "Test"]
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# RegisterCore

[![CI](https://github.com/HolyLab/RegisterCore.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/HolyLab/RegisterCore.jl/actions/workflows/CI.yml)
[![codecov](https://codecov.io/gh/HolyLab/RegisterCore.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/HolyLab/RegisterCore.jl)
[![Aqua QA](https://juliatesting.github.io/Aqua.jl/dev/assets/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://HolyLab.github.io/RegisterCore.jl/stable)
[![](https://img.shields.io/badge/docs-dev-blue.svg)](https://HolyLab.github.io/RegisterCore.jl/dev)

This package defines low-level types and operations used for a larger image registration infrastructure.
The documentation gives something of a big-picture overview:

[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://HolyLab.github.io/RegisterCore.jl/dev)
The documentation gives a big-picture overview of the key concepts.
2 changes: 1 addition & 1 deletion docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "~0.23"
Documenter = "1"
6 changes: 5 additions & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ makedocs(
prettyurls = get(ENV, "CI", nothing) == "true"
),
modules = [RegisterCore],
pages = ["index.md", "api.md"]
checkdocs = :exports,
pages = [
"Overview" => "index.md",
"API Reference" => "api.md",
]
)

deploydocs(
Expand Down
13 changes: 10 additions & 3 deletions docs/src/api.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
# API

```@docs
RegisterCore
```

## Types

```@docs
NumDenom
MismatchArray
ColonFun
PreprocessSNF
```

## Functions related to NumDenom
## MismatchArray functions

```@docs
indmin_mismatch
argmin_mismatch
maxshift
mismatcharrays
ratio
Expand All @@ -20,7 +27,7 @@ separate

```@docs
highpass
PreprocessSNF
highpass!
paddedview
trimmedview
```
27 changes: 26 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ corresponds to an identical shift in the opposite direction.

## NumDenom

Mismatch computations actually return two numbers, conventionaly
Mismatch computations actually return two numbers, conventionally
called `num` and `denom` packed into a type called `NumDenom`.
`num` represents the "numerator" of the mismatch,
and always holds the sum-of-squared-differences. In our example above,
Expand All @@ -88,6 +88,31 @@ julia> sum((img[1:end-1,:] - img[2:end,:]).^2)
24
```

`NumDenom` supports vector-space arithmetic, which enables interpolation
of mismatch arrays. A brief example without `RegisterMismatch`:

```jldoctest
julia> using RegisterCore

julia> a = NumDenom(3.0, 10.0)
NumDenom(3.0,10.0)

julia> b = NumDenom(1.0, 6.0)
NumDenom(1.0,6.0)

julia> a + b
NumDenom(4.0,16.0)

julia> 0.5 * a
NumDenom(1.5,5.0)

julia> ratio(a, 0.0)
0.3

julia> ratio(NumDenom(0.0, 1e-6), 0.0)
0.0
```

One key thing to note is that this sum-of-squared-differences
includes *only overlapping pixels*.
In the example above, `D[2,0]` is `NumDenom(16, 22)`, and the 16
Expand Down
Loading
Loading