Hi-
Is there a way to have 3dMaskAve spit out a time series as something other than text?
I would be interested to export it as floating point, or 32-bit integer, or nifti.
Thanks,
Jim Waltz
Hi-
Is there a way to have 3dMaskAve spit out a time series as something other than text?
I would be interested to export it as floating point, or 32-bit integer, or nifti.
Thanks,
Jim Waltz
Hi-
I’m not sure by what you mean as “floating point, or 32-bit integer,” rather than as text? Do you mean that you want a binary file output?
In terms of NIFTI, what kind of properties would you want that to have? You can use 3dcalc to mask the 4D dataset so that you have a NIFTI dataset of the original size that is mostly zeros, except for where you mask. Woudl you want a NIFTI dataset with smaller (x, y, z) dimensions? You can use 3dZeroPad for that-- the NIFTI would always have to have constant size of 3D volumes across time, however.
–pt
Hi-
Do you mean that you want a binary file output?
Yes. This what I was asking about.
Thanks,
Jim Waltz
Oh. I don’t know of a way to do that.
Can I ask why you would want that, in case there might be another solution? Is it just to read into another program, and to have compressed as much as possible?
–pt
Hi-
Yes, exactly that.
I know that I can use the target program, to read in text and convert it to binary; I was just trying to eliminate that step, if I could.
jw
I see. I’m afraid that I can’t think of a binary-formatted output that would be convenient.
–pt
It seems to me if you can read in the volume itself, it would be easy to skip over the zero data in your reading program. Save your data as an uncompressed dataset in AFNI format. We could, of course, let 3dmaskdump write out the data values to a binary format, but I’m not sure it will be as useful as reading in the masked data yourself. Still, here is a quick way to do this with a Unix command, but it’s limited to byte data.
tr < epicard_am+orig.BRIK -d ‘\000’ > testdata.bin
Hi Jim,
Consider something like this:
3dmaskave -quiet -mask mask.left.vis.aud+orig epi_r1+orig'[2..$]' > data.1D
3dcopy -DAFNI_WRITE_1D_AS_PREFIX=Y data.1D data.nii
It just takes one extra step. 3dmaskave writes as 1D, and then you can
use 3dcopy (or whatever) to convert to binary. The special requirement is
to use that AFNI_WRITE_1D_AS_PREFIX variable, to tell AFNI programs
not to just write as 1D.
Hi Rick-
Thanks so much for that.
Jim Waltz
The National Institute of Mental Health (NIMH) is part of the National Institutes of Health (NIH), a component of the U.S. Department of Health and Human Services.
Freedom of Information Act |
HHS Vulnerability Disclosure
National Institute of Mental
Health | National Institutes of Health | U.S.
Department of Health and Human Services |