Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > 201e0834e55f1cfb56df6e684a6ce2cd > files > 841

eso-midas-doc-15SEPpl1.0-2.mga6.armv5tl.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 98.1p1 release (March 2nd, 1998)
originally by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds
* revised and updated by:  Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
  Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Using Catalogs in MIDAS Procedures</TITLE>
<META NAME="description" CONTENT="Using Catalogs in MIDAS Procedures">
<META NAME="keywords" CONTENT="vol1">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<LINK REL="STYLESHEET" HREF="vol1.css">
<LINK REL="previous" HREF="node50.html">
<LINK REL="up" HREF="node50.html">
<LINK REL="next" HREF="node52.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html1117"
 HREF="node52.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="icons.gif/next_motif.gif"></A> 
<A NAME="tex2html1113"
 HREF="node50.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="icons.gif/up_motif.gif"></A> 
<A NAME="tex2html1109"
 HREF="node50.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="icons.gif/previous_motif.gif"></A> 
<A NAME="tex2html1115"
 HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="icons.gif/contents_motif.gif"></A> 
<A NAME="tex2html1116"
 HREF="node216.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="icons.gif/index_motif.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1118"
 HREF="node52.html">Adapting MIDAS to your</A>
<B> Up:</B> <A NAME="tex2html1114"
 HREF="node50.html">Catalogs in MIDAS</A>
<B> Previous:</B> <A NAME="tex2html1110"
 HREF="node50.html">Catalogs in MIDAS</A>
<BR>
<BR>
<!--End of Navigation Panel-->

<H2><A NAME="SECTION00691000000000000000">&#160;</A> <A NAME="2583">&#160;</A>
<BR>
Using Catalogs in MIDAS Procedures
</H2>

<P>
Assume we have written a specific application program, <TT>pearl</TT>, within the 
MIDAS environment, that processes an input image and produces some numbers as
a result.
We would like this program also to work on a
sequence of images, not just on one input image:
	<BLOCKQUOTE>
<TT>!+ <BR>
  ! Example 20, MIDAS procedure exa20.prg <BR>
  !+ <BR>
DEFINE/LOCAL CATAL/I/1/1 0	</TT>! define local key CATAL<TT> <BR>
  !  <BR>
LOOP: <BR>
STORE/FRAME IN_A </TT><IMG
 WIDTH="16" HEIGHT="44" ALIGN="MIDDLE" BORDER="0"
 SRC="img215.gif"
 ALT="$\{$"><TT>P1</TT><IMG
 WIDTH="17" HEIGHT="44" ALIGN="MIDDLE" BORDER="0"
 SRC="img216.gif"
 ALT="$\}$">! fill key IN_A with parameter&nbsp;1<TT> <BR>
RUN pearl		</TT>! run our application<TT> <BR>
GOTO LOOP </TT></BLOCKQUOTE>If P1 contains the name of an image,
the command <TT>STORE/FRAME</TT> works exactly <BR>
like <TT>WRITE/KEYWORD</TT>. The keyword CATAL is not modified.
<BR>
However, if P1 contains the name of a catalog
of the form
<I>file.cat</I>, this catalog
is opened and the first entry in the catalog is stored into 
the keyword IN_A.
<BR>
The number of the next entry is saved in the keyword
CATAL (so this name is fixed!). In the loop, the entry number is taken from
CATAL and the corresponding frame name put into keyword IN_A (in our
example). If there are no more entries in the catalog, control is either 
transferred
to a label which may be specified in the command line of <TT>STORE/FRAME</TT> 
or if not given, the procedure is terminated.
&nbsp;&nbsp; <BR>
So <TT>@@ exa20 myframe</TT> will work on the single frame <TT>myframe</TT>, <BR>
whereas
<TT>@@ exa20 mycatal.cat</TT> works on all frames with entries in 
the image catalog <TT>mycatal.cat</TT>.
<BR>
&nbsp;&nbsp; <BR>
If the program <TT>pearl</TT> produces also output frames, you should not
have the catalog enabled (cf. <TT>SET/ICAT</TT> command).
Because each new frame gets added to the enabled catalog 
and you would end up with an infinite loop!
<BR>
&nbsp;&nbsp; <BR>
Furthermore you may write your application and procedure just to work on
single frames and then execute this procedure on all frames in a catalog
via the command 
<TT>EXECUTE/CATALOG</TT>. Note, that you have to set up some
special keywords in advance for that via <BR>
<TT>WRITE/SETUP CATALOG</TT>; for details see the HELP of <TT>EXECUTE/CATALOG</TT>.

<P>
<HR>
<!--Navigation Panel-->
<A NAME="tex2html1117"
 HREF="node52.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
 SRC="icons.gif/next_motif.gif"></A> 
<A NAME="tex2html1113"
 HREF="node50.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
 SRC="icons.gif/up_motif.gif"></A> 
<A NAME="tex2html1109"
 HREF="node50.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
 SRC="icons.gif/previous_motif.gif"></A> 
<A NAME="tex2html1115"
 HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
 SRC="icons.gif/contents_motif.gif"></A> 
<A NAME="tex2html1116"
 HREF="node216.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
 SRC="icons.gif/index_motif.gif"></A> 
<BR>
<B> Next:</B> <A NAME="tex2html1118"
 HREF="node52.html">Adapting MIDAS to your</A>
<B> Up:</B> <A NAME="tex2html1114"
 HREF="node50.html">Catalogs in MIDAS</A>
<B> Previous:</B> <A NAME="tex2html1110"
 HREF="node50.html">Catalogs in MIDAS</A>
<!--End of Navigation Panel-->
<ADDRESS>
<I>Petra Nass</I>
<BR><I>1999-06-09</I>
</ADDRESS>
</BODY>
</HTML>