From 3190c6d750be1a4bc036dcde9bf343cdd80b990f Mon Sep 17 00:00:00 2001 From: Taylor Hanayik Date: Mon, 20 May 2024 11:41:39 +0100 Subject: [PATCH] allow optional viewing of full timeseries --- .../dataset/files/viewers/file-viewer-nifti.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/packages/openneuro-app/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx b/packages/openneuro-app/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx index 136f2f2e0e..d3269c3344 100644 --- a/packages/openneuro-app/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx +++ b/packages/openneuro-app/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx @@ -14,14 +14,23 @@ const FileViewerNifti = ({ url: imageUrl, colorMap: "gray", opacity: 1, - visible: true, limitFrames4D: 5, }, ] const nv = new Niivue({ dragAndDropEnabled: false }) ;(window as any).niivue = nv nv.attachToCanvas(canvas.current) - nv.loadVolumes(volumeList) // press the "v" key to cycle through volumes + nv.loadVolumes(volumeList) // press the "v" key to cycle through views (axial, coronal, sagittal, 3D, etc.) + nv.graph.autoSizeMultiplanar = true // use autosizing + nv.opts.multiplanarForceRender = true // ensure that we draw the time series graph in the tile usually reserved for the 3D render + nv.graph.normalizeValues = false // use raw data values on y-axis + nv.graph.opacity = 1.0 // show the graph + // Notes: + // 1. If an image only has one volume, the timeseries graph will not be visible. + // The 3D render will be placed in the graph tile instead. + // 2. Users can navigate volumes forward and backward in the series using the left and right arrow keys on desktop devices + // 3. On touch screens, users can tap on the timeseries graph to jump to a volume index + // 4. Users can load all volumes by clicking on the "..." displayed on the timeseries graph }, [imageUrl]) return