Add methods to add training samples from labeled images in a random and balanced way.

The labels are expected to match the class indexes. Otherwise, they're ignored.
Remove useless commented code.
Make sure result images have the same LUT as the GUI overlay.
Remove conversion of output image to 8-bit when applying classifier.

The conversion will be done afterwards together with the LUT setting.