[Insight-users] BinaryImageToShapeLabelMapFilter in ITKv4

Pietro Nardelli pie.nardelli at gmail.com
Fri Apr 26 10:43:51 EDT 2013


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20130426/f27ab310/attachment.htm>


More information about the Insight-users mailing list