The Zinc digitiser is an application that uses the Zinc mozilla firefox extension. Extensions (also known as add-ons or plug-ins) provide extra functionality to the web browser. Note that the Zinc extension must be installed to use the Zinc digitiser. Help on installing the extension is given below.
Zinc is based on the powerful 3D display and modelling package Cmgui. Zinc's predecessor was known as MozCmgui. Zinc allows custom built, task specific, interfaces to be created. The digitiser is one of these interfaces, designed to be a useful tool for creating a digital description of a 3D object, as a set of data points in space.
Newer versions of the digitiser are developed in tandem with Zinc. This means the latest version of the digitiser requires the latest version of Zinc. If the version numbers are not compatible the digitiser will not run. Note that newer versions of the digitiser generally have enhanced functionality as well as bug fixes.
Installation instructions are as follows:
Note: Most of the functionality should also work with firefox 1.5 but there is one annoying problem. Firefox 1.5 does not allow windows to refocus. This means if you open a dialog it can be easy to misplace your dialog behind your main window. If it gets placed behind your main window then clicking on the button to open a dialog will NOT bring it to the front (you will need to move the main window, use alt-tab or select the dialog window from the task bar to find your dialog). Upgrade to version 2.0 or newer to get rid of this problem.
| |
If you have any problems please check the zinc wiki and the bug tracker to see if there is a solution to your problem.
The url used to open the link above is as follows:
http://cmiss.bioeng.auckland.ac.nz/development/examples/a/digitise/web_data/zincDigitise_0.44/digitiser.xul?../../cmiss_input/NonAxialVocalTractDigitiseSettings.xml
To understand what this url means we need to look at some more detail on how the digitiser works. To run the digitiser you need access to the digitiser files, a settings file and some appropriate data files. It does not matter if these files are stored locally on your own machine or are stored on a webserver and accessed via the internet as above. Your browser will be able to open them in either case. To use your own data files you will need to create your own settings file which specifies the location of your data files. it can be a good idea to copy the code for the digitiser and associated files to your own machine, so that you can work on digitising without the need of an internet connection. The code for the digitiser itself consists of two files:
There are a number of other initialisation files also required:
If you want to run the digitiser locally make sure you copy
To start the digitiser you need to open the digitiser.xul file in a browser
window. This can be done either by typing in the url for the file or by
opening it using the File>Open menu of your browser.
If you type in the url to open digitiser.xul you can also specify the location of the xml settings file after a "?" as shown above. The location can be set using either an absolute path or a path relative to the digitiser.xul file location.
If no xml file is specified in the url a dialog will pop up, asking you to select the location of your xml settings file.
This file is required as it tells where all the image and data files are located as well as defining various other settings. More information on the contents of this file is given below.
Loading the settings file directly from the url is very useful if you are working with the same settings file a lot. You can bookmark the url and load up your files just by accessing your bookmarked link.
By exploring the Non axial vocal tract digitise example
you can learn how to use the digitiser to load up different image slices and then add data points on the surface of each slice. In this example the images are from MRI scans of the vocal tract and include a co-planar sagittal set as well as slices which were generated normal to the tract path. The slices normal to the tract path are not co-planar (ie the slices are not all stacked on top of each other but are at various different angles).
At the core of the digitser interface are two scene viewers, one for digitising in a 2D plane and one for viewing the data in 3D.
The left hand scene viewer shows a 2D image of the current selected image slice. Clicking in this scene will create points on this slice.
Changing the view to focus on a particular area can be done using the Ctrl key and the mouse.
The right hand 3D scene viewer shows the position of all the data points digitised so far with the option of viewing 1 or 2 slices as well.
Click the View All button if you wish to view the entire volume. This is useful if you have changed the view by zooming in or translating the volume.
The Filter pipeline drop down list allows the user to select from various image processing pipelines. Each pipeline consists of one or more filters chained together, so that the output of the previous filter is fed as the input into the next filter. Applyings filters can make it easier to identify anatomical boundaries.
When a particular pipeline is selected the current image slice is taken and fed through the various filters using the default filter settings. This produces a filtered output image which is then displayed. It can take several seconds to calculate the output image for a given slice so be aware of this when changing slices. When a pipeline is loaded up buttons will be displayed next to the pipeline name, indicating the order of filters used for that pipeline (running from left to right). An example of this is shown below:
Settings for an individual filter can be edited by clicking on the filter button, which will then bring up a settings dialog. If no settings are required the button will be greyed out, indicating there is no dialog. Help for how a filter works and what the settings do can be accessed from the settings dialog for that filter.
VocalTractDigitiseSettings.xml is a simple example of a settings file. It contains comments which describe all the xml tags used in the file.
A more complicated settings file is required for the
Non axial vocal tract example. This is because this example demonstrates the use of non axially aligned slices. Each slice set positioned at an angle requires its own sliceSet tag so there are many more slice sets specified.
The NonAxialVocalTractDigitiseSettings.xml file shows how to define these slice sets.
Open up the list of installed extensions (Tools->Add ons or Tools->Extensions). Check your list to see if there is an entry for Zinc. If there is, right click on the zinc entry and select "About ZINC". An about dialog should open and after a few seconds a 3D model of the torso should load up. Check that you can rotate the torso by using the mouse buttons.
It is possible your current version of Zinc is conflicting with a previously installed version of MozCmgui or Zinc. You will need to uninstall the existing versions. Open up the list of installed extensions (Tools->Add ons or Tools->Extensions). Then use either of the following methods
If you are running the example off the website you must enable a particular security setting for the digitiser to be able to open the settings file. Enter the following url into your browser: about:config . This will bring up a configuration page. Scroll down to the setting signed.applets.code_base_principal_support (near the bottom), double click it and set its value to true.
Another possible reason you will not be asked for a settings file is if your profile settings are confused. If you have logged into a 64 bit machine with the same profile you use for a 32 bit machine and have installed the appropriate versions of Zinc on both machines your profile will confuse firefox. Uninstall Zinc from one of the machines and it should work.
Depending on which version of zinc you are using, you may run into problems if you try and read in a database file on a linux machine which has been manually edited on a windows machine. Editing on a windows machine can result in extra carriage return characters being inserted, as windows and linux machines handle line endings differently.
Note that you may have edited the database file without even realizing it. Some zip programs will insert extra carriage returns when you unzip a file on a windows machine. This has caught several people out in the past, when transferring files between operating systems.
The problem can be hard to spot as the database file will look fine if opened in a text editor as the extra carriage return characters are invisible.
If your database file is not loading under linux, it is likely due to the presence of these window style carraige return characters. You can strip the extra carriage returns out and your database file should work again. There are many ways to do this and several
are suggested here .
If you are using a relative file path note that it is
relative to your xml settings file.
If you are using an absolute file path you can test whether
your path is correct by typing it as a url into your browser.
If your location is correct the browser will display
a listing of the contents of your directory. Note when using
absolute file paths is is a very good idea
to include the protocol , ie whether to use
http:// or file://. If you omit the protocol
the digitiser will do its best to assume the correct protocol
but i may make the wrong assumption. An example of setting
your file path using the absolute method is given below:
The second possible cause is that you may have used the reserved name "database" as the group name in one of your group tags from your xml settings file. Do NOT use database as a group name, as the digitiser uses this name for other purposes.
Using the interface
The 2D digitise scene viewer
Changing image slices
To select and load up a particular image slice you can use any combination of the following controls.
The slice drop down list is a sorted list of all available image slices. The previous and next buttons allow you to quickly swap between adjacent image slices.
Creating node points
Once a slice is loaded up in the 2D digitise window nodes can be created, edited, deleted and saved by using the controls summarised below.
The Group drop down list is used to select which group created nodes will be added to. To add nodes to a different group change the selection and then create them. Note that when groups are saved the nodes from each group will be written to the appropriate group files (which are specified in the xml settings file).
Check the Create nodes check box to create nodes. Clicking on the 2d digitise scene will then create a node. When a point is created it is drawn
in red to indicate it is selected. If you can not see a point try zooming in as your point glyph may be too small to see. (You can change the glyph size in your xml settings file).
Check the Edit nodes check box to edit the position of any selected nodes. You must select a node before editing it, so if you wish to change your selection, check the
Check the Select nodes check box to select nodes. Clicking on a node will then select it. To select more than one node hold down the shift key while clicking. Each node you click on will be added to the selection. Note that it is only possible to delete or edit nodes if they are selected.
Click the Delete selected button to delete and selected nodes.
The save drop down menu is used to save nodes. There are three possibilities which will pop up when the menu is clicked:
Brightness and Contrast
Dpending on your computer and system set up the brightness and contrast controls may or may not be available. If they will not work with your computer they will be disabled and displayed as greyed out.
The Brightness slider adjusts the brightness of
The Contrast slider adjusts the contrast of The 3D scene viewer
Viewing slices in the 3D scene viewer
The Digitise Plane check box is used to toggle the visibility of the current slice being digitised.
If it is checked the position and size of the 2D viewing scene will be shown relative to the volume coordinate box.
The Extra Slice check box is used to toggle the visibility of an extra slice. If checked an extra slice can be selected from the adjacent drop down list which will then be displayed in the 3D window. An extra slice can be useful when trying to determine the boundaries of anatomical structures on the digitise slice.
The transparency slider is used to set the transparency of any slices visible in the 3D window. This allows the user to make the slices semi-transparent so that the relative position of node points and slices can be easily seen.
Filter Pipelines
Editing the xml settings file
The settings file is a text file that uses various tags to set required and optional values. It can be edited using any text editor. The easiest way to create a settings file is to take an existing one and modify it for your needs.
FAQ
How can I tell if the plugin has installed correctly?
Why does the about dialog show no torso?
or
You will need to restart firefox for your changes to take effect. Once restarted, check the list of installed extensions to make sure they have been removed and then reinstall the desired version of Zinc.
Why does the page load up with download plug-in displayed on it?
You have either forgotten to install the Zinc extension, or have installed the wrong version. Click on the tools menu and then select Add-ons (or Extensions) to see whether you have Zinc installed. It should also tell you which version is installed. If you need to install Zinc for the first time or install a newer version see the instructions for Installing Zinc .
When I run the digitiser without a settings file why doesn't it ask me for one?
When I run the digitiser with a settings file name entered on the url why doesn't it load?
See the answer to the previous question.
Why does my database file no longer load when I am using the digitiser from linux?
Why do my slice names load up but not the images for the slices?
There are two possible causes of this problem. The most likely cause is that
the digitiser can not find your image files because you have given it an incorrect file path to your image directory. Check your xml settings file and look at the filepath attribute of your sliceset. It must be set to the location of your image files.
filePath="file:///home/pbie003/cmiss/examples/a/digitise/cmiss_input/images"
Note the triple slash.
Why do my nodes not save when I select "Save nodes to file"?
Either the default location you have specified in your xml settings file does not exist, or it does exist and the files are being saved but to somewhere you don't expect. Check your xml settings file and look at the filename attribute of your database element. It must be set to the location of your database file (where nodes are loaded from at start up and saved to). If the file does not exist but the path to it does than selecting "Save nodes to file" will create a new database file for you. To avoid confusion use an absolute path rather than a relative path. This will ensure your database file is located where you think it is. Note you should not begin your file path with file:// as the file path MUST be on your local machine so there is no need to differentiate between file:// and http:// .
Why do my groups not export when I select "Export nodes to group files"?
Either the default location you have specified in your xml settings file does not exist, or it does exist and the files are being saved but to somewhere you don't expect. Check your xml settings file and look at the groupFilename attribute of your group element. It must be set to the location of your exdata file for that group (where nodes will be written to on a group export). If the file does not exist but the path to it does than selecting "Export nodes to group files" will create a new exdata file for you. To avoid confusion use an absolute path rather than a relative path. This will ensure your exdata files are located where you think it is. Note you should not begin your file path with file:// as the file path MUST be on your local machine so there is no need to differentiate between file:// and http:// .
Why does my browser suddenly crash after using the digitiser?
Some combinations of older versions of Zinc and the digitiser will crash your browser if you use the digitiser and then hit
your browsers' back or refresh button. One solution is to make sure you only use the most
up to date version of both the Zinc plug in and the digitister.
Alternatively when you finish using the digitiser either close the window, hit the home button or type in a new url.
Peter Bier
Last modified: Mon Mar 30 18:50:09 PDT 2009