Home · Quickstart · User Guide and Examples · Interfaces Index · Developers · About · Nipy

# nipype.interfaces.slicer.generate_classes module

This script generates Slicer Interfaces based on the CLI modules XML. CLI modules are selected from the hardcoded list below and generated code is placed in the cli_modules.py file (and imported in __init__.py). For this to work correctly you must have your CLI executabes in $PATH

nipype.interfaces.slicer.generate_classes.add_class_to_package(class_codes, class_names, module_name, package_dir)

nipype.interfaces.slicer.generate_classes.crawl_code_struct(code_struct, package_dir)

nipype.interfaces.slicer.generate_classes.force_to_valid_python_variable_name(old_name)

  Valid c++ names are not always valid in python, so provide alternate naming

      >>> force_to_valid_python_variable_name('lambda')
      'opt_lambda'
      >>> force_to_valid_python_variable_name('inputVolume')
      'inputVolume'

nipype.interfaces.slicer.generate_classes.gen_filename_from_param(param, base)

nipype.interfaces.slicer.generate_classes.generate_all_classes(modules_list=[], launcher=[], redirect_x=False, mipav_hacks=False)

  modules_list contains all the SEM compliant tools that should have wrappers created for them. launcher containtains the command line prefix wrapper arugments needed to prepare a proper environment for each of the modules.

nipype.interfaces.slicer.generate_classes.generate_class(module, launcher, strip_module_name_prefix=True, redirect_x=False, mipav_hacks=False)

nipype.interfaces.slicer.generate_classes.grab_xml(module, launcher, mipav_hacks=False)

nipype.interfaces.slicer.generate_classes.parse_params(params)

nipype.interfaces.slicer.generate_classes.parse_values(values)