Show all posts by user
Dear AFNI users-
We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:
https://discuss.afni.nimh.nih.gov
Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.
The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.
Sincerely,
AFNI HQ
History of AFNI updates
Results 121 - 150 of 2133
Consider installing miniconda to manage python and other software for you. On my M1 Mac, I do have python installed by default in /usr/bin. It's version 2.7.18 on a Mac with 12.2.1 (Monterey) that is just a symbolic link to the system library framework version. The instructions are shown below for conda.
https://afni.nimh.nih.gov/pub/dist/doc/htmldoc/background_install/miniconda.html#inst
by
Daniel Glen
-
AFNI Message Board
Yes, that ML (macrolabel) template from the Eickhoff-Zilles group (transformed from the SPM anatomy toolbox) is made for the MNI N27 specific subject template, and not for the 2009c MNI multi-subject template. These kind of variants make each atlas most accurate only for the template it was intended.
by
Daniel Glen
-
AFNI Message Board
I'll try to answer some of these questions:
3dVol2Surf is to move data from the volume into the surface for data in the same space.
I don't understand this:
If it is possible to do it with my WARP files, what would be the correct command line?
You can make spec files with quickspec. The spec files are fairly straightforward text files, so you could simply edit them too.
Fo
by
Daniel Glen
-
AFNI Message Board
The "detached from terminal" is normal behavior, but it appears you have not set the DISPLAY variable, and you may not have installed an Xserver too. The installation for WSL under Windows requires a bit more than native Ubuntu:
WSL version 1 is easier to configure than WSL2. You will also need to select an Xserver (VcXsrv is the one described in the instructions).
by
Daniel Glen
-
AFNI Message Board
In suma, you can load other datasets including masks or atlases. You can either extract these from a dataset already mapped to the surface or map a new dataset to the surface. In the surface controller (ctrl-s), select "Load Dset". If the dataset is named with the current hemisphere, you will likely see it in the list; otherwise, change the filter at the top to be more liberal - like *.
by
Daniel Glen
-
AFNI Message Board
Adding on to Bob's good advice, you can use 3dAllineate to compute the "in-between" space too. cat_matvec can compute this with from the affine transformation with the -S (square root) option. We have a script here that does something similar for a single subject across two sessions:
https://sscc.nimh.nih.gov/sscc/dglen/alignmentacross2sessions
That in-between volume is meant
by
Daniel Glen
-
AFNI Message Board
3dWarpDrive was meant as an extension of 3dvolreg and, consequently, uses the same cost function of weighted least squares. The closest cost function in 3dAllineate is the pearson correlation (ls) that works with "like to like" images.
by
Daniel Glen
-
AFNI Message Board
I would shift by using an incrementing index on the time series dataset, e.g. mydset"[$offset..$last]". I don't think I would do wrap around the end. To make the lengths equal, you can set the variables, offset and last, to have a specified length that doesn't go beyond the last volume.
by
Daniel Glen
-
AFNI Message Board
"Pixelation" can be a result of lots of different things, such as the discreteness of the actual data, the interpolation method for storage and display, but this might be the result of how the color is mapped to the image. I can get images very similar to this if I change the color scale used to the 10-pane version by clicking below the colorbar in the overlay panel and choosing 10. If
by
Daniel Glen
-
AFNI Message Board
Thanks for reposting. I deleted your previous images from the first post when I couldn't get them to show up. (Thanks, Brian).
Maybe Gang will have some comments about that method, but the usual cause of high correlation is motion. Without censoring motion, that is pretty likely. After censoring, it's still possible depending on the thresholds for motion and outlier limits. There ca
by
Daniel Glen
-
AFNI Message Board
The CHARM, SARM, D99 atlases are all distributed with simple surfaces for each atlas region. You can also use a whole brain surface too. You can map functions or ROI values onto a surface with 3dVol2Surf. For any particular surface, you can get measures and metrics for a surface with SurfMeasures and SurfaceMetrics. SurfInfo can give some general information too. Even with surface data, most of t
by
Daniel Glen
-
AFNI Message Board
That's right. It is a fairly simple problem. Just to make this a little simpler, here is an example of one way to compute the euclidean distance within AFNI. The distance is computed pairwise from two 1D text files each with 3 columns of x,y,z coordinates. You would have to duplicate the rows in one of these files to find distance to a single xyz coordinate.
# create some sample coordinat
by
Daniel Glen
-
AFNI Message Board
While it's hard to say how one might come up with a geodesic distance, you can compute a euclidean distance pretty simply. It's just a distance between two xyz coordinates with sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2). You only need to put the coordinates of interest into a file for each surface.
If you want all distances between every pair, then use 1d_tool.py -show_distmat. This works w
by
Daniel Glen
-
AFNI Message Board
3dTshift infers the slice direction from the z direction (k dimension) of the storage orientation. With the exception of the voxshift option, these z slices are used for the relative timing offsets with the various timing patterns like alt+z, alt-z, seq+z, .... You can find the dataset orientation with "3dinfo -orient mydset". The last dimension of the 3-letter code determines the slice
by
Daniel Glen
-
AFNI Message Board
AFAICT, 3dTshift is not what you want. That's for interpolating within a TR, so some weighted average between TR volumes. I take it you are interested in finding the lag, the number of TRs, that would give you a maximal correlation. You may be interested in a short script where you might just loop through a single TR offset (a little like your evens, odds question) with 3dTcorr1D. Within eac
by
Daniel Glen
-
AFNI Message Board
It occurred to me after I posted that you might really want something like that instead. You can extract every other volume (either evens or odds) from the first method's results, or do the extraction all within 3dcalc in one step. Averaging and differences this way are relatively simple. Similar kinds of commands are often needed for ASL processing:
https://afni.nimh.nih.gov/afni/communi
by
Daniel Glen
-
AFNI Message Board
OK, so that version is more than 2 years old. Can you try with a newer version? If you convert the dataset to AFNI format with 3dcopy, does it work any faster?
by
Daniel Glen
-
AFNI Message Board
Hmmm, it should be fast. On my Macbook Air, that takes about 0.1 seconds total, for a slightly larger dataset. What is the output of 3dinfo on this dataset? Does it show what type of data is there? Post that output and the original command you used.
by
Daniel Glen
-
AFNI Message Board
You should be able to get this done with either 3dcalc or 3dTsmooth.
# this command uses relative indexing for the 'b' dataset.
# The "a-l" uses the "minus ell" to refer to the previous time index
# for the following time index instead, use "a+l" ("a plus ell")
3dcalc -a epi_r1+orig -b a-l -expr 'a+b' -prefix rm_3dcalc_sum2.nii.gz
by
Daniel Glen
-
AFNI Message Board
You might try putting a short delay before the cat_matvec with a 2 second sleep.
Regarding the differing EPI and volreg bases, Rick and I have had discussions about this for a very long time. The assumption in afni_proc.py, I believe, is that if they are different, then they are already aligned, say the volume 0 and volume 3 are used. Because they are close in time to each other, and with litt
by
Daniel Glen
-
AFNI Message Board
Adding on to Rick's resampling rhetoric...
The reason the MNI template is only partially displayed, is that the "random" dataset used as the master here is not in the same space as the MNI dataset. The grid doesn't transform or align the data in any way, and the original xyz positions are simply interpolated onto that random dataset's grid. The template_resam+orig and
by
Daniel Glen
-
AFNI Message Board
The surface ROIs don't directly modify the niml.dset files, but there is a much simpler way. SurfLocalstat can be used with the "-stat mode" option to find the mode, the most common vertex value, in a neighborhood around every node. See example 3 in the help for SurfLocalstat. You can also do the equivalent in the volume with "3dLocalstat -stat mode". The ROI may already
by
Daniel Glen
-
AFNI Message Board
Take a look at look at this previous post for some thoughts on the AAL atlas (I'm not sure if the AAL-90 is the same)
You can convert other atlases similarly as the method posted there. I can make a labeled AFNI dataset for the Harvard-Oxford atlas if you would like to wait. The labeling needs a bit of scripting and some manual care.
by
Daniel Glen
-
AFNI Message Board
3drefit doesn't have a remove attribute option for any attribute, including atlas_point_list. That's on my list of things to do, but for atlases, you can get around this by copying the atlas to a new dataset. That attribute won't get copied over. Also you can specify which atlases you do want with the environment variable AFNI_ATLAS_LIST. If you make it only a single atlas, only th
by
Daniel Glen
-
AFNI Message Board
For most AFNI programs you need to provide the name of the output dataset with the "-prefix" option. Add "-prefix myssname.nii.gz" replacing the dataset name with something you prefer. Most AFNI commands will not overwrite existing files, so that's the source of the error, where 3dSkullstrip will use a default name for the output, and that dataset already exists.
by
Daniel Glen
-
AFNI Message Board
This may be an undetected byte swapping problem. I would recommend comparing the Dimon output with dcm2niix_afni.
by
Daniel Glen
-
AFNI Message Board
You may use whereami from the command line or inside the afni GUI. Atlas regions are output for each coordinate. From the command line, you may provide a list of coordinates. A single atlas, a list of atlases or all available atlases may be specified to query coordinates against. You can specify the space of the coordinates or an example dataset with a particular template space. Template spaces m
by
Daniel Glen
-
AFNI Message Board
The main confusing part in C about 3dTsmooth is that the pointer to the weighting function is used instead of calling the function directly. In my reading of the code, it does not jump from one set to the next, as you had guessed. The hamming function, like the other functions, provides a moving weighted average of some sort as it moves through time a single time point at a time. Each iteration t
by
Daniel Glen
-
AFNI Message Board
No, unfortunately, all is still the same since that post. It does work well, but integrating it with the rest of AFNI is more difficult. I can go over it with you personally if you are interested.
by
Daniel Glen
-
AFNI Message Board