[Insight-users] segmented region size..
Miller, James V (Research)
millerjv at crd.ge.com
Mon, 12 Apr 2004 15:31:56 -0400
You could use the RelabelComponentImageFilter. Given a segmented image,
it relabels it such that label 1 is the largest object, label 2 is the next
largest object, etc. Once the relabeling has been performed, you can query
the size of a labelled object in terms of number of pixels or volume.
It is a bit of an overkill for the output of the ConnectedThreshold. We
could add a similar API to the segmentation algorithms. By having the
capability in another filter, we have factored out the capability so it can
used on the output
of any of the segmentation algorithms.
Jim
-----Original Message-----
From: yasser salman [mailto:yass71 at yahoo.com]
Sent: Monday, April 12, 2004 1:53 PM
To: insight-users at itk.org
Cc: Luis Ibanez
Subject: [Insight-users] segmented region size..
hi all ..,
how can i get the region size (or No. of pixels)
after segmentation ,
the code below give me the whole voulme size 256 x 256
x19 i need only the segmented region ..,
connectedThreshold->Update();
ImageType::ConstPointer image =
connectedThreshold->GetOutput();
ImageType::RegionType region =
image->GetBufferedRegion();
ImageType::SizeType size = region.GetSize();
thanx ,,
yasser
__________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online by April 15th
http://taxes.yahoo.com/filing.html
_______________________________________________
Insight-users mailing list
Insight-users at itk.org
http://www.itk.org/mailman/listinfo/insight-users