open-discussion > 4-d nifti overlay
Showing 1-3 of 3 posts
Display:
Results per page:
Sep 3, 2024  07:09 PM | Christopher Hyatt - Olin Neuropsychiatry Research Center
4-d nifti overlay

I apologize if this question has been asked before, but is it possible, when loading 4-d Nifti overlays that contain a large number of 3-d functional or ICA maps, to jump to a particular volume within the 4-D nifti file? For example, I have 100 ICA component maps in a 4-D Nifti file and want to jump to volume #62 (of 100). Is there a way to do this without doing 'right click- Next volume' to go one by one to the volume I'm interested in?


Thanks,


Chris

Sep 3, 2024  08:09 PM | Chris Rorden
RE: 4-d nifti overlay

The attached image shows a sample 4D image that you can replicate with File/OpenStandard/pcasl


1. The quick way to choose a volume is to click on the volume in the timeline. The timeline is the bottom panel - it is collapsible so make sure it is visible.


 


2. You can use a script using the `volume()` function. You can see all the functions with Scripting/Templates/help menu item. The script panel is on the right, so expand it if is collapsed. Like other tools, volume number is 0-indexed, so the 60th volume is 59. For me, the volume() does not refresh the image so I use the orthoview() function to force a refresh. So a script would look like this:


import gl
gl.volume(0,3)
gl.orthoviewmm(0,0,0)

Attachment: gl.png
Sep 3, 2024  08:09 PM | Christopher Hyatt - Olin Neuropsychiatry Research Center
RE: 4-d nifti overlay

Originally posted by Chris Rorden:



The attached image shows a sample 4D image that you can replicate with File/OpenStandard/pcasl


1. The quick way to choose a volume is to click on the volume in the timeline. The timeline is the bottom panel - it is collapsible so make sure it is visible.


 


2. You can use a script using the `volume()` function. You can see all the functions with Scripting/Templates/help menu item. The script panel is on the right, so expand it if is collapsed. Like other tools, volume number is 0-indexed, so the 60th volume is 59. For me, the volume() does not refresh the image so I use the orthoview() function to force a refresh. So a script would look like this:


import gl
gl.volume(0,3)
gl.orthoviewmm(0,0,0)



Chris, thank you!