#NEWLINE# def __createLabelmapSphereVolume__( self , array , radius ) : #NEWLINE# #INDENT# ' Create a Labelmap volume cloning the current global labelmap with the ROI sphere for visualization purposes\n        :param array: labelmap array\n        :param radius: radius of the sphere (used for naming the volume)\n        :return: volume created\n        ' #NEWLINE# node = SlicerUtil . cloneVolume ( self . currentLabelmap , '{0}_r{1}' . format ( self . currentVolume . GetName ( ) , radius ) ) #NEWLINE# arr = slicer . util . array ( node . GetName ( ) ) #NEWLINE# arr [ : ] = array #NEWLINE# node . GetImageData ( ) . Modified ( ) #NEWLINE# colorNode = slicer . util . getFirstNodeByClassByName ( 'vtkMRMLColorTableNode' , 'HotToColdRainbow' ) #NEWLINE# displayNode = node . GetDisplayNode ( ) #NEWLINE# displayNode . SetAndObserveColorNodeID ( colorNode . GetID ( ) ) #NEWLINE# return node