[Insight-users] Find largest connected object in a Volume

Miller, James V (Research) millerjv at crd . ge . com
Fri, 27 Jun 2003 13:33:38 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C33CD1.AFBCA08D
Content-Type: text/plain;
	charset="iso-8859-1"

In Code/BasicFilters there are two classes ConnectedComponentImageFilter and

HardConnectedComponentImageFilter.  The former is a rewrite of the latter to
use more of the ITK infrastructure. The latter may be removed soon.  
 
The ConnectedComponentImageFilter will use 6-connectivity in a volume to
label the objects in the volume.  Each connected object will have a unique
label.
 
However, this does not extract the largest connected object.  You would need
a separate filter (that does not exist yet) to scan through the label map
and extract the largest object.  As Luis suggested, you could a histogram of
the label map to determine which object is the "largest".
 
 

-----Original Message-----
From: cspl [mailto:affable at hd2 . dot . net . in]
Sent: Friday, June 27, 2003 2:19 AM
To: insight-users at itk . org
Subject: [Insight-users] Find largest connected object in a Volume


Hi Luis and all,
   I am in need of help on connectivity filter. Let me explain my
requirment.
   I have a volume of some slices. I have to find the largest object in the
entire volume. Initiallly i will threshold the image so that it will in
binary format. Then i have to use 6-connectivity of find the largest object
in the volume. The largest object should be labeled 1. Is there any filter
which solves my problem. I should use 6-connectivity. Please do suggest me
if there are other alternatives too.
   
   Please help me in this regard.
 
   Thanks in advance.
 
-Regards,
  Sateesh.


------_=_NextPart_001_01C33CD1.AFBCA08D
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1141" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=538382917-27062003><FONT face=Arial color=#0000ff size=2>In 
Code/BasicFilters there are two classes ConnectedComponentImageFilter and 
</FONT></SPAN></DIV>
<DIV><SPAN class=538382917-27062003><FONT face=Arial color=#0000ff 
size=2>HardConnectedComponentImageFilter.&nbsp; The former is a rewrite of the 
latter to use more of the ITK infrastructure. The latter may be removed 
soon.&nbsp; </FONT></SPAN></DIV>
<DIV><SPAN class=538382917-27062003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=538382917-27062003><FONT face=Arial color=#0000ff size=2>The 
ConnectedComponentImageFilter will use 6-connectivity in a volume to label the 
objects in the volume.&nbsp; Each connected object will have a unique 
label.</FONT></SPAN></DIV>
<DIV><SPAN class=538382917-27062003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=538382917-27062003><FONT face=Arial color=#0000ff 
size=2>However, this does not extract the largest connected object.&nbsp; You 
would need a separate filter (that does not exist yet) to scan through the label 
map and extract the largest object.&nbsp; As Luis suggested, you could a 
histogram of the label map to determine which object is the 
"largest".</FONT></SPAN></DIV>
<DIV><SPAN class=538382917-27062003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=538382917-27062003><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> cspl 
  [mailto:affable at hd2 . dot . net . in]<BR><B>Sent:</B> Friday, June 27, 2003 2:19 
  AM<BR><B>To:</B> insight-users at itk . org<BR><B>Subject:</B> [Insight-users] Find 
  largest connected object in a Volume<BR><BR></FONT></DIV>
  <DIV><FONT face=Arial size=2>Hi Luis and all,<BR>&nbsp;&nbsp; I am&nbsp;in 
  need of help on connectivity filter. Let me explain my 
  requirment.<BR>&nbsp;&nbsp; I have a volume of some slices. I have to find the 
  largest object in the entire volume. Initiallly i will threshold the image so 
  that it will in binary format. Then i have to use 6-connectivity of find the 
  largest object in the volume. The largest object should be labeled 1. Is there 
  any filter which solves my problem. I should use 6-connectivity.&nbsp;Please 
  do suggest me&nbsp;if there are&nbsp;other 
  alternatives&nbsp;too.<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp; Please help me in 
  this regard.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>&nbsp;&nbsp; Thanks in advance.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>-Regards,<BR>&nbsp; 
Sateesh.</FONT></DIV></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C33CD1.AFBCA08D--