@staticmethod
    def displayForegroundVolume(volumeNodeId, opacity=1.0):
        compNodes = slicer.util.getNodes("vtkMRMLSliceCompositeNode*")
        for compNode in compNodes.itervalues():
            compNode.SetForegroundVolumeID(volumeNodeId)
            compNode.SetForegroundOpacity(opacity)

        # @staticmethod
    # def gitUpdateCIP():
    #     if Util.AUTO_UPDATE_DISABLED:
    #         print("CIP auto update is disabled")
    #         return False
    #
    #     #try:
    #     update = Util.__gitUpdate__()
    #     if update:
    #         # Copy the directory under CIP_GIT_REPO with this module name
    #         #srcPath = "%s/%s" %    (Util.CIP_GIT_REPO_FOLDER, moduleName)
    #         srcPath = Util.CIP_DEFAULT_GIT_REPO_FOLDER
    #         print('src: ', srcPath)
    #         #destPath = os.path.join(Util.CIP_LIBRARY_ROOT_DIR, moduleName)
    #         destPath = os.path.realpath(SlicerUtil.CIP_MODULE_ROOT_DIR + '/..')
    #         print('dest: ', destPath)
    #         # First rename the folder to a temp name, as a backup
    #         backupPath = destPath + "_TMP"
    #         os.rename(destPath, backupPath)
    #         # Copy the folder
    #         shutil.copytree(srcPath, destPath)
    #         # Remove the temp folder
    #         shutil.rmtree(backupPath)
    #
    #     return update
#         except Exception as ex:
#             print (ex.message())
#             return False

    # @staticmethod
    # def __gitUpdate__():
    #     '''Gets the last version of the CIP git repository.
    #     In case it does not exist, it creates it from scratch
    #     Returns true if there was any update in the repository'''
    #     from git import Repo
    #
    #     if os.path.exists(Util.CIP_DEFAULT_GIT_REPO_FOLDER):
    #         # Check for updates
    #         repo = Repo(Util.CIP_DEFAULT_GIT_REPO_FOLDER)
    #         #remote = repo.remotes.pop()
    #         remote = repo.remotes.origin
    #         prevCommit = repo.head.commit.hexsha
    #         status = remote.fetch().pop()
    #         if status and status.commit.hexsha != prevCommit:
    #             remote.pull()
    #             return True
    #
    #         return False
    #
    #     else:
    #         # Create the new repository
    #         os.makedirs(Util.CIP_DEFAULT_GIT_REPO_FOLDER)
    #         os.chmod(Util.CIP_DEFAULT_GIT_REPO_FOLDER, 0777)
    #         #repo = Repo(Util.CIP_GIT_REPO_FOLDER)
    #         Repo.clone_from(Util.CIP_GIT_REMOTE_URL, Util.CIP_DEFAULT_GIT_REPO_FOLDER)
    #         print ("Created folder %s (first time update)" % Util.CIP_DEFAULT_GIT_REPO_FOLDER)
    #         # Always update the first time
    #         return True
Get attribute from expando.
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/CIP_Common/CIP/logic/SlicerUtil.py/SlicerUtil.displayForegroundVolume--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/db/__init__.py/Expando.__getattribute__