[Insight-users] Rescale label image
Dženan Zukić
dzenanz at gmail.com
Tue Jun 12 15:04:27 EDT 2012
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.
On Tue, Jun 12, 2012 at 6:14 PM, Bill Lorensen <bill.lorensen at gmail.com>wrote:
> /**
> * \class RelabelComponentImageFilter
> * \brief Relabel the components in an image such that consecutive
> labels are used.
> *
> * RelabelComponentImageFilter remaps the labels associated with the
> * objects in an image (as from the output of
> * ConnectedComponentImageFilter) such that the label numbers are
> * consecutive with no gaps between the label numbers used. By
> * default, the relabeling will also sort the labels based on the size
> * of the object: the largest object will have label #1, the second
> * largest will have label #2, etc.
> *
> * Label #0 is assumed to be background is left unaltered by the
> * relabeling.
> */
>
> On Tue, Jun 12, 2012 at 11:43 AM, Dženan Zukić <dzenanz at gmail.com> wrote:
> > 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, 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?
> >
> >
> > _____________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
> > http://www.kitware.com/opensource/opensource.html
> >
> > Kitware offers ITK Training Courses, for more information visit:
> > http://www.kitware.com/products/protraining.php
> >
> > Please keep messages on-topic and check the ITK FAQ at:
> > http://www.itk.org/Wiki/ITK_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.itk.org/mailman/listinfo/insight-users
> >
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120612/c33c892b/attachment.htm>
More information about the Insight-users
mailing list