next up previous
Next: About this document Up: Test one - creating Previous: Running the Framework

The test itself

  1. Start the Framework

    You can start the Framework from any directory (it will create the Framework properties file in the directory it is started from). Run the following command to start the Framework:

    ~isfer/demo/startframework
    After a while, the user interface of the Framework appears. It consists of three windows, the Main window, the Network window and the Message window. The Main window is shown in figure 1. The Network window and the Message window are empty at the moment.

       figure56
    Figure 1: The Main window

    The Main window appears in the top left part of the screen. With its buttons and menus you can open, save and run a network, add and remove modules from the current network, quit the Framework and also do some other things, which will be explained later as they will not be used in this test. The Main window also contains two lists: the list on the left displays the names of the modules in the current network, the list on the right displays the connections between those modules. The bar on the bottom of the Main window displays the status of the Framework. It has one of two values: Ready and Running.

    The Network window appears in the top right part of the screen. It contains the current network. At the moment, there is no network and the Network window is empty. It has one menu (called ``View'') with one menu item (called ``Close'') that you can use to close the Network window. You can open more Network windows with the View menu of the Main window. The Network window has a popup menu. You can activate it by pressing the right mouse button anywhere in the Network window. You can also activate it by pressing the left mouse button while holding down shift. With this popup menu you can add modules to the current network and run the network.

    The Message window appears in the bottom left part of the screen. It displays warning and error messages and keeps you informed of the progress when you run a network.

    The Main window has the name of the network as title. The Network window has the text ``View on'' and the name of the network as title. The Messages window is titled ``Messages''. It depends on the window manager you use the windows wether you actually see these titles or not. This applies to the titles of all windows the Framework uses. Because of a bug in the Java Developement Kit for Solaris, the Framework cannot set the title of the windows if you are using the OpenLook Window Manager (olwm or olvwm); all windows will be titled ``No Name''.

  2. Add the first module.

       figure65
    Figure 2: The ``Find head contour'' module

    When creating a network, you can add modules in any order you like. You can start this test by adding the most important module of the network. This is the module called ``Find head contour''. To add a module, press the ``Add'' button in the Module area in the Main window or select the ``Add module'' menu item of the popup menu of the Network window. A dialog window called ``Add Module'' will appear in which you can select the module you want to add. Actually, you are selecting a Module Description File (MDF). A MDF contains information about a module that is needed by the Framework. Select ``FindHeadContour.mdf'' and press the ``Ok'' button of the dialog. After a while a box will appear in the Network window and the name of the module will appear in the module list of the Main window. The box is also shown in figure 2.

    The box in the Network window is the graphical representation of the module. It contains thee rows.

    The top row contains the inconnectors of the module. An inconnector is the entry point where a module can receive data. Connections between modules always end at inconnectors. For each of its inputs, a module has an inconnector. If an inconnector is not connected, the Framework will try to read the input for the module from a file. This module has only one inconnector, some other modules have more inconnectors. The inconnector is labeled with the type of data it can receive, in this case ``Grey''.

    The middle row contains the name of the module.

    The bottom row contains the outconnectors of the module. An outconnector is the entry point where a module produces its output. Connections between modules always start at outconnecors. An outconnector is also the place where you can specify what must happen to the output of the module. For each of its outputs, a module has an outconnector. If you click the right mouse button in an outconnector (or the left while holding shift), the popup menu for that outconnector appears. When you are editing a network, you can use this popup menu to select wether the output of the module must be saved in a file and/or displayed in a window. This module has four outconnectors, which generate data of the types Grey, Grey, PolygonData and FM.

    The module appeared in the top left corner of the Network window. This is the place where all newly added modules appear. If you add another module now, it will appear on top of the first module, or underneath it. To prevent this from happening, you can move this module away. Press and hold a mouse button on the middle part of the module, the part that contains the name of the module. Now you can move the module by moving the mouse. Put it somewhere at the bottom of the Network window, since this will be the module in the network that is executed last.

  3. Add the second module

    As you can see by looking at its inconnector, the module ``Find head contour'' needs Grey data as input. This data is created by a module called ``Color to Grey''. Add it to network like you added the previous module, only this time select the Module Description File ``Color2Grey.mdf''.

  4. Connect the two modules

    The module you added last has an outconnector called Grey. This outconnector must be connected to the inconnector of the ``Find head contour'' module. Click a mouse button in one of these connectors. After you have released the mouse button, move the mouse pointer around a bit. There is a line from the connector to the mouse pointer. Place the mouse pointer above the other connector and click a mouse button. Now the two connectors are connected.

    When the network is run, the Framework will take the output generated by ``Color to Grey'' and give it as input to ``Find head contour''.

    Not all connectors can be connected to each other. They must have matching data types. If you try to connect two connectors that have mismatching data types, the Framework will not create the connection, and will print an error message in the Message window. Also, you cannot make connections that would introduce a loop in the network, connections between two inconnectors or two outconnectors and connections between two connectors of the same module.

  5. Add the last module

    Because the Framework cannot load the Color data that is needed by ``Color to Grey'' from disk, another module is needed. This module must generate Color data as output. Judging by the names of the available modules, the module with the MDF name ``Image2Color.mdf'' can do this job. It is the module ``Image to Color''. Add it to the network. As you can see, it needs ImageData as input. This kind of data can be read from disk by the Framework.

  6. Make the last connection

    The network is almost complete. You only need to make the last connection. Connect the Colour outconnector of ``Image to Color'' to the Colour inconnecor of ``Color to Grey''.

  7. Set display options

       figure75
    Figure 3: Example of the network used for this test

    The network is finished. But if you run it like this, nothing will happen to the output it generates. You can use the popup menus of the outconnectors to turn on the display options of some outconnectors. This means that those outconnectors will display the output that was generated by the module. It will be displayed in a window just after the module has finished.

    The fact that the display option of an outconnector is turned on is indicated by a little black triangle in the lower right bottom of the outconnector.

    The network should look like the network in figure 3.

  8. Select input

       figure81
    Figure 4: The Select Basename window

    Now you must select the input picture on which the network will operate. For one network, the Framework might need to read multiple files and write to multiple files. Each of these files must have a unique name, otherwise some files will be overwritten. Though it is possible, you don't have to specify a filename for all of the connectors. You only have to specify the basename, which is the part of a filename that the filenames for all connectors have in common. For each connector, the Framework will construct the final filename, using the basename and an extension that is dependent on the type of data that will be read from or written to the file. Sometimes more information is needed to make each filename unique, but this will not be used in this test.

    For example, if the basename is picture1 and the Framework must save ImageData, it will use the filename picture1.gif, because .gif is an extension associated with ImageData.

    To select a basename, press the ``Select Basename'' button in the Main window. The Select Basename window will appear. It is shown in figure 4. The main parts of this window are two lists. With the list on the left you can search for available files. The list on the right contains the basenames that are selected. You can select multiple basenames. For the first run, click on the file face6c.gif in the left list. Now press the ``Add'' button. The name will be added to the list on the right (the .gif part is removed). Press the ``Ok'' button to close the Select Basename window.

  9. Run the network

    Now everything is ready to run the network. Press the ``Run'' button in the Main window or select the ``Run'' menu item from the popup menu of the Network window. The Framework will run the network for each basename, one at a time. In the Message window, the Framework will print each basename as it is processed. It will also print which modules are completed, how much time it took and if it completed successfully. In the shell in which the Framework was started, output from the modules will appear. It may take some time to complete a network. The execution time depends on the modules and the size of the input.

  10. View the output

    While the network is running, windows will appear for each outconnector that has its display option turned on. You can close these windows, or save the data, if saving is supported for the particular data type. You can close all data windows at once using the ``Close Data Windows'' menu item from the ``View'' menu in the Main window.

Now this first test is complete. You should now have some basic knowledge of how creating networks works. If you want, you can experiment some more. You can run the network again with different input, or load and run other networks.

Thank you for doing this test!


next up previous
Next: About this document Up: Test one - creating Previous: Running the Framework

M.R. van Schouwen
Thu Oct 23 21:48:11 MET DST 1997