imagej / imagej-legacy

ImageJ+ImageJ2 compatibility layer
https://imagej.net/libs/imagej-legacy
BSD 2-Clause "Simplified" License
16 stars 25 forks source link

Fix ColorTableHarmonizer #259

Open imagejan opened 3 years ago

imagejan commented 3 years ago

The logic here is inappropriate:

https://github.com/imagej/imagej-legacy/blob/5d66b5314f75810fe1f8ff8db1323b9941c3d2ee/src/main/java/net/imagej/legacy/translate/ColorTableHarmonizer.java#L430-L447

because since https://github.com/imagej/imagej1/commit/6c3e9cd223e1b6fecac55d7a09d442cd0053a7f3, luts will never be null here.

The logic needs to be adapted to the current behavior of ImagePlus that returns an empty list e.g. for RGB images.