Repository navigation
SmartSPIM All_Channels: read <z>_ch<k>.tiff slice names; refuse a listing that repeats files - #38
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
Both NDR-matlab commits touching readAllChannelsInfo.m (ffcf678, the <z>_ch<k>.tiff names; 15d82e1, refusing a repeated listing or two files for one slice) are ported in this branch; the decision log says how. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E59gJ2kMfx16TfRmzo2SnL
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.
This mirrors the NDR-matlab change in
ndr.format.smartspim.readAllChannelsInfo(same branch name there).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. Such acquisitions were rejected with No "*_ch.tif(f)" slices found._SLICE_REnow treats the<Y>_<X>_origins as optional:^(?:\d+_\d+_)?(\d+)_ch(\d+)\.tiff?$._ch<k>, and is used only to order the slices._MIP_stitchedfiles carry no_ch<k>suffix, so channels map by filter-channel rank.Refusing an untrustworthy listing
On a macOS SMB share with directory caching on, the listing of a large All_Channels folder repeated names (and left others out).
_index_slicesnow raisesRuntimeErrorin two cases:dir_cache_off=yesfix);hasAllChannelsreturns False in both cases.Tests
tests/test_smartspim_all_channels.py: 29 passed locally, including the two new tests:test_slices_named_without_originstest_two_files_for_one_slice_are_refusedGenerated by Claude Code