[Insight-users] Rescale label image

Dženan Zukić dzenanz at gmail.com
Tue Jun 12 11:43:09 EDT 2012


I have an image containing labeled objects. The number of objects is about
10. However object labels are not consecutive (1,2,3...) as I would like
them to be, but are scaled to 255.

In case of 2 objects, labels would be 0(background), 127, 255.

However ShiftScaleImageFilter does not seem a safe way to switch back.
There is  ChangeLabelImageFilter<http://www.itk.org/Doxygen/html/classitk_1_1ChangeLabelImageFilter.html>,
but it sorts the labels by object size. Is there a parameter to make this
filter not sort labels? If not, what is the easiest way to accomplish this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120612/096e479d/attachment.htm>


More information about the Insight-users mailing list