Mask for CIFTI (T1w/T2w) stats in FSL PALM

140 views
Skip to first unread message

Jc Mt

unread,
Oct 31, 2024, 9:52:45 AMOct 31
to HCP-Users
Dear HCP users,

I'm running analyses on T1w/T2w ratio myelin maps that were preprocessed with hcppipeline. For statistics, it was recommended to me here to use FSL-PALM, which can take CIFTI files as input.

I concatenate all SmoothedMyelinMaps_BC164k.dscalar.nii images into inputs and run
my basic PALM command (after specifying a design matrix and contrast of interest):

palm -i SmoothedMyelinMaps_BC164k.dscalar.nii -d design_demo.mat -t conBlind_demo.con -n 5000 -o demo_sm_Bl_gt_Sig

Which produces an output from that contrast with a peak level FWE correction 
(demo_sm_Bl_gt_Sig_dat_tstat_fwep.dscalar.nii) in CIFTI format that can be then loaded into wb_view to explore the results.


However, it was recently pointed out to me by the members of my team that it would be valuable to explore the results in a sub-section of the brain (namely: only the visual cortex), so I wanted to use the -m (mask) parameter from FSL-PALM, to run a sort of "small volume correction" for the statistics (in the SPM nomenclature).

Unfortunately, I'm not used to working with CIFTI files and most of my masks are in typical nifti format. I tried using wb_command -cifti-convert -from-nifti and wb_command -cifti-create-dense-from-template while providing my BC164k.dscalar.nii maps as "template" inputs but the resulting output masks are empty.

Is there a way to convert an atlas-based nifti mask to a cifti format? Or maybe there is a better approach (like a visual cortex parcellation already available in the cifti format? I couldn't find one).

Best wishes,

Jacek Matuszewski

Glasser, Matthew

unread,
Oct 31, 2024, 10:13:18 AMOct 31
to hcp-...@humanconnectome.org

No, you should define your mask in CIFTI.

 

I would not run a smoothed 164k analysis, that is just wasting computations.  32k will be a lot faster.  Also, those smoothed myelin maps are a bit of a historical artifact.  I would use the unsmoothed ones.  Finally, I wouldn’t use the _BC maps, but rather transmit field corrected maps as described in Glasser et al., 2022 Neuroimage).


Matt.

--
You received this message because you are subscribed to the Google Groups "HCP-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hcp-users+...@humanconnectome.org.
To view this discussion visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/515a7e79-8bd1-4804-87d0-e6871adfbc91n%40humanconnectome.org.

 


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.

Jc Mt

unread,
Oct 31, 2024, 1:20:00 PMOct 31
to hcp-...@humanconnectome.org
Dear Matt,

Thank you for your quick response. Two small follow-up questions on that:
1. Is there a tool (atlas?) that would let me define a set of ROIs as CIFTI files? I assumed it would be HCP_MMP1.0 from your Nature paper, but ironically all I could find are the volumetric masks in .nii
2. I know this paper and I asked here about that a couple of months ago - is the code for pseudotransmit bias closer to being implemented in hcppipelines? I don't have the B1 maps and frankly, I don't think I have the capacity to come up with the code myself, even with your pseudocode attached to the 2022 NeuroImage paper.

Best,
Jacek

You received this message because you are subscribed to a topic in the Google Groups "HCP-Users" group.
To unsubscribe from this topic, visit https://groups.google.com/a/humanconnectome.org/d/topic/hcp-users/7WqmkMvn_LY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to hcp-users+...@humanconnectome.org.
To view this discussion visit https://groups.google.com/a/humanconnectome.org/d/msgid/hcp-users/64AC6298-1021-493F-9CF7-2D4650DAD91F%40wustl.edu.

Tim Coalson

unread,
Oct 31, 2024, 4:58:26 PMOct 31
to hcp-...@humanconnectome.org
The Glasser MMP paper has links to balsa where the original cifti version can be downloaded.  Do not trust volume "translations" of it (see https://www.pnas.org/doi/10.1073/pnas.1801582115 , there is a good reason we used surface-based methods to generate it).  Perhaps it isn't obvious that balsa shares the data files, not just the figure images?

It also may not be obvious which specific file is recommended, I believe it is this one:


Also, note that -cifti-convert is only for dumping the cifti data matrix into a different container, so that it can be used in tools that don't need spatial information, but haven't been adapted to cifti IO.  It doesn't do mapping between volume and surface representations, and the resulting "volume file" will look like nonsense.

Tim


Glasser, Matthew

unread,
Oct 31, 2024, 7:46:26 PMOct 31
to hcp-...@humanconnectome.org

That is disappointing that you found a NIFTI file instead of the CIFTI file.  Here is the CIFTI file:

 

https://balsa.wustl.edu/file/87B9N

 

There is a pull request with the transmit field bias correction if you want to beta test it.  If you state what you do have, I can assess whether the pseudotransmit approach will work for you. 

Jc Mt

unread,
Nov 19, 2024, 9:11:42 AMNov 19
to hcp-...@humanconnectome.org
Thank you for your responses, based on that I managed to do the following:

- I downloaded the CIFTI atlas file and built a mask combining a set of ROIs with wb_command -cifti-math including an expression based on the label numbers.
- Next, I tried to pass this mask as an argument to PALM like it's described in the PALM documentation, however I keep getting errors that the size of The size of the data does not match the size of the mask.
For my inputs I use concatenated .MyelinMap_BC.32k_fs_LR.dscalar.nii files from fsaverage_LR32k directory.
The original atlas file (Q1-Q6_RelatedValidation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors_with_Atlas_ROIs2.32k_fs_LR.dlabel.nii) also seems to come from fsaverage_LR32k directory and indeed when I use wb_view I can project these two on the same 32k surface, so I assumed that their dimensions and size are equal since they come from the same space.

However, after I loaded them into matlab with cifti-matlab for closer dimension inspection it looks like the atlas file has 91282 greyordinates and the .MyelinMap_BC.32k_fs_LR.dscalar.nii files have 59412 greyordinates, which most likely explains the size error in the palm command. I'm not sure how to equalize the dimensions here, since they seem to come from the same space and both have two hemispheres... I tried using  wb_command -cifti-resample but I'm not sure what are the brain models as I get the ERROR: direction for input must contain brain models


In regards to the pseudotransmit approach, I have two groups of adult subjects, 20 subjects each, and I want to compare their myelin maps (processed with hcppipelines), using a simple directional contrast in PALM with a design matrix that includes a group factor, sex and age (as covariates).

Thank you for your help!
Jacek



Glasser, Matthew

unread,
Nov 19, 2024, 10:24:47 AMNov 19
to hcp-...@humanconnectome.org

You should be parcellating your data first with wb_command -cifti-parcellate before presenting it to PALM.  You don’t need the mask option.  There is also a cerebral cortex only file as well: https://balsa.wustl.edu/file/3VLx, but you still need to parcellate first.

Reply all
Reply to author
Forward
0 new messages