<!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 5.50.4207.2601" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Oops, I'm sorry.</FONT></DIV>
<DIV><FONT size=2>The web-site is:</FONT></DIV>
<DIV><FONT size=2><A 
href="http://asad.dnsq.org/Downloads/">http://asad.dnsq.org/Downloads/</A></FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>The file names are as mentioned in the email.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>Asad</FONT></DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=jonesde@rainbow.es.dupont.com 
  href="mailto:jonesde@rainbow.es.dupont.com">David E. Jones</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=tarifa@rpi.edu 
  href="mailto:tarifa@rpi.edu">Asad A. Abu-Tarif</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, March 01, 2001 6:49 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [vtkusers] 2D/3D Threshold 
  and link filters</DIV>
  <DIV><FONT size=2></FONT><FONT size=2></FONT><FONT 
  size=2></FONT><BR></DIV>Asad A. Abu-Tarif wrote: 
  <BLOCKQUOTE TYPE="CITE">Hello, <BR>I sent the appended message to the list 
    about a week ago but got rejected <BR>because I attached <BR>the source code 
    with the message and the email got big. <BR>Anyways, I put the classes in 
    the following web-site for download. If anyone <BR>is interested, you can 
    <BR>download them from the web. 
    <P>Asad 
    <P>Hi vtkers, <BR>I developed two classes that threshold a gradient image 
    and link it using <BR>two thresholds, strong and weak thresholds. They are 
    attached to this email. <BR>Now, I'll start by describing the intuition 
    behind those two classes and the <BR>basic idea. Then, I'll show the old 
    pipeline (the one that's usually used) <BR>and the new one (using one of the 
    two classes attached). 
    <P>I hope that those clases will be helpful to someone. I'll be happy to 
    answer <BR>any questions!! 
    <P>Regards, <BR>Asad 
    <P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    ___________________________________________________ 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp; 
    /&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    Asad A. Abu-Tarif <BR>\ <BR>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; Computer 
    Engineering. <BR>| <BR>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; PhD Candidate, 
    Rensselaer Polytechnic Institute (RPI). <BR>| <BR>&nbsp;&nbsp;&nbsp;&nbsp; 
    |&nbsp;&nbsp; Research Assistant, NYS Center for Automated 
    Technologies&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; tarifa@rpi.edu <BR>| 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; Tel (O): 518-276-2991 <BR>| 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp; Fax:&nbsp; 313-557-6100 
    <BR>| <BR>&nbsp;&nbsp;&nbsp;&nbsp; 
    \____________________________________________________/ 
    <P>================================================================ <BR>* 
    Intuition and Basic Idea: <BR>After finding the gradient of an image, 
    thresholding is usually the next <BR>step. However, in a lot of practical 
    applications you can't find a single <BR>threshold that can give 
    satisfactory results. On the other hand, it is <BR>usually easier to find a 
    threshold value at which the resulting thresholded <BR>image will have all 
    correct edgels and no false ones but it won't find all <BR>of the correct 
    edgels (false negative, if you well). It is also possible to <BR>find 
    another smaller threshold value where all the good edgels are included 
    <BR>but you've added few false edgels in the mix (false positive). 
    <BR>Having said that, a more clever thresholding approach would be to 
    threshold <BR>using the strong threshold (that results in the false negative 
    case). Then, <BR>try to extend (link) the edgels using the weak threshold. 
    Finally, for each <BR>set of connected edgels, if the total number of edgels 
    in that link <BR>(connected set of edgels) is less than a certain length 
    value, then discard <BR>that link and all of its edgels. 
    <P>The two attached classes perform exactly this operation. The difference 
    <BR>between the two is that vtkLinkIn2DandThreshold tries to extend (link) 
    <BR>edgels in the same slice. In other words, it links edgels in 2D. On the 
    <BR>other hand, vtkLinkIn3DandThreshold tries to extend (link) edgels in the 
    <BR>same volume. In other words, it links edgels in 3D. 
    <P>It remains to say that in vtkLinkIn2DandThreshold I used 8 neighbors to 
    <BR>connectivity. In vtkLinkIn3DandThreshold I used 26 neighbors for 
    <BR>connectivity. 
    <P>================================================================ <BR>* 
    Old pipeline: <BR>vtkImageGradient *gradient=vtkImageGradient::New(); 
    <BR>gradient-&gt;SetInput(InputData); 
    <P>vtkImageGradientMagnitude 
    <BR>*gradientmagnitude=vtkImageGradientMagnitude::New(); 
    <BR>gradientmagnitude-&gt;SetInput(InputData); 
    <P>vtkImageNonMaximumSuppression 
    <BR>*suppress=vtkImageNonMaximumSuppression::New(); 
    <BR>suppress-&gt;SetVectorInput(gradient); 
    <BR>suppress-&gt;SetMagnitudeInput(gradientmagnitude); 
    <P>vtkImageThreshold *theshold=vtkImageThreshold::New(); 
    <BR>threshold-&gt;SetInput(suppress-&gt;GetOutput()); 
    <BR>threshold-&gt;ThresholdByLower(thresholdvalue); <BR>// then you can 
    display the result or pass it through other filters. 
    <P>================================================================ <BR>* 
    New pipeline (using either vtkLinkIn2DandThreshold or 
    <BR>vtkLinkIn3DandThreshold): <BR>vtkImageGradient 
    *gradient=vtkImageGradient::New(); <BR>gradient-&gt;SetInput(InputData); 
    <P>vtkImageGradientMagnitude 
    <BR>*gradientmagnitude=vtkImageGradientMagnitude::New(); 
    <BR>gradientmagnitude-&gt;SetInput(InputData); 
    <P>vtkImageNonMaximumSuppression 
    <BR>*suppress=vtkImageNonMaximumSuppression::New(); 
    <BR>suppress-&gt;SetVectorInput(gradient); 
    <BR>suppress-&gt;SetMagnitudeInput(gradientmagnitude); 
    <P>vtkLinkIn3DandThreshold 
    *theshold=vtkLinkIn3DandThreshold::New();&nbsp;&nbsp; // or <BR>you can use 
    vtkLinkIn2DandThreshold 
    <BR>threshold-&gt;SetInput(suppress-&gt;GetOutput()); 
    <BR>threshold-&gt;SetStrongThreshold(strong_threshold_value); 
    <BR>threshold-&gt;SetWeakThreshold(weak_threshold_value); 
    <BR>threshold-&gt;SetShortestLink(shortest_link_value); <BR>// then you can 
    display the result or pass it through other filters. <BR><A 
    href="http://public.kitware.com/mailman/listinfo/vtkusers"></A>&nbsp;</P></BLOCKQUOTE>&nbsp;I'd 
  like to try your classes for work in 3D segmentation for microtomgraphy. 
  <P>&nbsp;&gt;Anyways, I put the classes in the following web-site for 
  download. <PRE>&nbsp;Did I overlook the web-site name ?&nbsp; I can't find it in</PRE><PRE>the message I received.</PRE><PRE>&nbsp;Thanks in advance.</PRE><PRE>&nbsp;Dave</PRE><PRE>--&nbsp;
David E Jones
Du Pont Central Research
Experimental Station, Bldg 320
Wilmington, DE 19880-0320</PRE>&nbsp; </BLOCKQUOTE></BODY></HTML>