Skip to content

Commit

Permalink
[imaging browser] Download NIfTI file from imaging browser when a NIf…
Browse files Browse the repository at this point in the history
…TI file is available in addition to a MINC file (#8206)

This modifies the imaging browser so that NIfTI files associated to a MINC file can be downloaded through the imaging browser view session page. Currently, we can download BVAL and BVEC files when they are present for DWI but could not download the NIfTI file that comes with it.

This is a bug fix for projects using MINC files and producing NIfTI files at the time of insertion so that they can download.
  • Loading branch information
cmadjar authored Dec 9, 2022
1 parent ee71175 commit 425943f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion modules/imaging_browser/help/viewSession.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Imaging Browser: View Session

This page displays a candidate's scans collected from a single timepoint. Click on any image to launch the BrainBrowser visualization tool. With every file displayed, there are different actions you can take, such as change the file's QC status, add or edit the QC comments, download the MINC file, or see a longitudinal view (in BrainBrowser). Click **Header Info** to see further scan parameters from the DICOM header.
This page displays a candidate's scans collected from a single timepoint. Click on any image to launch the BrainBrowser visualization tool. With every file displayed, there are different actions you can take, such as change the file's QC status, add or edit the QC comments, download the imaging files (MINC/NIfTI), or see a longitudinal view (in BrainBrowser). Click **Header Info** to see further scan parameters from the DICOM header.

To the right of image thumbnails, there is a list of scan parameters including QC Status, "Selected" (indicating which scan will be available in the data query tool when there are multiple scans of a single modality), and a Caveat flag (True/False). Within the same
panel, you click **Header Info** located in the top right corner to expand the panel, revealing further scan parameters from the
Expand Down
9 changes: 9 additions & 0 deletions modules/imaging_browser/jsx/ImagePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,10 @@ class ImageDownloadButtons extends Component {
BaseURL={this.props.BaseURL}
Label="Download NRRD"
/>
<DownloadButton FileName={this.props.NiiFile}
BaseURL={this.props.BaseURL}
Label="Download NIfTI"
/>
<DownloadButton FileName={this.props.BvalFile}
BaseURL={this.props.BaseURL}
Label="Download BVAL"
Expand Down Expand Up @@ -854,6 +858,7 @@ ImageDownloadButtons.propTypes = {
XMLProtocol: PropTypes.string,
XMLReport: PropTypes.string,
NrrdFile: PropTypes.string,
NiiFile: PropTypes.string,
BvalFile: PropTypes.string,
BvecFile: PropTypes.string,
JsonFile: PropTypes.string,
Expand Down Expand Up @@ -921,6 +926,7 @@ class ImagePanelBody extends Component {
XMLProtocol={this.props.XMLProtocol}
XMLReport={this.props.XMLReport}
NrrdFile={this.props.NrrdFile}
NiiFile={this.props.NiiFile}
BvalFile={this.props.BvalFile}
BvecFile={this.props.BvecFile}
JsonFile={this.props.JsonFile}
Expand All @@ -947,6 +953,7 @@ ImagePanelBody.propTypes = {
XMLProtocol: PropTypes.string,
XMLReport: PropTypes.string,
NrrdFile: PropTypes.string,
NiiFile: PropTypes.string,
BvalFile: PropTypes.string,
BvecFile: PropTypes.string,
JsonFile: PropTypes.string,
Expand Down Expand Up @@ -1035,6 +1042,7 @@ class ImagePanel extends Component {
XMLProtocol={this.props.XMLProtocol}
XMLReport={this.props.XMLReport}
NrrdFile={this.props.NrrdFile}
NiiFile={this.props.NiiFile}
BvalFile={this.props.BvalFile}
BvecFile={this.props.BvecFile}
JsonFile={this.props.JsonFile}
Expand All @@ -1060,6 +1068,7 @@ ImagePanel.propTypes = {
XMLProtocol: PropTypes.string,
XMLReport: PropTypes.string,
NrrdFile: PropTypes.string,
NiiFile: PropTypes.string,
BvalFile: PropTypes.string,
BvecFile: PropTypes.string,
JsonFile: PropTypes.string,
Expand Down
2 changes: 2 additions & 0 deletions modules/imaging_browser/php/viewsession.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,7 @@ class ViewSession extends \NDB_Form
$XMLreport = $FileObj->getParameter('processing:DTIPrepXmlReport');
$XMLprotocol = $FileObj->getParameter('ProtocolFile');
$NrrdFile = $FileObj->getParameter('processing:nrrd_file');
$NiiFile = $FileObj->getParameter('check_nii_filename');
$BvalFile = $FileObj->getParameter('check_bval_filename');
$BvecFile = $FileObj->getParameter('check_bvec_filename');
$JsonFile = $FileObj->getParameter('bids_json_file');
Expand Down Expand Up @@ -361,6 +362,7 @@ class ViewSession extends \NDB_Form
'XMLreport' => $XMLreport,
'XMLprotocol' => $XMLprotocol,
'NrrdFile' => $NrrdFile,
'NiiFile' => $NiiFile,
'BvalFile' => $BvalFile,
'BvecFile' => $BvecFile,
'JsonFile' => $JsonFile,
Expand Down
1 change: 1 addition & 0 deletions modules/imaging_browser/templates/form_viewSession.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"XMLProtocol" : "{$files[file].XMLprotocol}",
"XMLReport" : "{$files[file].XMLreport}",
"NrrdFile" : "{$files[file].NrrdFile}",
"NiiFile" : "{$files[file].NiiFile}",
"BvalFile" : "{$files[file].BvalFile}",
"BvecFile" : "{$files[file].BvecFile}",
"JsonFile" : "{$files[file].JsonFile}",
Expand Down

0 comments on commit 425943f

Please # to comment.