BiaPyX / BiaPy

Open source Python library for building bioimage analysis pipelines
https://BiaPyX.github.io
MIT License
116 stars 28 forks source link

add median padding option #12

Closed jansanrom closed 3 years ago

jansanrom commented 3 years ago

Hi @danifranco

I added a boolean option for the padding type. Now if median_padding is False (default) the padding will be done using zeroes. If it's true the padding will be done using the median value of the nearest slice.

This morning I experienced an issue when using images with background values around 60 (using 0-255 images). The first slices had no image but the 60 valued background aforementioned. When using padding filled with zeroes, the contrast 0-60 caused a white output of the network. This annoying effect can be solved using median_padding=True.

Best, Jesús