clEsperanto / pyclesperanto_prototype

GPU-accelerated bio-image analysis focusing on 3D+t microscopy image data
http://clesperanto.net
BSD 3-Clause "New" or "Revised" License
208 stars 44 forks source link

Custom read zero outside image #301

Open haesleinhuepf opened 1 year ago

haesleinhuepf commented 1 year ago

Hey @grahamross123 ,

I eventually managed to look into #296 . Big thanks for working on this!

In this PR to your branch I add a custom read-function based on the original in the preamble. It returns 0 if the coordinates are outside the image.

I'm also adding some tests demonstrating that it now works like in skimage also on image borders.

I created an issue because the read-zero-outside thingy should be supported by the preamble, but is commented out. See #302

Let me know what you think! And thanks again!

Best, Robert

codecov-commenter commented 1 year ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.02%. Comparing base (e972ab0) to head (8c00111). Report is 5 commits behind head on morph_snake_smoothing.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## morph_snake_smoothing #301 +/- ## ========================================================= + Coverage 92.95% 93.02% +0.07% ========================================================= Files 773 776 +3 Lines 14237 14340 +103 ========================================================= + Hits 13234 13340 +106 + Misses 1003 1000 -3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.