<font><font face="verdana,sans-serif">I have also read that documentation, and looked at the methods of the class in docs. However, I could not find anything which deals with sorting.<br></font></font><br><div class="gmail_quote">
On Tue, Jun 12, 2012 at 6:14 PM, Bill Lorensen <span dir="ltr"><<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
/**<br>
* \class RelabelComponentImageFilter<br>
* \brief Relabel the components in an image such that consecutive<br>
labels are used.<br>
*<br>
* RelabelComponentImageFilter remaps the labels associated with the<br>
* objects in an image (as from the output of<br>
* ConnectedComponentImageFilter) such that the label numbers are<br>
* consecutive with no gaps between the label numbers used. By<br>
* default, the relabeling will also sort the labels based on the size<br>
* of the object: the largest object will have label #1, the second<br>
* largest will have label #2, etc.<br>
*<br>
* Label #0 is assumed to be background is left unaltered by the<br>
* relabeling.<br>
*/<br>
<div><div class="h5"><br>
On Tue, Jun 12, 2012 at 11:43 AM, Dženan Zukić <<a href="mailto:dzenanz@gmail.com">dzenanz@gmail.com</a>> wrote:<br>
> I have an image containing labeled objects. The number of objects is about<br>
> 10. However object labels are not consecutive (1,2,3...) as I would like<br>
> them to be, but are scaled to 255.<br>
><br>
> In case of 2 objects, labels would be 0(background), 127, 255.<br>
><br>
> However ShiftScaleImageFilter does not seem a safe way to switch back. There<br>
> is ChangeLabelImageFilter, but it sorts the labels by object size. Is there<br>
> a parameter to make this filter not sort labels? If not, what is the easiest<br>
> way to accomplish this?<br>
><br>
><br>
</div></div>> _____________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Kitware offers ITK Training Courses, for more information visit:<br>
> <a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
><br>
> Please keep messages on-topic and check the ITK FAQ at:<br>
> <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
Unpaid intern in BillsBasement at noware dot com<br>
</font></span></blockquote></div><br>