Are you wanting a .dlabel.nii output or a .dscalar.nii output? Matt.
From: <hcp-users-boun...@humanconnectome.org> on behalf of Jaime Caballero <jcabai...@gmail.com> Date: Monday, May 27, 2019 at 10:37 AM To: "hcp-users@humanconnectome.org" <hcp-users@humanconnectome.org> Subject: [HCP-Users] Convert nifti-ROIs to cifti format (subcortical) Dear experts In my center we are studying cortico-striatal functional connectivity, and cortical/striatal local measures (ALFF, ReHo) on a locally acquired sample. For that we are using Choi's functional parcellation, distributed as a volumetric NIFTI file, in MNI152 space. We want to validate our measures with a subset of the S1200 release (resting state, 3T). Specifically I have used the ICA-FIX cleaned and MSM-all registered files, i.e.: <subject_dir>/MNINonLinear/Results/rfMRI_REST1_LR/rfMRI_REST1_LR_Atlas_MSMAll_hp2000_clean.dtseries.nii The thing is I have doubts on the way to convert nifti ROIs to cifti format in this case. My first approach: 1. Load a cifti template file and the NIFTI ROI file in MATLAB. The roi file is a volume containing 0s and 1s. 2. Use the inverse of the NIFTI's transformation matrix to convert the XYZ coordinates in MNI space from each grayordinate to XYZ coordinates in the NIFTI'S volume space. (The matrix is corrected to account for MATLAB's 1-based matrix indexing) 3. The values of the NIFTI volume for the obtained coordinates define the ROI in the output cifti. 4. Keep only the grayordinates that are set to one by my method and that are labeled as striatum (i.e. caudate, putamen or accumbens) in the cifti files. This aproach is rather hand-made, and I wonder if I am missing something important. Conceptually it looks correct to me, but the ROIs appear slightly displaced to the right, which might affect the results. To load the CIFTIs I use fieltdrip's ft_cifti_read( ), which for this purpose works well (it reads the grayordinate positions and labels), and to load the NIFTIs I use Freesurfer's load_nifti( ). Is this method correct, or is there something important I'm not taking into account? Now I'm trying to do the same with wb_command to compare, but I cannot get it working. The procedure I use is: # Resample the ROI file to 2x2x2 resolution with ANTs: ResampleImage 3 "$NiftiFileIn" "$NiftiFileResampled" 2x2x2 0 # Convert the obtained nifti to cifti: wb_command -cifti-create-dense-from-template "$CiftiDscalarTemplateFile" "$CiftiOut" -volume-all "$NiftiFileResampled" Which outputs the error: -volume-all specifies a volume file that doesn't match the volume space of the template cifti file Is there anything wrong with my way of doing this procedure? Thanks in advance, Best regards, Jaime Caballero-Insaurriaga _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org http://lists.humanconnectome.org/mailman/listinfo/hcp-users ________________________________ The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail. _______________________________________________ HCP-Users mailing list HCP-Users@humanconnectome.org http://lists.humanconnectome.org/mailman/listinfo/hcp-users