CLIImporter

MacroModule
author Hans Meine
package FMEwork/ReleaseMeVis
definition CLIImporter.def
keywords Slicer, CTK, CLI, module, import, convert

Purpose

Imports any number of CTK/Slicer CLI modules and makes them available as macro modules in MeVisLab.

Usage

This module starts the import, which only has to be done once, or whenever the CLI module description changed.

Set Import Paths to a colon-separated list of directories (semicolons are supported as well, to accommodate Windows users) and press the import button. The Target Directory will be created and populated with files; you may change its location e.g. if the default location is not writable (for the user running MeVisLab).

After the initial import, you need to reload the module definitions (i.e. choose “Reload Module Database (Keep Cache)” from the “Extras” menu) and restart MeVisLab. A number of modules prefixed with “CLI_” should show up in the module search.

Caveat: Support for VTK transforms is rather limited, to say the least.

Details

Technically, CLI modules are commandline programs that can describe their arguments in XML when started with the –xml argument. This XML contains information about the number and type of input and output arguments (optional/mandatory images, scalars, boolean options etc.). Originally, they were invented for plugging standalone image processing programs into the Slicer GUI, but recently they have been used in other contexts, too, and there has been some effort in formalizing their behavior and use, and the XML schema.

Windows

Default Panel

../../../Modules/Macros/CTK_CLI/mhelp/Images/Screenshots/CLIImporter._default.png

Parameter Fields

Visible Fields

Import Paths

name: importPaths, type: String, default: /home/hmeine/.config/NA-MIC/Extensions-22408/SwissSkullStripper/lib/Slicer-4.3/cli-modules, /home/hmeine/.config/NA-MIC/Extensions-22408/SkullStripper/lib/Slicer-4.3/cli-modules

Colon-separated list of directories to scan for CLI executables

Target Directory

name: targetDirectory, type: String, default: /home/hmeine/Developer/FMEwork/ReleaseMeVis/Modules/Macros/CTK_CLI/generated

Path of directory the generated files will be written to. The directory must be writable and should be located under a MeVisLab package directory for the module definitions to be found properly.

Generate Panel Screenshots

name: generatePanelScreenshots, type: Bool, default: FALSE

If checked, the generated module help contains a Windows section with a screenshot of the default module panel.

The screenshots are generated at the end of the import process, which will cause actual panel windows to appear very briefly, so this leads to some flickering. (Which is the only reason why the screenshots are optional.)

Hidden Fields

import

name: import, type: Trigger

Starts the import