[Insight-users] Connected component clarification
Miller, James V (Research)
millerjv at crd . ge . com
Mon, 15 Dec 2003 16:17:36 -0500
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_01C3C350.DCC8BAE3
Content-Type: text/plain
Radhika,
I guess we simply didn't see the need to ensure the labels were consecutive.
Is this important to your application? Some applications of connected
components do not care whether the labels are consecutive. So the algorithm
was factored into two algorithms ConnectedComponent and RelabelComponent,
where the latter not only makes the labels consecutive but sorts the labels
by the size of the object.
(As the connected component algorithm runs, it creates consecutive labels.
But equivalent labels get combined at the end of the algorithm, so the
output is not necessarily consecutive. I guess when the equivalency table
is flattened, we could reorganized it to get consecutive labels. I'd have to
think about whether we could compress the labels without having to scan the
image an additional time. If it is important to you, we can make a change.)
[Jim Miller]
-----Original Message-----
From: Radhika Sivaramakrishna [mailto:radhika . sivaramakrishna at synarc . com]
Sent: Monday, December 15, 2003 3:01 PM
To: 'insight-users at itk . org'
Subject: [Insight-users] Connected component clarification
Hi Luiz,
Just wanted to add the clarification that when I reset the image type from
unsigned char to int, then I was able to get Relabel to give the correct
results. ie each region which I could distinguish by eye, got a different
label.
However, I still have the doubt of why consecutive labels are not used in
the ConnectedComponent Filter.
Radhika
-----------------------------------------------------
Confidentiality Notice.
This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information. Any unauthorized review,
use, disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by reply email and destroy all copies
of the original message. If you are the intended recipient, please be
advised that the content of this message is subject to access, review and
disclosure by the sender's Email System Administrator.
------_=_NextPart_001_01C3C350.DCC8BAE3
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns=3D"http://www . w3 . org/TR/REC-html40" xmlns:o =3D=20
"urn:schemas-microsoft-com:office:office" xmlns:w =3D=20
"urn:schemas-microsoft-com:office:word"><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META content=3DWord.Document name=3DProgId>
<META content=3D"MSHTML 6.00.2800.1264" name=3DGENERATOR>
<META content=3D"Microsoft Word 10" name=3DOriginator><LINK=20
href=3D"cid:filelist . xml at 01C3C303 . 0EC2EE00" rel=3DFile-List><!--[if gte =
mso 9]><xml>
<o:OfficeDocumentSettings>
<o:DoNotRelyOnCSS/>
</o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:DocumentKind>DocumentEmail</w:DocumentKind>
<w:EnvelopeVis/>
<w:Compatibility>
<w:BreakWrappedTables/>
<w:SnapToGridInCell/>
<w:WrapTextWithPunct/>
<w:UseAsianBreakRules/>
</w:Compatibility>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]-->
<STYLE>@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in =
1.25in; mso-header-margin: .5in; mso-footer-margin: .5in; =
mso-paper-source: 0; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"; =
mso-style-parent: ""; mso-pagination: widow-orphan; =
mso-fareast-font-family: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline; text-underline: single
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline; text-underline: single
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: =
personal-compose; mso-style-noshow: yes; mso-ansi-font-size: 10.0pt; =
mso-bidi-font-size: 10.0pt; mso-ascii-font-family: Arial; =
mso-hansi-font-family: Arial; mso-bidi-font-family: Arial
}
SPAN.SpellE {
mso-style-name: ""; mso-spl-e: yes
}
SPAN.GramE {
mso-style-name: ""; mso-gram-e: yes
}
DIV.Section1 {
page: Section1
}
</STYLE>
<!--[if gte mso 10]>
<style>
/* Style Definitions */=20
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";}
</style>
<![endif]--></HEAD>
<BODY lang=3DEN-US style=3D"tab-interval: .5in" vLink=3Dpurple =
link=3Dblue>
<DIV><SPAN class=3D542300221-15122003><FONT color=3D#0000ff =
size=3D2>Radhika,=20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D542300221-15122003><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D542300221-15122003><FONT color=3D#0000ff size=3D2>I =
guess we simply=20
didn't see the need to ensure the labels were =
consecutive.</FONT></SPAN><SPAN=20
class=3D542300221-15122003><FONT color=3D#0000ff size=3D2> Is this =
important to your=20
application? Some applications of connected components do not care =
whether the=20
labels are consecutive. So the algorithm was factored into two =
algorithms=20
ConnectedComponent and RelabelComponent, where the latter not only =
makes the=20
labels consecutive but sorts the labels by the size of the =
object. =20
</FONT></SPAN></DIV>
<DIV><SPAN class=3D542300221-15122003><FONT color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D542300221-15122003><FONT color=3D#0000ff =
size=3D2>(As the connected=20
component algorithm runs, it creates consecutive labels. But =
equivalent=20
labels get combined at the end of the algorithm, so the output is not=20
necessarily consecutive. I guess when the equivalency table is =
flattened,=20
we could reorganized it to get consecutive labels. I'd have to =
think about=20
whether we could compress the labels without having to scan the image =
an=20
additional time. If it is important to you, we can make a=20
change.)</FONT></SPAN></DIV><SPAN =
class=3D542300221-15122003></SPAN><FONT=20
face=3DTahoma>
<DIV><BR><FONT size=3D2><SPAN class=3D542300221-15122003><FONT =
face=3DArial=20
color=3D#0000ff>[Jim Miller] </FONT></SPAN></FONT></DIV>
<DIV><FONT size=3D2><SPAN =
class=3D542300221-15122003></SPAN></FONT> </DIV>
<DIV><FONT size=3D2><SPAN =
class=3D542300221-15122003> </SPAN>-----Original=20
Message-----<BR><B>From:</B> Radhika Sivaramakrishna=20
[mailto:radhika . sivaramakrishna at synarc . com]<BR><B>Sent:</B> Monday, =
December 15,=20
2003 3:01 PM<BR><B>To:</B> 'insight-users at itk . org'<BR><B>Subject:</B>=20
[Insight-users] Connected component =
clarification<BR><BR></DIV></FONT></FONT>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
<DIV class=3DSection1>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Hi <SPAN=20
class=3DSpellE>Luiz</SPAN>,<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">Just wanted to add the=20
clarification that when I reset the image type from unsigned char to =
<SPAN=20
class=3DSpellE>int</SPAN>, then I was able to get <SPAN=20
class=3DSpellE>Relabel</SPAN> to give the =
correct<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><SPAN class=3DGramE><FONT face=3DArial =
size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">results</SPAN></FONT></SPAN><FONT=20
face=3DArial size=3D2><SPAN style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">. <SPAN=20
class=3DSpellE><SPAN class=3DGramE>ie</SPAN></SPAN> each region which =
I could=20
distinguish by eye, got a different =
label.<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: Arial">However, I still have =
the doubt of=20
why consecutive labels are not used in the <SPAN=20
class=3DSpellE>ConnectedComponent</SPAN> =
Filter.<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial">Radhika<o:p></o:p></SPAN></FONT></P>
<P class=3DMsoNormal><FONT face=3DArial size=3D2><SPAN=20
style=3D"FONT-SIZE: 10pt; FONT-FAMILY: =
Arial"><o:p> </o:p></SPAN></FONT></P></DIV>
<P><FONT face=3DArial size=3D2></FONT></P>
<P><FONT face=3DArial=20
size=3D2>----------------------------------------------------- =
</FONT></P>
<P><FONT face=3DArial size=3D2>Confidentiality Notice. </FONT></P>
<P><FONT face=3DArial size=3D2>This email message is for the sole use =
of the=20
intended recipient(s) and may contain confidential and privileged =
information.=20
Any unauthorized review, use, disclosure or distribution is =
prohibited. If you=20
are not the intended recipient, please contact the sender by reply =
email and=20
destroy all copies of the original message. If you are the intended =
recipient,=20
please be advised that the content of this message is subject to =
access,=20
review and disclosure by the sender's Email System=20
Administrator.</FONT></P></BLOCKQUOTE></BODY></HTML>
------_=_NextPart_001_01C3C350.DCC8BAE3--