How to label image with a color pixel value in ITK?

I can see that I can label image from 0 to 255. But I want to label with different colors like red, green. Is there any way to do that?

Take look at the ITK Label Fusion module. There are a variety of ways for apply color to a labeled image.

The basic one is LabelToRGBImageFilter, which I think you are looking for. The LabelContourImageFiler is another good one to look at.

Enjoy!
Brad

2 Likes

Thank You Brad. I get it.