<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I would also suggest looking at the ZeroCrossingBasedEdgeDetectionImageFilter. This extracts where the laplacian of the image crosses zero.<div><br></div><div><br><div><div>On Mar 14, 2012, at 4:22 AM, Sergio Vera wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Have you tried CannyEdge Detection Filter? Canny always returns the thinnest edges.<div><br></div><div>Hope to help Regards<br><br><div class="gmail_quote">On Wed, Mar 14, 2012 at 2:59 AM, Emma Ryan <span dir="ltr">&lt;<a href="mailto:eryanvtk@yahoo.com">eryanvtk@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-size:12pt;font-family:times new roman,new york,times,serif"><br> <div style="font-family:times new roman,new york,times,serif;font-size:12pt">
Hi ,<br><br>&nbsp;&nbsp; I am using the sobelOperator provided in itk.&nbsp; The following is my code snippet. I would like to understand<br><br>1.&nbsp; the default setting of the sobel and <br>2. how I can tune it. There dont seem to be too many member functions to manipulate the sobel.<br>
3. If I need to use Erosion filter to thin the edges, how do I design a 'line' structuring element. My code ( also added below) does not seem to allow line (which I am guessing derives from Box, line = 1-D Box)<br>
<br>Any help/suggestions is truly appreciated.<br><br>Thank you,<br>Emma<br><br><br>typedef itk::ConstNeighborhoodIterator&lt;ImageType&gt; NeighborhoodIteratorType;<br>&nbsp;&nbsp;&nbsp; typedef itk::ImageRegionIterator&lt;
 ImageType&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IteratorType;<br><br>&nbsp;&nbsp;&nbsp; itk::SobelOperator&lt;PixelType, 2&gt; sobel;<br>&nbsp;&nbsp;&nbsp; sobel.SetDirection(1);&nbsp; <br>&nbsp;&nbsp;&nbsp; itk::Size&lt;2&gt; radius_s;<br>&nbsp;&nbsp;&nbsp; radius_s.Fill(1);<br>&nbsp;&nbsp;&nbsp; sobel.CreateToRadius(radius_s);<br>
<br>&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; NeighborhoodIteratorType::RadiusType radius = sobel.GetRadius();<br>&nbsp;&nbsp;&nbsp; NeighborhoodIteratorType it( radius, my_image, my_image-&gt;GetRequestedRegion() );<br>&nbsp;&nbsp;&nbsp; itk::NeighborhoodInnerProduct&lt;ImageType&gt; inner_product;<br>
<br>&nbsp;&nbsp;&nbsp; ImageType::Pointer output = ImageType::New();<br>&nbsp;&nbsp;&nbsp; output-&gt;SetRegions(my_image-&gt;GetRequestedRegion());<br>&nbsp;&nbsp;&nbsp; output-&gt;Allocate();<br>&nbsp; <br>&nbsp;&nbsp;&nbsp; IteratorType out(output, my_image-&gt;GetRequestedRegion());<br>
&nbsp;&nbsp;&nbsp;
 <br>&nbsp;&nbsp;&nbsp; for (it.GoToBegin(), out.GoToBegin(); !it.IsAtEnd(); ++it, ++out)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp; &nbsp;out.Set( inner_product( it, sobel ) );<br>&nbsp;&nbsp;&nbsp; }<br><br>&nbsp;&nbsp;&nbsp; output-&gt;Update();<br>&nbsp;&nbsp;&nbsp; <br><br>//Erosion Structuring Element: The following fails to compile if I use '1' instead of '2'<br>
typedef itk::FlatStructuringElement&lt;2&gt; StructuringElementType;<br>&nbsp;&nbsp;&nbsp; StructuringElementType::RadiusType element_radius;<br>&nbsp;&nbsp;&nbsp; element_radius.Fill(5);<br>&nbsp;<br>&nbsp;&nbsp;&nbsp; StructuringElementType strel = StructuringElementType::Box(element_radius);<br>
 </div>  </div></div><br>_____________________________________<br>
Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.php" target="_blank">http://www.kitware.com/products/protraining.php</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Sergio Vera<br><br>&nbsp;Alma IT Systems<br>&nbsp;C/ Vilana, 4B, 4º 1ª<br>&nbsp;08022 Barcelona<br>&nbsp;T. (+34) 932 380 592<br>&nbsp;<a href="http://www.alma3d.com/">www.alma3d.com</a><br>

</div>
_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.itk.org/mailman/listinfo/insight-users<br></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; -webkit-text-decorations-in-effect: none; text-indent: 0px; -webkit-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">========================================================</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Bradley Lowekamp<span class="Apple-converted-space">&nbsp;</span><span class="Apple-converted-space">&nbsp;</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Medical Science and Computing for</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">Office of High Performance Computing and Communications</font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; ">National Library of Medicine<span class="Apple-converted-space">&nbsp;</span></font></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><font face="Helvetica" size="3" style="font: normal normal normal 12px/normal Helvetica; "><a href="mailto:blowekamp@mail.nih.gov">blowekamp@mail.nih.gov</a></font></p><br class="Apple-interchange-newline"></span></div></span></span><br class="Apple-interchange-newline">
</div>
<br></div></body></html>