Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 4a71d9984febeb5a206904a5a379841a > files > 681

python-morph-0.8-7mdv2010.0.noarch.rpm

<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
    <title>mmdtshow</title>
    <link href="../tbxdok.css" rel="stylesheet">
  </head>
  <body>
    <table class="topNav">
      <tr>
        <td class="index">
                  [<a href="../morph/mmgshow.html"><tt>mmgshow</tt></a>]
              
                  [<a href="index.html">Up</a>]
                  
                  [<a href="../morph/mmlblshow.html"><tt>mmlblshow</tt></a>]
              </td>
        <td class="title">Visualization</td>
      </tr>
    </table>
    <h1>mmdtshow
      <br>
      <span class="subtitle">Display a distance transform image with an iso-line color table.
</span>
    </h1>
    <div class="synopsis">
      <H2>Synopsis</H2>
      <div class="H2">
        <div class="prototype">y = 
          <span class="fun">mmdtshow</span>(
                  
          <span class="par">f</span>, 
          <span class="par">n</span> = 10
                  )
        </div>
        <p>Implemented in 
          <b>Python.</b>
        </p>
        <div class="input">
          <H3>Input</H3>
          <div class="H3">
            <table class="deflist">
              <tbody valign="baseline">
                <tr>
                  <td class="term"><span class="par">f</span></td>
                  <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span>          Gray-scale (uint8 or uint16) image.
                          <p>Distance transform.</p></td>
                </tr>
                <tr>
                  <td class="term"><span class="par">n</span></td>
                  <td class="def"><span class="type"><a href="../mmtypes/mmBoolean.html">Boolean</a></span><p>Number of iso-contours.</p><p>Default: 
                      <code>10</code>
                    </p></td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
        <div class="output">
          <H3>Output</H3>
          <div class="H3">
            <table class="deflist">
              <tbody valign="baseline">
                <tr>
                  <td class="term"><span class="par">y</span></td>
                  <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span>          Gray-scale (uint8 or uint16) or binary image.
                          <p>Optionally return RGB uint8 image</p></td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </div>
    </div>
    <div class="descr">
      <H2>Description</H2>
      <div class="H2">
        <p>
                      Displays the distance transform image 
          <code>f</code> (uint8 or uint16) with a special gray-scale color table with 
          <code>n</code> pseudo-color equaly spaced. The final appearance of this display is similar to an iso-contour image display. The infinity value, which is the maximum level allowed in the image, is displayed as black. The image is displayed in the MATLAB figure only if no output parameter is given.
                  
        </p>
      </div>
    </div>
    <div class="examples">
      <H2>Examples</H2>
      <div class="H2">
        <p>
          <div class="example">
            <div class="listing">
              <pre class="user">&gt;&gt;&gt; f=mmreadgray('blob.tif')</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; fd=mmdist(f)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmshow(fd)</pre>
              <pre class="computer"></pre>
              <pre class="user">&gt;&gt;&gt; mmdtshow(fd)</pre>
              <pre class="computer"></pre>
            </div>
            <table class="images">
              <tbody align="center">
                <tr class="image" valign="bottom">
                  <td><img width="239" src="../images/img_mmdtshow_001.jpg"></td>
                  <td><img width="239" src="../images/img_mmdtshow_002.jpg"></td>
                  <td class="spare"></td>
                </tr>
                <tr class="title" valign="baseline">
                  <td><a href="../images/img_mmdtshow_001.jpg">fd</a></td>
                  <td><a href="../images/img_mmdtshow_002.jpg">fd</a></td>
                  <td class="spare"></td>
                </tr>
              </tbody>
            </table>
          </div>
        </p>
      </div>
    </div>
    <div class="sourcecode">
      <H2>Source Code</H2>
      <div class="H2">
        <pre class="listing">
def mmdtshow(f, n=10):
    import adpil
    if (mmisbinary(f)) or (len(f.shape) != 2):
      print 'Error, mmdtshow: works only for grayscale labeled image'
      return
    y=mmgdtshow(f, n)
    adpil.adshow(y)
    return
    return y
    </pre>
      </div>
    </div>
    <div class="seealso">
      <H2>See also</H2>
      <div class="H2">
        <table class="deflist">
          <tbody valign="baseline">
            <tr>
              <td class="term"><a href="../morph/mmdist.html">mmdist</a></td>
              <td class="def">Distance transform.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmgdist.html">mmgdist</a></td>
              <td class="def">Geodesic Distance Transform.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmlblshow.html">mmlblshow</a></td>
              <td class="def">Display a labeled image assigning a random color for each label.</td>
            </tr>
            <tr>
              <td class="term"><a href="../morph/mmshow.html">mmshow</a></td>
              <td class="def">Display binary or gray-scale images and optionally overlay it with binary images.</td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
    <center>
      <table class="botNav">
        <tr>
          <td class="index">
                    [<a href="../morph/mmgshow.html"><tt>mmgshow</tt></a>]
                
                    [<a href="index.html">Up</a>]
                    
                    [<a href="../morph/mmlblshow.html"><tt>mmlblshow</tt></a>]
                </td>
          <td rowspan="2" class="xhtml"><a href="http://www.python.org"><img width="55" alt="Python" height="22" src="../PythonPoweredSmall.gif"></a></td>
        </tr>
        <tr>
          <td class="copyright">Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center.</td>
        </tr>
      </table>
    </center>
  </body>
</html>