428 lines
17 KiB
HTML
428 lines
17 KiB
HTML
<html>
|
||
|
||
<head>
|
||
<meta http-equiv="Content-Type"
|
||
content="text/html; charset=iso-8859-1">
|
||
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
|
||
<title>VISION Documentation (LDV): Description</title>
|
||
</head>
|
||
|
||
<body background="images/conc2.gif" bgcolor="#FFFFFF">
|
||
<div align="center"><center>
|
||
|
||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tr>
|
||
<td align="center" width="17%"><a href="notions.htm"><img
|
||
src="images/cprev.jpg" alt="Previous Chapter "
|
||
border="0" hspace="2" width="46" height="26"></a><a
|
||
href="index.htm"><img src="images/csom.jpg"
|
||
alt="Back to content " border="0" hspace="2" width="26"
|
||
height="26"></a><a href="defines.htm"><img
|
||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||
hspace="2" width="43" height="26"></a></td>
|
||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||
align="center"><img src="images/icoprinc.gif" width="59"
|
||
height="71"></p>
|
||
</td>
|
||
<td width="33%"><p align="center"><font color="#0000FF"
|
||
size="5"><strong><em>VISION </em>Documentation
|
||
<em>(LDV)</strong></em></font></p>
|
||
</td>
|
||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||
align="center"><img src="images/icointro.gif" width="59"
|
||
height="71"></p>
|
||
</td>
|
||
<td valign="top" width="17%"><p align="left">Last update:
|
||
<!--webbot bot="Timestamp" startspan
|
||
s-type="EDITED" s-format="%d/%m/%y" -->29/10/00<!--webbot
|
||
bot="Timestamp" i-checksum="12232" endspan --></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="17%"><p align="center"><a
|
||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||
</td>
|
||
<td width="33%"><p align="center"><font size="4"><strong>3.
|
||
D E S C R I P T I O N</strong></font></p>
|
||
</td>
|
||
<td align="center" width="17%"> <!--webbot
|
||
bot="HTMLMarkup" startspan --><A HREF="http://www.estat.com/getstats?serial=1390118421">
|
||
<IMG SRC="http://perso.estat.com/cgi-bin/perso/1390118421?page=DocVisionLDV"
|
||
BORDER=0></A>
|
||
<!--webbot
|
||
bot="HTMLMarkup" endspan --></td>
|
||
</tr>
|
||
</table>
|
||
</center></div>
|
||
|
||
<hr>
|
||
|
||
<p>To summarise, here is what happens between
|
||
<em><strong>VISION</strong></em> and an LDV:</p>
|
||
|
||
<p>0. Init (done a single time at the first user call using LDVs).
|
||
<em><strong>VISION</strong></em>
|
||
loads the <a href="#capacit<69>s">GetLDVCapabilities</a> function of each
|
||
LDV, calls the function and memorizes the capabilities of each LDV to limit
|
||
future hard drive accesses, then launches each LDV</p>
|
||
|
||
<p>1. <em><strong>VISION</strong></em> loads the LDV</p>
|
||
|
||
<p>2. <em><strong>VISION</strong></em> calls the PreRun function</p>
|
||
|
||
<p>3. <em><strong>VISION</strong></em> calls the Run
|
||
(or Preview) function</p>
|
||
|
||
<p>4. <em><strong>VISION</strong></em> unloads the LDV</p>
|
||
|
||
<p> </p>
|
||
|
||
<p><a name="capacit<69>s"></a><font size="4"><strong>3.1 LDV Capabilities
|
||
</strong></font></p>
|
||
<div align="center"><center>
|
||
|
||
<table border="2" width="100%">
|
||
<tr>
|
||
<td width="15%"><strong>Prototype</strong></td>
|
||
<td width="85%"><a href="struct.htm#LDV_INFOS">LDV_INFOS</a>
|
||
* cdecl GetLDVCapabilities(<a href="vapi/struct.htm#VAPI">VAPI</a>
|
||
*vapi)</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Parameters</strong></td>
|
||
<td width="85%"><strong>[IN] </strong>vapi: pointer on the
|
||
<a href="vapi/index.htm#Pr<50>sentation">VAPI</a> interface
|
||
provided by <em><strong>VISION</strong></em>. This pointer must
|
||
be memorized for future use.</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Return</strong></td>
|
||
<td width="85%">A pointer on the structure <a
|
||
href="struct.htm#LDV_INFOS">LDV_INFOS</a> stored in the
|
||
LDV (the skeleton declares the LdvInfos variable of the type
|
||
<a href="struct.htm#LDV_INFOS">LDV_INFOS</a>)</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Responsibilities</strong></td>
|
||
<td width="85%">This function is completely written in the
|
||
skeleton. The works to be done is to fill the structure of the
|
||
type <ahref="struct.htm#LDV_INFOS">LDV_INFOS</a> of the LDV
|
||
skeleton.</td>
|
||
</tr>
|
||
</table>
|
||
</center></div>
|
||
|
||
<p> </p>
|
||
|
||
<p><a name="prerun"></a><font size="4"><strong>3.2 PreRun function
|
||
</strong></font></p>
|
||
<div align="center"><center>
|
||
|
||
<table border="2" width="100%">
|
||
<tr>
|
||
<td width="15%"><strong>Prototype</strong></td>
|
||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||
cdecl PreRun(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||
*out)</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Parameters</strong></td>
|
||
<td width="85%"><strong>[IN]</strong> in: pointer on
|
||
the structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||
describing the image of <em><strong>VISION<br>
|
||
</strong></em><strong>[IN / OUT]</strong> params:
|
||
pointeur on a structure <a
|
||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a> indicating the
|
||
area to modify</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Return</strong></td>
|
||
<td width="85%"><a href="defines.htm#ELDV">A success or error
|
||
code</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Responsibilities</strong></td>
|
||
<td width="85%">Must mention to <em><strong>VISION</strong></em>
|
||
the memory to allocate and the part to be saved by the UNDO
|
||
function:<ol>
|
||
<li>If the LDV needs it (<a href="defines.htm#LDVF">LDVF_OPINPLACE</a>
|
||
not defined in the structure <a
|
||
href="struct.htm#LDV_CAPS">LDV_CAPS</a>),
|
||
out->Raster.fd_w and out->Raster.fd_h
|
||
must contain the size of the image to allocate for the
|
||
destination. This is this image that will be displayed by
|
||
<em><strong>VISION</strong></em>
|
||
in the associated window.</li>
|
||
<li>If needed, indicate in the fields, x1, x2, y1 and
|
||
y2 of the structure <a
|
||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>, the
|
||
area to be backed up in the UNDO buffer of the image to
|
||
be able to undo. Before the call,
|
||
<em><strong>VISION</strong></em>
|
||
sets these fields according to the user selection (block
|
||
or full image)</li>
|
||
</ol>
|
||
<p>By default:</p>
|
||
<ol>
|
||
<li><em><strong>VISION</strong></em> will allow
|
||
no memory for the LDV and will suppose the
|
||
transformation will take place "in place"</li>
|
||
<li><em><strong>VISION</strong></em> will backup in the
|
||
UNDO buffer the part specified by the fields
|
||
x1, x2, y1 and y2 of the structure <a
|
||
href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||
(full image or selection if a block is selected)</li>
|
||
</ol>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</center></div>
|
||
|
||
<p> </p>
|
||
|
||
<p><a name="run"></a><font size="4"><strong>3.3 Run function</strong></font></p>
|
||
<div align="center"><center>
|
||
|
||
<table border="2" width="100%">
|
||
<tr>
|
||
<td width="15%"><strong>Prototype</strong></td>
|
||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||
cdecl Run(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||
*out)</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Parameters</strong></td>
|
||
<td width="85%"><strong>[IN]</strong> in: pointer on the
|
||
structure <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||
describing the source image of
|
||
<em><strong>VISION<br>
|
||
</strong></em><strong>[IN]</strong> params: pointer on
|
||
a structure <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||
indicating the area to modify<br>
|
||
<strong>[OUT]</strong> out: pointer of the destination image
|
||
, allocate by <em><strong>VISION</strong></em>
|
||
with a previous call to PreRun</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Return</strong></td>
|
||
<td width="85%"><a href="defines.htm#ELDV">A success or error
|
||
code</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Responsibilities / Comments</strong></td>
|
||
<td width="85%">Must do the operation forecasted for
|
||
the LDV.<br>
|
||
<em><strong>VISION</strong></em> choses automatically
|
||
the most adapted format while trying to minimise the memory,
|
||
taking into account the format(s) handled by the LDV (knowing the
|
||
most economical is <a
|
||
href="defines.htm#LDVF">LDVF_SPECFORMAT</a>)<br>
|
||
The LDV can modify another area than the one given in the fields
|
||
x1, y1, x2 and y2 of params if it was mentionned previously by
|
||
the PreRun function<br>
|
||
<strong><u>NEVER</u></strong> allocate in the LDV memory for
|
||
<em><strong>VISION</strong></em>,
|
||
because it will be freed as soon as
|
||
<em><strong>VISION</strong></em> will unload the LDV (even if you
|
||
do not do it explicitely, the compiler of the system will do it).
|
||
On the other hand, nothing prevents you from allocating memory for
|
||
internal usage related to this function, but do not forget to free
|
||
it!</td>
|
||
</tr>
|
||
</table>
|
||
</center></div>
|
||
|
||
<p> </p>
|
||
|
||
<p><a name="preview"></a><font size="4"><strong>3.4 Preview
|
||
function</strong></font></p>
|
||
<div align="center"><center>
|
||
|
||
<table border="2" width="100%">
|
||
<tr>
|
||
<td width="15%"><strong>Prototype</strong></td>
|
||
<td width="85%"><a href="defines.htm#LDV_STATUS">LDV_STATUS</a>
|
||
cdecl Preview(<a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||
*in, <a href="struct.htm#LDV_PARAMS">LDV_PARAMS</a>
|
||
*params, <a href="struct.htm#LDV_IMAGE">LDV_IMAGE</a>
|
||
*out)</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Parameters</strong></td>
|
||
<td width="85%">Identical to those of the function <a
|
||
href="#run">Run</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Return</strong></td>
|
||
<td width="85%"><a href="defines.htm#ELDV">A success or error
|
||
code</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="15%"><strong>Responsibilities / Comments</strong></td>
|
||
<td width="85%">This function is identical to the
|
||
function <a href="#run">Run</a>, but it operates on
|
||
smaller images (112 x 112 on average). If the function
|
||
<a href="#run">Run</a> is fast enough to display the result
|
||
in less than 1 second, the Preview function should simply call
|
||
it. Otherwise, it is possible to do some approximations or
|
||
pre-computation to be back below a second.</td>
|
||
</tr>
|
||
</table>
|
||
</center></div>
|
||
|
||
<p> </p>
|
||
|
||
<p><a name="fichier ini"></a><font size="4"><strong>3.5 The
|
||
associated INI file</strong></font></p>
|
||
|
||
<p><font size="3">The INI file associated to an LDV has two purposes:</font></p>
|
||
|
||
<ol>
|
||
<li><font size="3">Gather all the information related to the language
|
||
such as its name and description</font></li>
|
||
<li><font size="3">Define parameters of the LDV</font></li>
|
||
</ol>
|
||
|
||
<p> </p>
|
||
|
||
<p><a name="langues"></a><font size="4"><strong>3.5.1
|
||
Language information</strong></font></p>
|
||
|
||
<p><font size="3">LDVs are multi-lingual, i.e., if a language has been
|
||
defined in preferences,
|
||
<em><strong>VISION</strong></em>
|
||
is able to use this information also for the LDVs, provided the information is
|
||
available. The .LDV and the associated .INI are located in the LDV
|
||
directory of <em><strong>VISION</strong></em>. For instance, the file
|
||
INVERT.INI is associated to the file INVERT.LDV. In the LDV folder, the
|
||
more standard LDVs must be found, i.e., in English. If, for instance, you
|
||
have defined "Fran<EFBFBD>ais" in the preferences of <em><strong>VISION</strong></em>,
|
||
you just have to create the directory "Fran<EFBFBD>ais"
|
||
in the folder LDV, and to include the file INVERT.INI translated in French
|
||
in this directory, for <em><strong>VISION</strong></em> to seek this file
|
||
instead of the one included directly in the LDV directory.</font></p>
|
||
|
||
<p><font size="3">In the [Informations] section, <em><strong>VISION</strong></em>
|
||
expects the following entries:</font></p>
|
||
<div align="center"><center>
|
||
|
||
<table border="2" width="100%">
|
||
<tr>
|
||
<td align="center" width="15%"><strong>Name of entry</strong></td>
|
||
<td align="center" width="10%"><strong>Size</strong></td>
|
||
<td align="center" width="75%"><strong>Description</strong></td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center" width="15%"><font size="3">ShortName</font></td>
|
||
<td align="center" width="10%">Max. 15 characters</td>
|
||
<td width="75%">Short name of the module appearing in the list of
|
||
modules to select</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center" width="15%"><font size="3">LongName</font></td>
|
||
<td align="center" width="10%">Max. 31 characters</td>
|
||
<td width="75%">Name appearing when details are required on this
|
||
LDV</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center" width="15%"><font size="3">Description</font></td>
|
||
<td align="center" width="10%">Max. 79 characters</td>
|
||
<td width="75%">Complete description of the module on 3 lines</td>
|
||
</tr>
|
||
</table>
|
||
</center></div>
|
||
|
||
<p> </p>
|
||
|
||
<p><a name="parametrage"></a><font size="4"><strong>3.5.2
|
||
Parameters of the LDV</strong></font></p>
|
||
|
||
<p><font size="3"><em><strong>VISION</strong></em> allows to enter up to 4
|
||
parameters in an LDV. These parameters are entered using GEM sliders that
|
||
appear or not according to the number of input parameters of the LDV.<br>
|
||
|
||
For <em><strong>VISION</strong></em> to accept to display a parameter,
|
||
a section named [ParameterN] (1 <= N <= 4)
|
||
must be created with the following entries:</font></p>
|
||
<div align="center"><center>
|
||
|
||
<table border="2" width="100%">
|
||
<tr>
|
||
<td align="center" width="15%"><strong>Name of entry</strong></td>
|
||
<td align="center" width="85%"><strong>Description</strong></td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center" width="15%"><font size="3">Name</font></td>
|
||
<td width="85%">Name of this parameter (max. 15 characters). If
|
||
the name is not given, this parameter will not appear</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center" width="15%"><font size="3">Type</font></td>
|
||
<td width="85%">0: 16 bits integer(-32768 --> +32767)<br>
|
||
1: float (not handled currently)</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center" width="15%"><font size="3">MinValue</font></td>
|
||
<td width="85%">Minimum allowed value for this parameter</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center">DefautValue</td>
|
||
<td>Default value given in <em><strong>VISION</strong></em> GUI</td>
|
||
</tr>
|
||
<tr>
|
||
<td align="center">MaxValue</td>
|
||
<td>Maximum allowed value for this parameter</td>
|
||
</tr>
|
||
</table>
|
||
</center></div>
|
||
|
||
<p> </p>
|
||
|
||
<hr>
|
||
<div align="center"><center>
|
||
|
||
<table border="0" cellpadding="0" cellspacing="0" width="100%">
|
||
<tr>
|
||
<td align="center" width="17%"><a href="notions.htm"><img
|
||
src="images/cprev.jpg" alt="Previous chapter "
|
||
border="0" hspace="2" width="46" height="26"></a><a
|
||
href="index.htm"><img src="images/csom.jpg"
|
||
alt="Back to content " border="0" hspace="2" width="26"
|
||
height="26"></a><a href="defines.htm"><img
|
||
src="images/csuiv.jpg" alt="Next Chapter " border="0"
|
||
hspace="2" width="43" height="26"></a></td>
|
||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||
align="center"><img src="images/icoprinc.gif" width="59"
|
||
height="71"></p>
|
||
</td>
|
||
<td width="33%"><p align="center"><font color="#0000FF"
|
||
size="5"><strong><em>VISION </em>Documentation
|
||
<em>(LDV)</strong></em></font></p>
|
||
</td>
|
||
<td align="center" valign="top" rowspan="2" width="8%"><p
|
||
align="center"><img src="images/icointro.gif" width="59"
|
||
height="71"></p>
|
||
</td>
|
||
<td valign="top" width="17%"><p align="left">Last update:
|
||
<!--webbot bot="Timestamp" startspan
|
||
s-type="EDITED" s-format="%d/%m/%y" -->29/10/00<!--webbot
|
||
bot="Timestamp" i-checksum="12232" endspan --></p>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td width="17%"><p align="center"><a
|
||
href="..\..\download/dvldv.zip">Download documentation</a></p>
|
||
</td>
|
||
<td width="33%"><p align="center"><font size="4"><strong>3.
|
||
D E S C R I P T I O N</strong></font></p>
|
||
</td>
|
||
<td valign="top" width="17%"> </td>
|
||
</tr>
|
||
</table>
|
||
|
||
</center></div>
|
||
</body>
|
||
</html>
|