Skip to the content.

Command Line Interface (CLI) support in CTK will primarly focus on providing an API for working with existing CLI modules. Providing utilities and tools for creating CLI modules from scratch is a desired addition but there are no concrete plans for this yet. See Command_Line_Interface for more general information about CLI modules.

1. Getting the Code The code is available in the CTK master:

https://github.com/commontk/CTK

Enable the following CMake options to be able to play with the code:

graphviz digraph G { graph [ rankdir = “TB” ]; node [ fontsize = “16” shape = “ellipse” ]; edge [ ]; subgraph cluster_0 { label = “CTK”; color = lightGray; “xmlFile” [ label = “{f0 Command Line Module XML (.xml)| f1}” shape = “record” ]; “gui” [ label = “{f0 Qt GUI | f1}” shape = “record” ]; “uiFile” [ label = “{f0 CLI UI (.ui) | f1}” shape = “record” ]; “ctkCLIModuleDescription” [ label = “{f0 ctkCmdLineModuleDescription| f1}” shape = “record” ]; }

subgraph cluster_1 { label = “3D Slicer”; color = gray; “vtkMRMLParametersNode” [ label = “{f0 vtkMRMLParametersNode| f1}” shape = “record” ]; } “xmlFile”:f0:e - “xmlFile”:f0:ne [label = “XSD file check” ]; “xmlFile”:f1 - “uiFile”:f0 [label = “QtGui XSL file” ]; “xmlFile”:f1 - “uiFile”:f0 [label = “” style=invis]; “xmlFile”:f1 - “ctkCLIModuleDescription”:f0 [label=ctkCmdLineModuleXmlParser]; “ctkCLIModuleDescription”:f1 - “vtkMRMLParametersNode”:f0 [label=create]; “uiFile”:f1 - “gui”:f0 [label = QUiLoader]; “gui”:f1:e - “vtkMRMLParametersNode”:f1:w [dir = both label=synchronize constraint=false]; } /graphviz

Overview of some central classes and their scope.

Please see the full [file:///opt/ctk-builds/CTK-debug-gcc/CTK-build/Documentation/html/group__CommandLineModulesCore__API.html Core API] for a list of available classes and their documentation.

  1. ctkCmdLineModuleDescription C++ API for accessing the command line arguments meta-data defined in the XML description.

This class is read-only.

  1. ctkCmdLineModuleReference A handle to a command line module.

Multiple instances for the same ModuleReference may exist.