AllenInstitute / aics-segmentation

AICS Segmentation (One-Way) Mirror
Other
44 stars 7 forks source link

edge_preserving_smoothing_3d should account for voxel spacing #4

Open mdylan2 opened 4 years ago

mdylan2 commented 4 years ago

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?

jxchen01 commented 4 years ago

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 commented 4 years ago

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.