Repository navigation
SmartSPIM All_Channels: read <z>_ch<k>.tiff slice names; refuse a listing that repeats files - #149
Merged
Merged
Conversation
… origins) Some versions of the SmartSPIM stitching/Imaris pipeline name the All_Channels slices 000000_ch0.tiff rather than 675050_455000_000000_ch0.tiff, and such acquisitions were rejected as having no slices. The slice pattern now takes the origins as optional; z is the number just before _ch<k>. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E59gJ2kMfx16TfRmzo2SnL
…iles for one slice A folder cannot hold one name twice, but a macOS SMB share's listing of a large folder can return the same name several times (and leave others out); a volume built from it would repeat some planes and lack others. readAllChannelsInfo now refuses such a listing, saying how to turn off SMB directory caching, and refuses two files for the same channel and z (tiles rather than stitched slices). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E59gJ2kMfx16TfRmzo2SnL
Contributor
readAllChannelsVolume returns (z, y, x); testSlicesNamedWithoutOrigins indexed it as if z were last. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E59gJ2kMfx16TfRmzo2SnL
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #149 +/- ##
=======================================
Coverage 54.95% 54.96%
=======================================
Files 164 164
Lines 9606 9617 +11
=======================================
+ Hits 5279 5286 +7
- Misses 4327 4331 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two changes to
ndr.format.smartspim.readAllChannelsInfo. They are found byhasAllChannels, and through it by NDI's Lightsheet Manager.Slices named without the Y/X origins
Some versions of the SmartSPIM stitching pipeline name the All_Channels slices
000000_ch0.tiffinstead of675050_455000_000000_ch0.tiff. Acquisitions like that were rejected with No "*_ch.tif(f)" slices found.<Y>_<X>_origins as optional:^(?:\d+_\d+_)?(\d+)_ch(\d+)\.tiff?$._ch<k>. It is used only to order the slices; nothing read the origins.<channel>_MIP_stitchedfiles carry no_ch<k>suffix either (000000.tiff). Channels therefore map by filter-channel rank, as before (Ch2 → ch0, Ch3 → ch1). This was checked on a real acquisition: All_Channelsch0correlates 0.48 with the 561 MIP and 0.03 with the 640 MIP.Refusing an untrustworthy listing
On a macOS SMB share with directory caching on, the listing of a large All_Channels folder returned each name ten times (same size and date) and left other files out. The total came to exactly 10000. A volume built from that listing would repeat some planes and lack others, with no error.
readAllChannelsInfonow raises:…:DuplicateListingwhen the listing names a file more than once. The message says how to turn caching off:dir_cache_off=yesin/etc/nsmb.conf, then remount.…:DuplicateSlicewhen two different files have the same channel and z (tiles rather than stitched slices).hasAllChannelsreturns false in both cases.Tests
TestSmartSPIMAllChannelsgains:testSlicesNamedWithoutOrigins: renames the fixture's slices and checks the channels, slice counts, order and pixel values.testTwoFilesForOneSliceAreRefused.Authored without a MATLAB runtime, so CI is these tests' first run. The same change is in VH-Lab/NDR-python on the branch of the same name.
Generated by Claude Code