cgal icon indicating copy to clipboard operation
cgal copied to clipboard

Mesh 3 - fix construction of weights image for labeled image input

Open janetournois opened this issue 3 years ago • 1 comments

Summary of Changes

Computation of weights for labeled image input was broken. Using itkDiscreteGaussianImageFilter with voxel-number standard deviation (instead of itkRecursiveGaussianImageFilter with absolute standard deviation) fixes it.

Release Management

  • Affected package(s): Mesh_3
  • License and copyright ownership: unchanged

Todo

  • [ ] make screenshots before/after
  • [ ] check that user code has the same improvement

janetournois avatar Sep 20 '22 16:09 janetournois

Let's reintroduce sigma to have this PR as a real bug-fix, and we'll see later if we remove it

janetournois avatar Sep 22 '22 11:09 janetournois

@sloriot This pull-request is ready to be tested, code-wise, even if there are still TODO items about subjects external to Github (communication and checks in an external user-code).

lrineau avatar Sep 23 '22 07:09 lrineau

Making more experiments on some user data, I found out that there is a trade-off in the choice of parameter sigma :

  • if too small we get the "stair-artefact" back
  • if too large the fine volumes (volumes made by 2 close surfaces) are lost and not represented in the output mesh

So let's keep the parameter for now, though it would be easier to use if it were a number of voxels than a real-world distance

janetournois avatar Sep 23 '22 09:09 janetournois

Making more experiments on some user data, I found out that there is a trade-off in the choice of parameter sigma :

* if too small we get the "stair-artefact" back

* if too large the fine volumes (volumes made by 2 close surfaces) are lost and not represented in the output mesh

So let's keep the parameter for now, though it would be easier to use if it were a number of voxels than a real-world distance

What is the right value, according to your experiments? About the width of one voxel?

lrineau avatar Sep 25 '22 14:09 lrineau

About the size of one voxel yes. But experiments did not really bring conclusions on weather we should use the minimal dimension, or maximal dimension, for the default value (?)

janetournois avatar Sep 26 '22 06:09 janetournois

Successfully tested in CGAL-5.6-Ic-88

sloriot avatar Oct 12 '22 17:10 sloriot

@janetournois You said in the TODO list in the first message (https://github.com/CGAL/cgal/pull/6864#issue-1379697365):

make screenshots before/after

lrineau avatar Oct 13 '22 13:10 lrineau