Skip to content

Conversation

@Aditya-Sinha1
Copy link

Before submitting a pull request (PR), please read the contributing guide.

Please fill out as much of this template as you can, but if you have any problems or questions, just leave a comment and we will help out :)

Description

What is this PR

  • [✔ ] Bug fix
  • Addition of a new feature
  • Other

Why is this PR needed?
single 2d tiff file value error was being raised for unsupported multi-channel 3d tiff files
What does this PR do?
Creates a new error type in ImageIOLoadException and add checks for unsupported multi-channel 3d tiff files

References

Please reference any existing issues/PRs that relate to this PR.
brainglobe/brainreg#128

How has this PR been tested?

Locally by running pytest

Please explain how any new code has been tested, and how you have ensured that no existing functionality has changed.

Is this a breaking change?

No
If this PR breaks any existing functionality, please explain how and why.

Does this PR require an update to the documentation?

If any features have changed, or have been added. Please explain how the documentation has been updated (and link to the associated PR). See here for details.

Checklist:

  • [ ✓] The code has been tested locally
  • [ ✓] Tests have been added to cover all new functionality (unit & integration)
  • The documentation has been updated to reflect any changes
  • [ ✓] The code has been formatted with pre-commit

@adamltyson
Copy link
Member

Hi @Aditya-Sinha1, thanks for this. There's just one more case missing of 2D multichannel data (see the original issue). We should check for data that's 3D, but one dimension is very small, indicating it's 2D data with multiple channels, not true 3D data.

@codecov
Copy link

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.93%. Comparing base (6dee6ef) to head (82ad58f).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #147      +/-   ##
==========================================
+ Coverage   93.92%   93.93%   +0.01%     
==========================================
  Files          33       33              
  Lines        1827     1831       +4     
==========================================
+ Hits         1716     1720       +4     
  Misses        111      111              
Flag Coverage Δ
numba 93.88% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Aditya-Sinha1
Copy link
Author

Hi @adamltyson, what should the cutoff for the dimension be , is 3 enough ? thanks

@adamltyson
Copy link
Member

I think maybe 6? It's very rare to get more channels than that, but unlikely that you would an image with only 7 planes in one axis.

@Aditya-Sinha1
Copy link
Author

Thanks I will implement it as soon as possible.

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.

2 participants