<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <title>mmshow</title> <link href="../tbxdok.css" rel="stylesheet"> </head> <body> <table class="topNav"> <tr> <td class="index"> [<a href="../morph/mmlblshow.html"><tt>mmlblshow</tt></a>] [<a href="index.html">Up</a>] [<a href="../morph/mmbshow.html"><tt>mmbshow</tt></a>] </td> <td class="title">Visualization</td> </tr> </table> <h1>mmshow <br> <span class="subtitle">Display binary or gray-scale images and optionally overlay it with binary images. </span> </h1> <div class="synopsis"> <H2>Synopsis</H2> <div class="H2"> <div class="prototype"> <span class="fun">mmshow</span>( <span class="par">f</span>, <span class="par">f1</span> = None, <span class="par">f2</span> = None, <span class="par">f3</span> = None, <span class="par">f4</span> = None, <span class="par">f5</span> = None, <span class="par">f6</span> = None ) </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) or binary image. </td> </tr> <tr> <td class="term"><span class="par">f1</span></td> <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span> Binary image. <p>Red overlay.</p><p>Default: <code>None</code> </p></td> </tr> <tr> <td class="term"><span class="par">f2</span></td> <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span> Binary image. <p>Green overlay.</p><p>Default: <code>None</code> </p></td> </tr> <tr> <td class="term"><span class="par">f3</span></td> <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span> Binary image. <p>Blue overlay.</p><p>Default: <code>None</code> </p></td> </tr> <tr> <td class="term"><span class="par">f4</span></td> <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span> Binary image. <p>Magenta overlay.</p><p>Default: <code>None</code> </p></td> </tr> <tr> <td class="term"><span class="par">f5</span></td> <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span> Binary image. <p>Yellow overlay.</p><p>Default: <code>None</code> </p></td> </tr> <tr> <td class="term"><span class="par">f6</span></td> <td class="def"><span class="type"><a href="../mmtypes/mmImage.html">Image</a></span> Binary image. <p>Cyan overlay.</p><p>Default: <code>None</code> </p></td> </tr> </tbody> </table> </div> </div> </div> </div> <div class="descr"> <H2>Description</H2> <div class="H2"> <p> Displays the binary or gray-scale (uint8 or uint16) image <code>f</code>, and optionally overlay it with up to six binary images <code>f1</code> to <code>f6</code> in the following colors: <code>f1</code> as red, <code>f2</code> as green, <code>f3</code> as blue, <code>f4</code> as yellow, <code>f5</code> as magenta, and <code>f6</code> as cian. 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">>>> f=mmreadgray('mribrain.tif');</pre> <pre class="computer"></pre> <pre class="user">>>> f150=mmthreshad(f,150);</pre> <pre class="computer">Warning: Converting input image from int32 to uint8.</pre> <pre class="user">>>> f200=mmthreshad(f,200);</pre> <pre class="computer">Warning: Converting input image from int32 to uint8.</pre> <pre class="user">>>> mmshow(f);</pre> <pre class="computer"></pre> <pre class="user">>>> mmshow(f150);</pre> <pre class="computer"></pre> <pre class="user">>>> mmshow(f,f150,f200);</pre> <pre class="computer"></pre> </div> <table class="images"> <tbody align="center"> <tr class="image" valign="bottom"> <td><img width="256" src="../images/img_mmshow_001.jpg"></td> <td><img width="256" src="../images/img_mmshow_002.jpg"></td> <td class="spare"></td> </tr> <tr class="title" valign="baseline"> <td><a href="../images/img_mmshow_001.jpg">f</a></td> <td><a href="../images/img_mmshow_002.jpg">f150</a></td> <td class="spare"></td> </tr> </tbody> </table> <table class="images"> <tbody align="center"> <tr class="image" valign="bottom"> <td><img width="256" src="../images/img_mmshow_003.jpg"></td> <td class="spare"></td> </tr> <tr class="title" valign="baseline"> <td><a href="../images/img_mmshow_003.jpg">f,f150,f200</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 mmshow(f, f1=None, f2=None, f3=None, f4=None, f5=None, f6=None): import adpil if len(f.shape) != 2: print "Error, mmshow: can only process gray-scale and binary images." return if f1 == None: y = mmgshow(f) elif f2 == None: y = mmgshow(f,f1) elif f3 == None: y = mmgshow(f,f1,f2) elif f4 == None: y = mmgshow(f,f1,f2,f3) elif f5 == None: y = mmgshow(f,f1,f2,f3,f4) elif f6 == None: y = mmgshow(f,f1,f2,f3,f4,f5) elif f6 == None: y = mmgshow(f,f1,f2,f3,f4,f5) else: y = mmgshow(f,f1,f2,f3,f4,f5,f6) adpil.adshow(y) return </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/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/mmdtshow.html">mmdtshow</a></td> <td class="def">Display a distance transform image with an iso-line color table.</td> </tr> </tbody> </table> </div> </div> <center> <table class="botNav"> <tr> <td class="index"> [<a href="../morph/mmlblshow.html"><tt>mmlblshow</tt></a>] [<a href="index.html">Up</a>] [<a href="../morph/mmbshow.html"><tt>mmbshow</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>