Closed HedgehogCode closed 6 years ago
You can do it with existing nodes, but it's a bit convoluted: you need to map the actual image min and max to target min and max as follows:
max - lowerPercentile
targetMax <= -------------------------------------
upperPercentile - lowerPercentile
upperPercentile - min
targetMin <= 1 - ( ------------------------------------- )
upperPercentile - lowerPercentile
You can use the metanode in the attached workflow to do this:
If you think there should be a dedicated (native) node for it, I'd suggest to create an Op as generic as possible in imagej-ops
and just provide an appropriate wrapper node (if at all, provided that KNIP2 is supposed to auto-generate nodes for ops at some point, right?)
Nice workaround. I didn't think about using the target min and max to avoid clamping. Your workflow works great! For now, I will do the same. And later I will write an Op and maybe get a nice dedicated node from KNIP2. (The thing was, that I have no time waiting for KNIP2)
I think I can close this issue for now. Thank you @imagejan!
For our project, we need a percentile normalizer. This means:
Should I write a new node and should this node go into knip? Is there a nice solution using existing nodes?