Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow optional viewing of full time series #3055

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,23 @@
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

Check warning on line 33 in packages/openneuro-app/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx

View check run for this annotation

Codecov / codecov/patch

packages/openneuro-app/src/scripts/dataset/files/viewers/file-viewer-nifti.tsx#L23-L33

Added lines #L23 - L33 were not covered by tests
}, [imageUrl])

return <canvas ref={canvas} height={800} />
Expand Down
Loading