Create Axes Model using CreateModels CLI

It is not a CLI module but a loadable module. You can verify that by printing the module’s class name:

>>> slicer.modules.createmodels.className()
'qSlicerCreateModelsModule'

You can use loadable modules by calling methods of their logic class:

logic = slicer.modules.createmodels.logic()
logic.CreateNeedle(100,5,0,True)

To get a description of all methods and their parameters, type help(logic) and you get a description like this:

class vtkSlicerCreateModelsLogic(vtkSlicerModuleLogic)
 |  vtkSlicerCreateModelsLogic - slicer logic class for creating simple
 |  models
 |  
 |  Superclass: vtkSlicerModuleLogic
 |  
 |  This class contains methods that create model nodes useful for
 |  setting up IGT scenes. These methods can be called from other
 |  modules.
 |  
 ...
 |  Methods defined here:
 |  
 |  CreateCoordinate(...)
 |      V.CreateCoordinate(float, float, vtkMRMLModelNode)
 |          -> vtkMRMLModelNode
 |      C++: vtkMRMLModelNode *CreateCoordinate(double axisLength,
 |          double axisRadius, vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 |  CreateCube(...)
 |      V.CreateCube(float, float, float, vtkMRMLModelNode)
 |          -> vtkMRMLModelNode
 |      C++: vtkMRMLModelNode *CreateCube(double x, double y, double z,
 |          vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 |  CreateCylinder(...)
 |      V.CreateCylinder(float, float, vtkMRMLModelNode)
 |          -> vtkMRMLModelNode
 |      C++: vtkMRMLModelNode *CreateCylinder(double height,
 |          double radius, vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 |  CreateNeedle(...)
 |      V.CreateNeedle(float, float, float, bool, vtkMRMLModelNode)
 |          -> vtkMRMLModelNode
 |      C++: vtkMRMLModelNode *CreateNeedle(double length, double radius,
 |          double tipRadius, bool markers,
 |          vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 |  CreateSphere(...)
 |      V.CreateSphere(float, vtkMRMLModelNode) -> vtkMRMLModelNode
 |      C++: vtkMRMLModelNode *CreateSphere(double radius,
 |          vtkMRMLModelNode *modelNodeToUpdate=NULL)
 |  
 ...
3 Likes