#NEWLINE# def callNoduleSegmentationCLI( self , inputVolumeID , maximumRadius , onCLISegmentationFinishedCallback = None ) : #NEWLINE# #INDENT# ' Invoke the Lesion Segmentation CLI for the specified volume and fiducials.\n        Note: the fiducials will be retrieved directly from the scene\n        :param inputVolumeID:\n        :return:\n        ' #NEWLINE# self . setActiveVolume ( inputVolumeID ) #NEWLINE# if ( self . cliOutputScalarNode is None ) : #NEWLINE# #INDENT# self . cliOutputScalarNode = slicer . mrmlScene . CreateNodeByClass ( 'vtkMRMLScalarVolumeNode' ) #NEWLINE# segmentedNodeName = ( self . __PREFIX_INPUTVOLUME__ + self . currentVolume . GetID ( ) ) #NEWLINE# self . cliOutputScalarNode . SetName ( segmentedNodeName ) #NEWLINE# slicer . mrmlScene . AddNode ( self . cliOutputScalarNode ) #NEWLINE# #UNINDENT# parameters = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# print ( 'Calling CLI...' ) #NEWLINE# parameters [ 'inputImage' ] = inputVolumeID #NEWLINE# parameters [ 'outputLevelSet' ] = self . cliOutputScalarNode #NEWLINE# parameters [ 'seedsFiducials' ] = self . getFiducialsListNode ( inputVolumeID ) #NEWLINE# parameters [ 'maximumRadius' ] = maximumRadius #NEWLINE# parameters [ 'fullSizeOutput' ] = True #NEWLINE# self . invokedCLI = False #NEWLINE# module = slicer . modules . generatelesionsegmentation #NEWLINE# result = slicer . cli . run ( result , None , parameters ) #NEWLINE# result . AddObserver ( 'ModifiedEvent' , self . __onNoduleSegmentationCLIStateUpdated__ ) #NEWLINE# self . onCLISegmentationFinishedCallback = onCLISegmentationFinishedCallback #NEWLINE# return result