aics-segmentation icon indicating copy to clipboard operation
aics-segmentation copied to clipboard

edge_preserving_smoothing_3d should account for voxel spacing

Open mdylan2 opened this issue 4 years ago • 2 comments

Edge preserving smoothing in 3D depends on voxel spacing. Below is the code you currently have for edge_preserving_smoothing_3d under aicssegmentation/core/pre_processing_utils. image

Rather, this is what I think should be incorporated: image

What are your thoughts?

mdylan2 avatar Mar 06 '20 20:03 mdylan2

First of all, by default, we are using [1.0, 1.0, 1.0] spacing in our segmentation algorithms even though our images are not isotropic. In practice, in our images (ZYX = 0.29 x 0.108 x 0.108 micron), I find that results obtained by isotropic spacing, i.e. [1, 1, 1], are usually more consistent with what I expect intuitively, than using the true image spacing. So, we decide to make the wrapper without requiring users to set the spacing and use [1.0, 1.0, 1.0] by default.

jxchen01 avatar Mar 06 '20 22:03 jxchen01

Technically, the issue you pointed out is true, where users can change the spacing if they need. I will fix it in the next release.

jxchen01 avatar Mar 06 '20 22:03 jxchen01