You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nuclick transforms: min_area and do_reconstruction are documented but never used #9083
Two documented parameters in monai/apps/nuclick/transforms.py are accepted and stored but never used, so setting them has no effect.
1. SplitLabeld.min_area
Documented as "min_area: The smallest allowable object size.", assigned in __init__, and then never referenced again — __call__ uses mask_value, others_value and to_binary_mask, but nothing filters by area.
That single line is the only occurrence in the package.
2. PostFilterLabeld.do_reconstruction
Documented as "do_reconstruction: Boolean Flag, Perform a morphological reconstruction of an image...", assigned in __init__, never read. __call__ runs
so there is no morphological-reconstruction step anywhere in the class. nuc_points is likewise stored and unused, which is consistent with the reconstruction path (which is what would need the click points) never having been wired up.
To Reproduce
grep -rn "\.min_area\b" monai/ # 1 hit: the assignment
grep -rn "\.do_reconstruction\b" monai/ # 1 hit: the assignment
Expected behavior
Either the parameters take effect, or they are not offered.
Why I am filing this rather than sending a PR
Both plausible fixes involve a judgement call I would rather not make for you:
implement them — filtering by min_area, and adding a reconstruction branch using nuc_points — is writing new behaviour, and I do not know what the NuClick reference implementation expects here;
remove them — accurate, but they are public keyword arguments on two transforms, so it is a breaking change that probably wants a deprecation cycle.
Happy to send a PR for whichever direction you prefer.
Environment
Verified against the current dev branch; the parameters are present and unused there.
I've opened PR #9099 that wires up both parameters, restoring the behaviors from the original NuClick addition (#4266) that were dropped in #5563. Details in the PR description.
Leaving a reference for whoever picks this up: PR #9099 contains a working implementation that wires min_area and do_reconstruction back into PostProcessing (with tests, following the upstream NuClick behavior), built on the same logic the original authors used. It was closed for now due to review bandwidth, but the branch (fix-nuclick-unused-params on my fork) stays available — feel free to reuse any of it.
Activity
qinxwew commentedon Sep 5, 2026
I've opened PR #9099 that wires up both parameters, restoring the behaviors from the original NuClick addition (#4266) that were dropped in #5563. Details in the PR description.
qinxwew commentedon Oct 17, 2026
Leaving a reference for whoever picks this up: PR #9099 contains a working implementation that wires
min_areaanddo_reconstructionback intoPostProcessing(with tests, following the upstream NuClick behavior), built on the same logic the original authors used. It was closed for now due to review bandwidth, but the branch (fix-nuclick-unused-paramson my fork) stays available — feel free to reuse any of it.