next up previous contents
Next: METKMeasures Up: Module descriptions in alphabetic Previous: METKLogFile   Contents

Subsections


METKManager

5mm
Genre:  
Authors: Christian Tietjen, Konrad Mühler
Short description: The METKManager is the heart of every METK network. This module must always be included.

Usage

The METKManager is always needed in an METK network. It takes care about the consistency, creates Open Inventor Surfaces out of segmentation masks if necessary and converts different XML files into the METK readable format.

To load a case, e.g. a neck or liver data set, enter the filename and load the case. All METK modules, you want to use, must be connected to the METKManager before you press "`Load"'! While loading the case, the manager prompts several status informations. Loading has been finished when "`Loaded :o)"' is prompted in the status message. After that, the manager sends the message "`Loaded"' to all connected METK modules. If you want to load a new case, you have to cleanup the old case first. This will cause the manager to tell all other METK modules to clean up their internal data structures.

METKManager comes up with a warning message and a question to save the case, if something noticable has changed in the data. The case is stored in a XML-file (see File format). When load a case a first time, converted from another application, there will be a lot of changes, so you will get a warning without changing anything on your own. The saved XML file must be in the same directory as the original XML file.

You may enable different warning levels:

Image METKManager

Developer Information

Generating a Case

When a case will be loaded, the METKManager proceeds in the following order:
  1. Prompts for location and name.
  2. Checks whether the case already exists. If so, do nothing.
  3. If not, set the main ObjMgr's event logging to false.
  4. Set path and file name in the Case object.
  5. Set the main ObjMgr's event logging to true.
  6. Send "`Loaded"' event.

Loading a Case

When a case will be loaded, the METKManager proceeds in the following order:
  1. Check whether there is an already loaded case. If so, do nothing and print out a warning.
  2. If not, load the XML file into the ObjMgr "`source"' and tell ConvertXML to try to convert the data into METK data format.
  3. If successful, set the main ObjMgr's event logging to false.
  4. The file and database integrity will be checked. For example, whether there are all referenced image files and entries.
  5. If a found structure object has an Open Inventor file entry, check for existence.
  6. For layer Appearance, set the obligatory info entries if they do not exist (Color, Visible etc.)
  7. For layer Image, set the obligatory info entries if they do not exist (ObjectValue, VoxelSize etc.)
  8. After the integrity check, generate the missing IV files if necessary.
  9. Create all containers METKInventorObject for providing the Open Inventor files.
  10. If successful, set the main ObjMgr's event logging to true.
  11. Send "`Loaded"' event.

Clean up a Case

  1. Check whether there is a loaded case. If not, do nothing and print out a warning.
  2. Clear ML cache.
  3. Send "`Save"' event if the user confirms the dialog. This will cause all other METK modules to save their files.
  4. Send "`Cleanup"' event. This will cause all other METK modules to clean up their stuff.
  5. Remove all METKInventorObject containers.
  6. Clear all internal ObjMgr's object containers.

Known problems

Warnings also appear when a non-persistent entry was changed.

The saved XML file must be in the same directory as the original XML file.

Listen ObjMgr-Events

ObjMgr-Key Value Action
ObjID Image arrow Appearance Image arrow Visible TRUE Create a surface container if not exist
  FALSE do nothing

Send Global Messages

Message Data Description
Loaded -- Tells everyone that case and database are loaded.
Cleanup -- Tells everyone to clean up their data.

Received METKMsgMessages

Message Data Description
createIVFile ObjectID Generate the surface of the given structure.
getMeasures ObjectID Compute the measures of the given structure.
loadFile Path and file name Another way to load an XML case file.

Fields

new: generate a new dataset. Prompts for location and name.
load: will cause the manager to load the current case
browse: will cause the manager to load a case, selected by a file dialog
save: Trigger to save the case with the given filename.
saveAs: Save the case with the user specified filename via dialog.
cleanup: will cause the manager to clean up the case
fileName: path/filename of the desired case
detectedFormat: format of the XML file
status: current status of the manager
changeDetected: Is true when changes are recognized.
warnLevel: If a case is going to close, and changes were made, the warn level defines, if when a message appear. Possible values: 0...3
computeSurfaces: Compute surfaces on load event

ToDo List

Include METKSaveCase into the manager and establish a new message "`Save"' to tell all modules, that their temporary generated data needs to be saved, or to be discarded when the message is not sent.

Related modules

ConvertXML, NeckVisionXMLConverter, HepaXMLConverter, StandardXMLConverter, GenerateIVFile



next up previous contents
Next: METKMeasures Up: Module descriptions in alphabetic Previous: METKLogFile   Contents
Subversion User 2009-01-06