[Insight-users] BinaryImageToShapeLabelMapFilter in ITKv4

Cagatay Bilgin bilgincc at gmail.com
Fri Apr 26 12:23:35 EDT 2013


Hi Pietro,
I think what you are looking for is GetBoundingBox()
http://www.itk.org/Wiki/ITK/Examples/ImageProcessing/BinaryImageToShapeLabelMapFilter

Cheers,
Cagatay

-- 
Cemal Cagatay Bilgin, PhD
Life Sciences Division
Lawrence Berkeley National Lab
MS977, One Cyclotron Road
Berkeley, CA 94720, USA
Email: ccbilgin at lbl.gov

On Fri, Apr 26, 2013 at 7:43 AM, Pietro Nardelli <pie.nardelli at gmail.com>wrote:

> Hi community,
>
> I need your help! I developed my module using ITKv3, and I'm using the
> class BinaryImageToShapeLabelMapFilter to get some statistics of a label.
> In particular I was using the following code:
>
> typedef itk::BinaryImageToShapeLabelMapFilter< OutputImageType >
> ImageToShapeLabelType;
> ImageToShapeLabelType::Pointer ImageToShapeFilter =
> ImageToShapeLabelType::New();
> for( unsigned int i = 0; i <
> ImageToShapeFilter->GetOutput()->GetNumberOfLabelObjects(); i++ ){
>        if( ImageToShapeFilter->GetOutput()->GetNthLabelObject( i
> )->GetRegion().GetSize(1) > ySize ) {
>                   ...
> }
>
> Now, translating the code into ITKv4 I've seen that the member GetRegion()
> doesn't exist any more. How can I obtain the same statistic using ITKv4? Is
> there something similar to get sizes of the region?
>
> Any tip will be really appreciated!!
>
> Thanks in advance,
>
> Pietro
>
> _____________________________________
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130426/715f3949/attachment.htm>


More information about the Insight-users mailing list