ijpb / MorphoLibJ

Collection of mathematical morphology methods and plugins for ImageJ
http://imagej.net/MorphoLibJ
GNU Lesser General Public License v3.0
101 stars 48 forks source link

Assign measure to label bug #39

Open tischi opened 4 years ago

tischi commented 4 years ago

@dlegland @iarganda

The minimum value is not considered, but replaced by NaN.

For example:

image

Here 496 is the smallest value in the table but it will become NaN.

tischi commented 4 years ago

In addition, I do not understand why the user has to enter some values here at all. The plugin could just replace all the label values of the measurement values. If one wants to hide some values this could be done later using a threshold on the result image.

dlegland commented 4 years ago

Hi @tischi , The aim of this plugin is to replace the label of each region with a value stored in a Table. If you obtain a NaN value, a possible reason is that the label exists in the label image but not in the results table.

From what I remember, the min and max values are used for calibrating display brightness / contrast, but I agree, this could be made outside of the plugin. I found this was easier to setup at this stage, as this can help use the same calibration for different images.

tischi commented 4 years ago

Hi @dlegland ,

It exists in the table. It is label number 8.

image
tischi commented 4 years ago

Maybe some issue with counting from zero instead of one?

dlegland commented 4 years ago

hmm, strange... The value zero is associated to background, and corresponds to a NaN in the result image. Also, you have labels in increasing order, without missing labels, so this should work perferctly...

I will check it...