Skip to content

Commit

Permalink
BUG: fix/doc DMRIInstall (#6594)
Browse files Browse the repository at this point in the history
* BUG: fix/doc DMRIInstall

Fixes #6593 by updating api and adding a .md doc.

* STYLE: fix lint indent error
  • Loading branch information
pieper committed Oct 18, 2022
1 parent 5ab69c1 commit 537281b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 7 deletions.
20 changes: 20 additions & 0 deletions Docs/user_guide/modules/dmriinstall.md
@@ -0,0 +1,20 @@
# DMRI Install

## Overview

A helper for enabling DMRI functionality. Historically, DMRI functionality was part of the Slicer core and some infrastructue was not easy to move to the extension. This module helps users re-enable the full functionality.

## Panels and their use


- **Install SlicerDMRI**: Triggers the extension manager process.

## Contributors

- Isaiah Norton (BWH)
- Lauren O'Donnell (BWH)
- Steve Pieper (Isomics, Inc.)

## Acknowledgements

The SlicerDMRI developers gratefully acknowledge funding for this project provided by NIH NCI ITCR U01CA199459 (Open Source Diffusion MRI Technology For Brain Cancer Research), NIH P41EB015898 (National Center for Image-Guided Therapy) and NIH P41EB015902 (Neuroimaging Analysis Center), as well as the National Alliance for Medical Image Computing (NA-MIC), funded by the National Institutes of Health through the NIH Roadmap for Medical Research, Grant U54 EB005149.
12 changes: 5 additions & 7 deletions Modules/Scripted/DMRIInstall/DMRIInstall.py
Expand Up @@ -116,12 +116,10 @@ def onApply(self):
self.applyButton.enabled = False
return

md = emm.retrieveExtensionMetadataByName("SlicerDMRI")

if not md or 'extension_id' not in md:
extensionName = 'SlicerDMRI'
emm.interactive = False # prevent display of popups
emm.updateExtensionsMetadataFromServer(True, True) # update extension metadata from server now
if not emm.downloadAndInstallExtensionByName(extensionName, True, True): # install dependencies, wait for installation to finish
return self.onError()

if emm.downloadAndInstallExtension(md['extension_id']):
slicer.app.confirmRestart("Restart to complete SlicerDMRI installation?")
else:
self.onError()
slicer.app.confirmRestart("Restart to complete SlicerDMRI installation?")

0 comments on commit 537281b

Please sign in to comment.