Skip to content

Refactor: replace imsplit with simplified functions that does not depend on normcorre#96

Merged
ehennestad merged 2 commits into
devfrom
refactor/replace-imsplit
May 14, 2026
Merged

Refactor: replace imsplit with simplified functions that does not depend on normcorre#96
ehennestad merged 2 commits into
devfrom
refactor/replace-imsplit

Conversation

@ehennestad
Copy link
Copy Markdown
Collaborator

@ehennestad ehennestad commented May 14, 2026

Replace imsplit.m (whose inner helpers were copied from NoRMCorre) with two simplified functions in +stack/+reshape:

  • splitImage(IM, numRows, numCols, overlap)
  • mergeImageBlocks(blocks, outputSize, overlap)

Removes the 3-D/z-splitting and configurable-per-dimension overlap that imsplit supported but no caller used. The two call sites (globalCorrelation, localCorrelation) only ever split along H/W and preserve the time dimension intact inside each block.

Also delete the unused duplicate at
code/+nansen/+tools/+image/+resize/imsplit.m.

Replace imsplit.m (whose inner helpers were copied from NoRMCorre,
GPLv2) with two clean-room MIT-compatible functions in
+stack/+reshape:

  - splitImage(IM, numRows, numCols, overlap)
  - mergeImageBlocks(blocks, outputSize, overlap)

Removes the 3-D/z-splitting and configurable-per-dimension overlap
that imsplit supported but no caller used. The two call sites
(globalCorrelation, localCorrelation) only ever split along H/W and
preserve the time dimension intact inside each block.

Also delete the unused duplicate at
code/+nansen/+tools/+image/+resize/imsplit.m.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

Test Results

199 tests  ±0   199 ✅ ±0   22s ⏱️ -2s
 11 suites ±0     0 💤 ±0 
  1 files   ±0     0 ❌ ±0 

Results for commit c1e6c93. ± Comparison against base commit 8802077.

@ehennestad ehennestad merged commit 2c369c8 into dev May 14, 2026
@ehennestad ehennestad deleted the refactor/replace-imsplit branch May 14, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant