Temporal filtering of cifti data

Hi all,

We are trying to determine our options for applying temporal filters for the cifti outputs (dtseries.nii) of the ciftify/fmriprep pipelines. We have found that much of the other manipulations of our data are possible with the wb_command tool available from HCP, but temporal filtering in particular seems to be missing from the workbench tools.

Any advice would be appreciated!!

I wrote an extra tool ciftify_clean_img into the ciftify package to help with that. Itā€™s essentially wraps nilearnā€™s clean_img functionality for optional temporal fitering, detrending, and nuisance regression. https://edickie.github.io/ciftify/#/usage/ciftify_clean_img.

I donā€™t have very nice exampleā€™s written into the documentation yet. Let me know if the usage makes sense.

1 Like

This seems very useful! Thank you so much for your response.

I want to make sure I understand the proper flags to use in our case. The only step we want to perform is temporal filtering using a low-pass + high-pass filter. Am I correct that providing the flags --detrend and --standardize asks the nilearn not to perform the steps I am not interested in?

If I use a --clean-config .json file, could I use the syntax "detrend=False, standardize=False, etc " to provide arguments to nilearn.image.clean_img through your wrapper? I look forward to trying out this tool!

Thanks for the feedback! Your right that those options are not well explained (and I think there is an error in the doc stringā€¦ick). Re-reading the code, it adding --detrend and --standardize to the command-line call will set them to ā€œTrueā€ when nilearn.clean_img is called (omitting them sets the options to False). If you specify only high pass and low pass filtering options than I think it should only run the temporal filtering.

If you run one participant with the ā€˜ā€“debugā€™ flag on it should hopefully be verbose enough for you to be sure that it is doing the right thing. It should also output a .json file with the settings so you can double check that it was correct.

Okay, that makes perfect sense! Iā€™ll let you know if we have any more questions about running the tool, and thanks again. :slight_smile: