[ITK] [ITK-users] Creating a region to store LabelObjects

Gaetan Lehmann gaetan.lehmann at gmail.com
Wed Apr 22 04:51:39 EDT 2015


2015-04-22 0:22 GMT+02:00 Pol Monsó Purtí <lluna.nova at gmail.com>:

> excellent! thanks.
>
> Which method recomputes them?
>

You can use ShapeLabelMapFilter to recompute the BoundingBox and all the
attributes of ShapeLabelObject.

Gaëtan


>
> 2015-04-21 20:44 GMT+02:00 Gaetan Lehmann <gaetan.lehmann at gmail.com>:
>
>> Hi,
>>
>> The attributes are only updated by the filters, not by the label objects,
>> so you should recompute the attributes after having after moving them.
>>
>> Gaëtan
>> Le 21 avr. 2015 19:05, "Pol Monsó Purtí" <lluna.nova at gmail.com> a écrit :
>>
>>> After tweaking here and there, I believe the problem was mine that I was
>>> shifting the objects twice because it doesn't happen anymore.
>>>
>>> The Shift problem remains, thought. Shifting doesn't update the
>>> labelobject attributes, so, right now, I shift the pixels _and_ then shift
>>> (get,offset,set) the boundingbox, given that those are the attributes that
>>> I need.
>>>
>>> Cheers,
>>>
>>> Pol
>>>
>>> 2015-04-21 12:29 GMT+02:00 Pol Monsó Purtí <lluna.nova at gmail.com>:
>>>
>>>> Hello all,
>>>>
>>>> related to a couple of conversations we've had here I've noticed a
>>>> strange behaviour that is related to the LabelMap representation.
>>>>
>>>> I have two label objects
>>>>
>>>> bounding box1 ImageRegion (0x7fd381317888)
>>>>
>>>> Dimension: 3
>>>>
>>>> Index: [23, 40, 2]
>>>>
>>>> Size: [60, 71, 9]
>>>>
>>>>
>>>> bounding box2 ImageRegion (0x7fd38131a328)
>>>>
>>>> Dimension: 3
>>>>
>>>> Index: [74, 18, 2]
>>>>
>>>> Size: [24, 39, 9]
>>>>
>>>>
>>>> If I create a region of size [100, 120, 11] it should be able to store
>>>> those two objects.
>>>>
>>>> However, (maybe) that is not the case because the objects are not drawn
>>>> at slice 2 but on slice 5 when I write the output of
>>>> LabelMapToLabelImageFilter. There is no exception thrown, thought.
>>>>
>>>> I've also noticed that using the Shift function of the LabelObject
>>>> doesn't change the object's boundingBox, which leds me to think that each
>>>> pixel has a shift somehow not related to the bounding box.
>>>>
>>>> I can provide a Minimum Working Example if needed.
>>>>
>>>> I've read the article journal, but I couldn't see the answer, may be
>>>> related to 'storing the label objects as lines', which I don't completely
>>>> understand what's the graphical representation of those lines.
>>>>
>>>> What is going on?
>>>>
>>>> Cheers,
>>>>
>>>> Pol
>>>>
>>>
>>>
>>> _____________________________________
>>> 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://public.kitware.com/mailman/listinfo/insight-users
>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150422/a7bf4ccb/attachment.html>
-------------- next part --------------
_____________________________________
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://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list