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
Page 1 of 2
Pages: 12
Results 1 - 30 of 36
Thanks Peter ! It takes me some time to figure it out. The method I used below is generally robust and I have tested it for several sessions.
I feel it is helpful to put it here as a reference.
# Before the nudging, two issues here
# 1. If the epi data is too far away from its target position, you might want to use the command below to move its origin (the nudge data plugin seems to clip d
by
ruyuanzhang
-
AFNI Message Board
Thanks.
Yes, that is what I thought. I typically use the code below to translate the data in 3d space.
3drefit -dxorigin 20 epi.nii.gz
But I am not sure how to set the orientation using 3drefit. Especially, if I get the rotation parameters below after manually nudging the data.
3drotate -quintic -rotate -8.78I -29.47R 5.78A -ashift -7.42S 9.39L 4.00P -prefix ??? inputdataset
So the ste
by
ruyuanzhang
-
AFNI Message Board
Hi, Peter and Taylor
I tried the method on different sessions but I found this method is not quite robust. The alignment is strongly influenced by the initial starting point and alignment can easily fall into local minima. Can you elaborate more on how to manually nudge and set a good starting point for either aling_epi_anat or 3dAllineate??
I am working on some 7T data. Acquiring onl
by
ruyuanzhang
-
AFNI Message Board
Thanks so much Peter ! It works very well. But I also have a few questions:
1. Instead of 3dAllineate, I also try align_epi_anat.py but it did not align it very well. Do you suggest we should generally use 3dAllineate in partial coverage alignment?
align_epi_anat.py -anat2epi \
-anat anatSS.Subj01.nii -suffix _al_junk.nii.gz \
-epi epi1_rs.nii.gz -epi_base 0 \
-epi_strip None \
-volr
by
ruyuanzhang
-
AFNI Message Board
I tried to use itk-snap to manually align epi to T1, and obtain the transformation matrix.
align_epi_anat.py -anat2epi -anat, t1 \
-save_skullstrip -suffix _al_junk.nii.gz \
-epi epi.str, -epi_base 0 -epi_strip 3dAutomask \
-volreg off' -tshift off -anat_has_skull no -patial_coronal -pre_matrix itkxfm.1D
But it did not work. It might due to the coordinate difference between itk-snap
by
ruyuanzhang
-
AFNI Message Board
Dear afni experts.
I acquired a functional data that only covers the posterior part of the brain (see attached). I found it is very hard to align it to a T1 volume. I have several questions here:
1. I tried the method here, but it did not work very well.
2. Is there any method that I can use such that I can first manually align it (I typically use itksnap or the Nudge plugin in afni),
by
ruyuanzhang
-
AFNI Message Board
I have drawn several ROIs on surfaces in SUMA and this resulted in several .niml.roi files
Can I ask which command I can use to combine them into a single surface ROI?
Thanks.
by
ruyuanzhang
-
AFNI Message Board
Hi, AFNI experts
I am using 3dbucket to extract one volume from a functional dataset. Basically, I did
3dbucket func.nii.gz"[0]" -prefix vol0.nii.gz
I found that the output vol0.nii.gz did not inherent the affine information from mother dataset func.nii.gz. Not sure it is intentionally designed this way or a bug.
Maybe it is better to keep all header information consis
by
ruyuanzhang
-
AFNI Message Board
Thanks. I got some colormaps to visualize the size and eccentricity of population receptive fields in visual cortex. Most default colormaps are good in AFNI but I just want to add some in case to visualize in different ways.
by
ruyuanzhang
-
AFNI Message Board
Hi, AFNI experts
Maybe it is a silly question. can I ask how to permernantly add customized colormap to AFNI and SUMA? such that no need to manually choose them every time I visualize something.
Thanks.
RZ
by
ruyuanzhang
-
AFNI Message Board
Hi, afni experts
I am using align_epi_anat.py to align some epi and anat data. I used -anat2epi option. After I obtained the transformation file, I warped anat to epi, and also epi to anat. The epi2anat data seems sane, indicating a good alignment. But the anat2epi file looks weird. One issue is that, my epi and anat data were collected in different sessions, and thus they are apart.
by
ruyuanzhang
-
AFNI Message Board
Thanks Taylor!
Sorry, I did not express it clearly. Sure, if you want to write out the values into a file you should specify the rotated grid and interpolate values. My question is that, can you just change the information in the header so the data will be displayed as transformed in the afni gui.
Imaging that you have an epi, a t1 and the affine transform between them. I just want to disp
by
ruyuanzhang
-
AFNI Message Board
Hi, Paul
I am trying to follow-up the discussion here. Is there any way that you can apply an affine transform but without resampling the data? In my opinion, you can just do like
new_img_affine = affine_xfm * old_img_affine,
where old_img_affine is the geometry info you can read from the file header. Then you can just update old_img_affine to new_img_affine such in the file header.
by
ruyuanzhang
-
AFNI Message Board
Thanks Taylor. This is super useful!
Actually, I am confused because, to apply an affine transformation, you can simply extract the geometric matrix, multiple by the affine transformation, and then save the new geometric matrix into the header file. In this case, you avoid any resampling and maximally preserve the same resolution and the matrix size of the original file. When doesn't af
by
ruyuanzhang
-
AFNI Message Board
Is there any command that can read and write geometry string info in the head file??
ruyuan
by
ruyuanzhang
-
AFNI Message Board
Thanks so much for the reply.
Yes, afni_proc did correct process and transformed the data. However, my original epi dataset is 2x2x2.2 mm and 100x100x37 dimension. afni_proc (i.e., 3dAllineate) resamples data to 2x2x2 mm and 128x128x128 dimension, which dramatically increase file size and change the resolution and matrix of the data. I just want to align epi to T1 but without changing the resol
by
ruyuanzhang
-
AFNI Message Board
Dear afni experts:
I obtained the affine transformation between an epi and an anat T1 volumes using align_epi_anat.py. I then attempted to use 3dAllineate function to get an new epi volume that is aligned to the anat file. However, there is a relatively large displacement between the two files. I have some questions as follows.
1. I am not sure how to set the output grid (i.e., -maste
by
ruyuanzhang
-
AFNI Message Board
Dear afni team,
I just updated to afni version April 5th, 2019. I supplied "-1Dmat_only_nodset" option, it reported the error below.
Maybe there are some changes in @Align_Centers? Hopefully it could help you debug it.
@Align_Centers -base MNI152_2009_template_SSW.nii.gz -dset sub-06_SurfVol_ssiu_ssiu.nii.gz -cm -1Dmat_only_nodset
v1_center_RAI: Undefined variable.
by
ruyuanzhang
-
AFNI Message Board
Thanks Rick!
Yes, it seems that at the tcat step, it goes from short to float That's why it increases from ~80mb to 180mb. But it is OK.
The grid of data after volreg seems to expand a lot. See below
3dinfo -d3 -n4 sub-04_ses-r20_task-orientation_rec-dico_run-01_bold.nii.gz
2.000000 -2.000000 2.200000 100 100 37 121
3dinfo -d3 -n4 pb**volreg*.HEAD
by
ruyuanzhang
-
AFNI Message Board
I might find the problem. It might due to a bad alignment between anat and vr_base_min_outlier+orig file. And the grid of functional data after volreg is much bigger than the original gird.
I'll manually improve the alignment and see whether the size is still big.
by
ruyuanzhang
-
AFNI Message Board
Dear afni experts:
I am using afni_proc to generate preprocessing script and perform preprocessing. I list afni_proc command as below.
afni_proc.py -subj_id sub-04 \
-script orientdecode.csh -scr_overwrite \
-out_dir afniprep \
-blocks despike tshift align volreg mask scale regress \
-copy_anat forrestgump_sub-04_SurfVol.nii \
-dsets sub-04_ses-r20_task-orientation_rec-dico_run-**
by
ruyuanzhang
-
AFNI Message Board
Dear afni experts,
I have a question about the MapIcosahedron function and in general how to link original surfaces and std surfaces.
I understand that MapIcosahedron looks for the registered surfaces (e.g., lh.sphere.reg) and re-mesh this spherical surfaces with a standard number of nodes. Different subjects might have different numbers of nodes in their lh.sphere.reg but once y
by
ruyuanzhang
-
AFNI Message Board
Thanks so much.
You might also want to update the website. I downloaded the 1.2a version from there.
by
ruyuanzhang
-
AFNI Message Board
Hi, AFNI expert
I am currently using the D99 macaque atlas. I found the ROI #136 in the D99 atlas but there is no label name for this region in the label txt file. Not sure why but can you take a look and maybe add the label for this region?
Best
Ruyuan
by
ruyuanzhang
-
AFNI Message Board
Hi, Daniel
Thanks for your reply.
I am currently trying to align to macaque T1 images (has skull) so I can average them and improve SNR. I used the align_epi_anat.py.
align_epi_anat.py -dset1 dset1.nii.gz -dset2 dset2.nii.gz -master_dset2 dset2.nii.gz -suffix _al.nii.gz -dset1to2 -overwrite
The alignment was good and gave the dset1to2_mat.aff12.1D. The only p
by
ruyuanzhang
-
AFNI Message Board
Hi, Daniel
Thanks for your reply!. I did try to avoid the skull-stripping step. I cleaned up my cmd a little bit. As you can see, I set '-dset1_strp None -dset2_strip None'
align_epi_anat.py -dset1 dset.nii.gz -dset2 dset2.nii.gz -master_dset2 dset2.nii.gz -suffix _al.nii.gz -dset1to2 -output_dir outputdir -giant_move -dset1_strip None -dset2_strip None -overwrite -rigid_body
by
ruyuanzhang
-
AFNI Message Board
Hi, afni expert
I am using align_epi_anat and trying to add a weight dataset to adjust the contribution of the cost function. Basically, I have a skullstripped brainmask and want the alignment only consider the cost function that involves brain voxels. I used something like ''-Allineate_opts -weight brainmask.nii.gz". See the full command below
align_epi_anat.py -dset1 /
by
ruyuanzhang
-
AFNI Message Board
Page 1 of 2
Pages: 12