open-discussion
open-discussion > afni_matlab problem
Apr 15, 2013 03:04 PM | Pouya Ghaemmaghami
afni_matlab problem
Dear Eric,
I'm using mac, and i downloaded the lastest afni_matlab. I have problem with afni_matlab. some of the pestica functions (like apply_PeSTCA2) use afni_matlab BrikLoad function. this function seems not working well (at least in mac) for creating afni dataset. to be precise in line number 423, so i solved the solution as follow:
[us, uw] = unix(stmp);
% if (us),
% ErrMessage = sprintf ('%s: Failed to create afni brick:\n%s',...
% FuncName, uw);
% err = ErrEval(FuncName,'Err_Could not create afni brick');
% return;
% end
so as you see i just commented the lines between 424 to 429 just to avoid producing errors and exceptions. instead for making afni dataset i made it possible by adding some lines to run_pestica.sh script: these are my added lines:
# Added lines
3dcopy resp_PESTICA2.nii ____tmp_resp_PESTICA2
3dcopy card_PESTICA2.nii ____tmp_card_PESTICA2
I added two lines just after this part:
echo ""
echo "Running Stage 2: Coregistration of EPI to MNI space and back-transform of templates, followed by PESTICA estimation"
echo ""
# PESTICA coreg to template
if [ ! -f $epi_mask.crg2mni.nii ] ; then
echo "Coregistration to EPI template"
3dAllineate -automask -prefix ./$epi_mask.crg2mni.nii -source $epi_mask+orig -base $PESTICA_DIR/meanepi_mni.nii -1Dmatrix_save $epi_mask.coreg.mni.1D
cat_matvec $epi_mask.coreg.mni.1D -I -ONELINE > mni.coreg.$epi_mask.1D
3dAllineate -prefix ./resp_PESTICA2.nii -source $PESTICA_DIR/resp_mean_mni.nii -base $epi_mask+orig -1Dmatrix_apply mni.coreg.$epi_mask.1D
3dAllineate -prefix ./card_PESTICA2.nii -source $PESTICA_DIR/card_mean_mni.nii -base $epi_mask+orig -1Dmatrix_apply mni.coreg.$epi_mask.1D
fi
BTW, I think this problem exist just in Mac, and not linux. Before I]ve found something regarding that in afni forums. Now i cant find it! but anyway someguys suggested using 3dcopy in coomand line instead of using matlab_afni for that. so thats why i added those lines to the script
I hope this would not make any further problems
I'm using mac, and i downloaded the lastest afni_matlab. I have problem with afni_matlab. some of the pestica functions (like apply_PeSTCA2) use afni_matlab BrikLoad function. this function seems not working well (at least in mac) for creating afni dataset. to be precise in line number 423, so i solved the solution as follow:
[us, uw] = unix(stmp);
% if (us),
% ErrMessage = sprintf ('%s: Failed to create afni brick:\n%s',...
% FuncName, uw);
% err = ErrEval(FuncName,'Err_Could not create afni brick');
% return;
% end
so as you see i just commented the lines between 424 to 429 just to avoid producing errors and exceptions. instead for making afni dataset i made it possible by adding some lines to run_pestica.sh script: these are my added lines:
# Added lines
3dcopy resp_PESTICA2.nii ____tmp_resp_PESTICA2
3dcopy card_PESTICA2.nii ____tmp_card_PESTICA2
I added two lines just after this part:
echo ""
echo "Running Stage 2: Coregistration of EPI to MNI space and back-transform of templates, followed by PESTICA estimation"
echo ""
# PESTICA coreg to template
if [ ! -f $epi_mask.crg2mni.nii ] ; then
echo "Coregistration to EPI template"
3dAllineate -automask -prefix ./$epi_mask.crg2mni.nii -source $epi_mask+orig -base $PESTICA_DIR/meanepi_mni.nii -1Dmatrix_save $epi_mask.coreg.mni.1D
cat_matvec $epi_mask.coreg.mni.1D -I -ONELINE > mni.coreg.$epi_mask.1D
3dAllineate -prefix ./resp_PESTICA2.nii -source $PESTICA_DIR/resp_mean_mni.nii -base $epi_mask+orig -1Dmatrix_apply mni.coreg.$epi_mask.1D
3dAllineate -prefix ./card_PESTICA2.nii -source $PESTICA_DIR/card_mean_mni.nii -base $epi_mask+orig -1Dmatrix_apply mni.coreg.$epi_mask.1D
fi
BTW, I think this problem exist just in Mac, and not linux. Before I]ve found something regarding that in afni forums. Now i cant find it! but anyway someguys suggested using 3dcopy in coomand line instead of using matlab_afni for that. so thats why i added those lines to the script
I hope this would not make any further problems
Threaded View
Title | Author | Date |
---|---|---|
Pouya Ghaemmaghami | Apr 15, 2013 | |
Erik Beall | Apr 15, 2013 | |
Erik Beall | Apr 16, 2013 | |
Pouya Ghaemmaghami | Apr 17, 2013 | |
Erik Beall | Apr 17, 2013 | |
Pouya Ghaemmaghami | Apr 23, 2013 | |
Hang Joon Jo | Oct 15, 2013 | |
Marlene Tahedl | Dec 8, 2021 | |
Erik Beall | Apr 29, 2013 | |