AFNI Message Board

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  

|
October 14, 2014 03:22PM
Hi Afni Experts:
I ran into an odd issue using code that I have used before. I used to use 3dcalc to combine GM/WM/CSF brain masks and subtract the saggital sinus mask out I created. I would then use the 3dmask_tool command to fill in any holes in the resulting file:
3dcalc -a mask_c123456.nii -b mask_c5.nii -expr a-b -prefix WB.nii
3dmask_tool -input WB.nii -dilate_input 2 -2 -fill_holes -prefix mask_WB.nii

I would import this mask into freesurfer and view using the following and everything overlayed perfectly with the underlay files:
mri_convert -i mask_WB.nii --in_type nii -o mask_WB.mgz --out_type mgz
mri_vol2vol --mov mask_WB.mgz --targ brainmask_FS.mgz --regheader --o mask_WB_FS.mgz --no-save-reg --nearest
tkmedit to view the images as I use this mask in the freesurfer pipeline.

Study 1:
When viewing in freesurfer everything looked perfectly aligned and my scan acquisiton for this particular study was taken without any oblique angles.

Used the following:
Ubuntu 10.04LTS 64 bit
Precompiled binary linux_openmp_64: Jan 31 2014 (Version AFNI_2011_12_21_1014)

Study 2:
I am taking images with an oblique angle for this particular study.
This system with issues has the following:
Ubuntu 14.04LTS
Precompiled binary linux_openmp_64: Aug 23 2014 (Version AFNI_2011_12_21_1014)

When taking the WB.nii image to freesurfer using the steps above (omitting 3dmask_tool) everything again looks perfectly aligned. However when I use 3dmask_tool to fill in holes on the mask derived from oblique scans, this is where I run into issues. The images are always shifted and not aligned with the T1 imported image after converting to freesurfer. When running 3dmask_tool with this same input (WB.nii) on the other system (Ubuntu 10.04LTS/binary Jan 31 2014 from the study above) the image looks correct in freesurfer and overlays perfectly with the T1. Additionally, when using Precompiled binary linux_openmp_64: Jan 31 2014 (Version AFNI_2011_12_21_1014) as opposed to Precompiled binary linux_openmp_64: Aug 23 2014 (Version AFNI_2011_12_21_1014) on the Ubuntu 14.04LTS system, everything looked correct as well.

There seems to be an issue or change in 3dmask_tool from precompiled Jan 31 2014 version to August 23, 2014 version which seems to be causing this error but I thought it was worth mentioning as I do not know if this change is localized to the openmp version or affecting all packages. Hope the description helps for debugging and please let me know if there is a fix I can implement or if it may be taken care of in the next release.

Thanks,
Ajay
Subject Author Posted

3dmask_tool bug on newer precombiled binary linux_openmp_64

AjaySK October 14, 2014 03:22PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

rick reynolds October 15, 2014 02:30PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

AjaySK October 16, 2014 02:16PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

rick reynolds October 22, 2014 01:05PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

AjaySK October 22, 2014 04:03PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

rick reynolds October 22, 2014 04:35PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

AjaySK October 22, 2014 05:14PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

rick reynolds October 24, 2014 10:23AM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

AjaySK October 23, 2014 12:48AM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

Isaac Schwabacher October 24, 2014 01:33PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

rick reynolds October 24, 2014 02:13PM

Re: 3dmask_tool bug on newer precombiled binary linux_openmp_64

Isaac Schwabacher October 24, 2014 02:45PM