Slicer
4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Logic for running CLI. More...
#include <Base/QTCLI/vtkSlicerCLIModuleLogic.h>
Public Types | |
typedef vtkSlicerModuleLogic | Superclass |
Public Types inherited from vtkSlicerModuleLogic | |
typedef vtkMRMLAbstractLogic | Superclass |
Public Types inherited from vtkMRMLAbstractLogic | |
typedef vtkObject | Superclass |
typedef void(vtkMRMLAbstractLogic::* | TaskFunctionPointer) (void *clientdata) |
Public Member Functions | |
void | Apply (vtkMRMLCommandLineModuleNode *node, bool updateDisplay=true) |
void | ApplyAndWait (vtkMRMLCommandLineModuleNode *node, bool updateDisplay=true) |
vtkMRMLCommandLineModuleNode * | CreateNode () |
vtkMRMLCommandLineModuleNode * | CreateNodeInScene () |
virtual void | DeleteTemporaryFilesOff () |
virtual void | DeleteTemporaryFilesOn () |
For debugging, control deletion of temp files. More... | |
int | GetAllowInMemoryTransfer () const |
virtual const char * | GetClassName () |
const ModuleDescription & | GetDefaultModuleDescription () const |
int | GetDeleteTemporaryFiles () const |
int | GetRedirectModuleStreams () const |
virtual int | IsA (const char *type) |
void | KillProcesses () |
void | PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE |
virtual void | ProcessMrmlEvents (vtkObject *vtkNotUsed(caller), unsigned long vtkNotUsed(event), void *vtkNotUsed(callData)) |
virtual void | RedirectModuleStreamsOff () |
virtual void | RedirectModuleStreamsOn () |
For debugging, control redirection of cout and cerr. More... | |
void | SetAllowInMemoryTransfer (int value) |
void | SetDefaultModuleDescription (const ModuleDescription &moduleDescription) |
void | SetDeleteTemporaryFiles (int value) |
virtual void | SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic) VTK_OVERRIDE |
Set the application logic. More... | |
void | SetRedirectModuleStreams (int value) |
Public Member Functions inherited from vtkSlicerModuleLogic | |
virtual vtkSlicerApplicationLogic * | GetApplicationLogic () |
Get access to overall application state. More... | |
std::string | GetModuleShareDirectory () const |
void | PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE |
void | SetModuleShareDirectory (const std::string &shareDirectory) |
Public Member Functions inherited from vtkMRMLAbstractLogic | |
virtual vtkMRMLApplicationLogic * | GetMRMLApplicationLogic () const |
Get access to overall application state. More... | |
vtkMRMLScene * | GetMRMLScene () const |
Return a reference to the current MRML scene. More... | |
void | PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE |
void | SetMRMLScene (vtkMRMLScene *newScene) |
Set and observe the MRMLScene. More... | |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkSlicerCLIModuleLogic * | New () |
static vtkSlicerCLIModuleLogic * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkSlicerModuleLogic | |
static int | IsTypeOf (const char *type) |
static vtkSlicerModuleLogic * | New () |
The Usual vtk class functions. More... | |
static vtkSlicerModuleLogic * | SafeDownCast (vtkObject *o) |
Static Public Member Functions inherited from vtkMRMLAbstractLogic | |
static int | IsTypeOf (const char *type) |
static vtkMRMLAbstractLogic * | New () |
static vtkMRMLAbstractLogic * | SafeDownCast (vtkObject *o) |
Protected Types | |
enum | Events { RequestHierarchyEditEvent = vtkCommand::UserEvent + 1 } |
List of custom events fired by the class. More... | |
Protected Member Functions | |
void | AddCompleteModelHierarchyToMiniScene (vtkMRMLScene *, vtkMRMLModelHierarchyNode *, MRMLIDMap *sceneToMiniSceneMap, std::set< std::string > &filesToDelete) |
void | ApplyTask (void *clientdata) |
void | AutoRun (vtkMRMLCommandLineModuleNode *cliNode) |
Call apply because the node requests it. More... | |
std::string | ConstructTemporaryFileName (const std::string &tag, const std::string &type, const std::string &name, const std::vector< std::string > &extensions, CommandLineModuleType commandType) |
std::string | ConstructTemporarySceneFileName (vtkMRMLScene *scene) |
std::string | FindHiddenNodeID (const ModuleDescription &d, const ModuleParameter &p) |
bool | IsCommandLineModuleNodeUpdatingDisplay (vtkMRMLCommandLineModuleNode *commandLineModuleNode) const |
virtual void | OnMRMLSceneNodeAdded (vtkMRMLNode *node) VTK_OVERRIDE |
Reimplemented for AutoRun mode. More... | |
void | ProcessMRMLLogicsEvents (vtkObject *, long unsigned int, void *) VTK_OVERRIDE |
Reimplemented to observe vtkSlicerApplicationLogic. More... | |
virtual void | ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData) VTK_OVERRIDE |
Reimplemented to observe CLI node. More... | |
virtual void | SetMRMLSceneInternal (vtkMRMLScene *newScene) VTK_OVERRIDE |
Reimplemented to observe NodeAddedEvent. More... | |
Protected Member Functions inherited from vtkSlicerModuleLogic | |
vtkSlicerModuleLogic () | |
virtual | ~vtkSlicerModuleLogic () |
Protected Member Functions inherited from vtkMRMLAbstractLogic | |
int | EndModify (bool wasModifying) |
virtual bool | EnterMRMLLogicsCallback () const |
virtual bool | EnterMRMLNodesCallback () const |
virtual bool | EnterMRMLSceneCallback () const |
bool | GetDisableModifiedEvent () const |
int | GetInMRMLLogicsCallbackFlag () const |
int | GetInMRMLNodesCallbackFlag () const |
int | GetInMRMLSceneCallbackFlag () const |
vtkCallbackCommand * | GetMRMLLogicsCallbackCommand () |
vtkObserverManager * | GetMRMLLogicsObserverManager () const |
vtkCallbackCommand * | GetMRMLNodesCallbackCommand () |
vtkObserverManager * | GetMRMLNodesObserverManager () const |
vtkCallbackCommand * | GetMRMLSceneCallbackCommand () |
vtkObserverManager * | GetMRMLSceneObserverManager () const |
int | GetPendingModifiedEventCount () const |
int | GetProcessingMRMLSceneEvent () const |
Return the event id currently processed or 0 if any. More... | |
int | InvokePendingModifiedEvent () |
virtual void | Modified () VTK_OVERRIDE |
virtual void | ObserveMRMLScene () |
virtual void | OnMRMLNodeModified (vtkMRMLNode *) |
virtual void | OnMRMLSceneEndBatchProcess () |
virtual void | OnMRMLSceneEndClose () |
virtual void | OnMRMLSceneEndImport () |
virtual void | OnMRMLSceneEndRestore () |
virtual void | OnMRMLSceneNew () |
virtual void | OnMRMLSceneNodeRemoved (vtkMRMLNode *) |
virtual void | OnMRMLSceneStartBatchProcess () |
virtual void | OnMRMLSceneStartClose () |
virtual void | OnMRMLSceneStartImport () |
virtual void | OnMRMLSceneStartRestore () |
virtual void | ProcessMRMLLogicsEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | ProcessMRMLSceneEvents (vtkObject *caller, unsigned long event, void *callData) |
virtual void | RegisterNodes () |
void | SetAndObserveMRMLSceneEventsInternal (vtkMRMLScene *newScene, vtkIntArray *events, vtkFloatArray *priorities=0) |
void | SetDisableModifiedEvent (bool onOff) |
void | SetInMRMLLogicsCallbackFlag (int flag) |
void | SetInMRMLNodesCallbackFlag (int flag) |
void | SetInMRMLSceneCallbackFlag (int flag) |
void | SetProcessingMRMLSceneEvent (int event) |
bool | StartModify () |
virtual void | UnobserveMRMLScene () |
virtual void | UpdateFromMRMLScene () |
vtkMRMLAbstractLogic () | |
virtual | ~vtkMRMLAbstractLogic () |
Static Protected Member Functions | |
static void | ProgressCallback (void *) |
Static Protected Member Functions inherited from vtkMRMLAbstractLogic | |
static void | MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLLogicCallback is a static function to relay modified events from the logics. More... | |
static void | MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
MRMLNodesCallback is a static function to relay modified events from the nodes. More... | |
static void | MRMLSceneCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData) |
Logic for running CLI.
vtkSlicerCLIModuleLogic logic allows to run a either synchronously or asynchronously CLI using parameters of a vtkMRMLCommandLineModuleNode. While a CLI module logic can run any CLI node, the logic can uniquely be assigned a specific CLI by setting a DefaultModuleDescription.
Definition at line 42 of file vtkSlicerCLIModuleLogic.h.
Definition at line 47 of file vtkSlicerCLIModuleLogic.h.
|
protected |
List of custom events fired by the class.
Enumerator | |
---|---|
RequestHierarchyEditEvent |
Definition at line 150 of file vtkSlicerCLIModuleLogic.h.
|
protected |
void vtkSlicerCLIModuleLogic::Apply | ( | vtkMRMLCommandLineModuleNode * | node, |
bool | updateDisplay = true |
||
) |
Schedules the command line module to run. The CLI is scheduled to be run in a separate thread. This methods is non blocking and returns immediately. If updateDisplay is 'true' the selection node will be updated with the the created nodes, which would automatically select the created nodes in the node selectors.
void vtkSlicerCLIModuleLogic::ApplyAndWait | ( | vtkMRMLCommandLineModuleNode * | node, |
bool | updateDisplay = true |
||
) |
Don't start the CLI in a separate thread, but run it in the main thread. This methods is blocking until the CLI finishes to execute, the UI being frozen until that time. If updateDisplay is 'true' the selection node will be updated with the the created nodes, which would automatically select the created nodes in the node selectors.
|
protected |
|
protected |
Call apply because the node requests it.
|
protected |
|
protected |
vtkMRMLCommandLineModuleNode* vtkSlicerCLIModuleLogic::CreateNode | ( | ) |
Instantiate a default command line module node. If a default module description has been given, the node is initialized with the description. Warning: The caller is responsible for deleting it.
vtkMRMLCommandLineModuleNode* vtkSlicerCLIModuleLogic::CreateNodeInScene | ( | ) |
Instantiate a default command line module node and add it into the scene. The caller is responsible for remove the node from the scene.
|
virtual |
|
virtual |
For debugging, control deletion of temp files.
|
protected |
int vtkSlicerCLIModuleLogic::GetAllowInMemoryTransfer | ( | ) | const |
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
const ModuleDescription& vtkSlicerCLIModuleLogic::GetDefaultModuleDescription | ( | ) | const |
int vtkSlicerCLIModuleLogic::GetDeleteTemporaryFiles | ( | ) | const |
int vtkSlicerCLIModuleLogic::GetRedirectModuleStreams | ( | ) | const |
|
virtual |
Reimplemented from vtkSlicerModuleLogic.
|
protected |
Return true if the commandlinemodule node can update the selection node with the outputs of the CLI
|
static |
void vtkSlicerCLIModuleLogic::KillProcesses | ( | ) |
|
static |
|
protectedvirtual |
Reimplemented for AutoRun mode.
Reimplemented from vtkMRMLAbstractLogic.
void vtkSlicerCLIModuleLogic::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
inlinevirtual |
Definition at line 69 of file vtkSlicerCLIModuleLogic.h.
|
protected |
Reimplemented to observe vtkSlicerApplicationLogic.
|
protectedvirtual |
Reimplemented to observe CLI node.
Reimplemented from vtkMRMLAbstractLogic.
|
staticprotected |
|
virtual |
|
virtual |
For debugging, control redirection of cout and cerr.
|
static |
void vtkSlicerCLIModuleLogic::SetAllowInMemoryTransfer | ( | int | value | ) |
void vtkSlicerCLIModuleLogic::SetDefaultModuleDescription | ( | const ModuleDescription & | moduleDescription | ) |
The default module description is used when creating new nodes.
void vtkSlicerCLIModuleLogic::SetDeleteTemporaryFiles | ( | int | value | ) |
|
virtual |
Set the application logic.
Reimplemented from vtkMRMLAbstractLogic.
|
protectedvirtual |
Reimplemented to observe NodeAddedEvent.
Reimplemented from vtkMRMLAbstractLogic.
void vtkSlicerCLIModuleLogic::SetRedirectModuleStreams | ( | int | value | ) |