<font><font face="verdana,sans-serif">Of course, when I get back to University tomorrow. Here, it&#39;s 9pm :D<br></font></font><br><div class="gmail_quote">On Tue, Jun 12, 2012 at 9:05 PM, Bill Lorensen <span dir="ltr">&lt;<a href="mailto:bill.lorensen@gmail.com" target="_blank">bill.lorensen@gmail.com</a>&gt;</span> wrote:<br>

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