help > Externally preprocessed functional and structural data
Showing 1-13 of 13 posts
Display:
Results per page:
Jul 23, 2019  03:07 PM | Andreas Voldstad - University of Oslo and LMU of Munich
Externally preprocessed functional and structural data
Dear CONN experts,

I have a dataset that is already processed by someone else with SPM and CAT12 toolbox, and as this co-registration and normalisation was the most accurate for our dataset, I would like to use it for the connectivity analysis.


I have input the preprocessed, unsmoothed functional data, thinking to smooth it in CONN so I get the MNI-spaced unsmoothed and smoothed data at the right places. Also I am inputting the preprocessed structural.


I have preprocessed segmentation files for the grey matter and white matter, but not for CSF (for some reason), and I am not sure how to proceed to get a CSF segmentation in CONN and still keep my CAT12 segmentations of GM and WM, and my preprocessed structural volumes instead of inputting the raw structural data.

Any tips would be extremely helpful.


Sincerely,
Andreas Voldstad, Psychology student
Jul 24, 2019  06:07 AM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: Externally preprocessed functional and structural data
Hi Andreas,

CAT12 in the usual segmentation routine does not output p3 (i.e. CSF segmentation). However, you have an option of saving the CSF segmentation if you run CAT12 in the expert mode: cat12('expert'); you can then input these into Conn just like GM and WM segmentation. As far as I know, you will have to re-run segmentation though (perhaps disabling surface and ROI labeling would speed up the process).

Note that running segmentation via Conn on the structural image will not be a good idea as Conn will output segmentation using SPM routine.


Hope this helps

Best
Pravesh

Originally posted by Andreas Voldstad:
Dear CONN experts,

I have a dataset that is already processed by someone else with SPM and CAT12 toolbox, and as this co-registration and normalisation was the most accurate for our dataset, I would like to use it for the connectivity analysis.


I have input the preprocessed, unsmoothed functional data, thinking to smooth it in CONN so I get the MNI-spaced unsmoothed and smoothed data at the right places. Also I am inputting the preprocessed structural.


I have preprocessed segmentation files for the grey matter and white matter, but not for CSF (for some reason), and I am not sure how to proceed to get a CSF segmentation in CONN and still keep my CAT12 segmentations of GM and WM, and my preprocessed structural volumes instead of inputting the raw structural data.

Any tips would be extremely helpful.


Sincerely,
Andreas Voldstad, Psychology student
Jul 24, 2019  01:07 PM | Andreas Voldstad - University of Oslo and LMU of Munich
RE: Externally preprocessed functional and structural data
Thank you, that was very helpful!
Is there anything else I should consider when importing data like this into CONN?
Of course I have the movement parameters rp.txt from SPM as realignment covariate.

Sincerely,
Andreas
Jul 24, 2019  03:07 PM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: Externally preprocessed functional and structural data
Hello,

If you have outliers in the functional data (detected via methods like DVARS, framewise displacement, etc), you might want to import those as "scrubbing" variables. The effect of these volumes, which are marked as outliers, will be regressed out during the denoising step. Alternatively, you could run ART-based scrubbing after importing your structural and functional volumes and depending on the settings that you specify, Conn will detect these outlier volumes and add them as scrubbing variable in first level covariates.


Best
Pravesh 

Originally posted by Andreas Voldstad:
Thank you, that was very helpful!
Is there anything else I should consider when importing data like this into CONN?
Of course I have the movement parameters rp.txt from SPM as realignment covariate.

Sincerely,
Andreas
Jul 25, 2019  10:07 AM | Andreas Voldstad - University of Oslo and LMU of Munich
RE: Externally preprocessed functional and structural data
Thank you again. Is scrubbing highly recommended for connectivity measures?
Jul 25, 2019  11:07 AM | Andreas Voldstad - University of Oslo and LMU of Munich
RE: Externally preprocessed functional and structural data
Oh, and the outlier detection should be performed on the unsmoothed normalised data, I suppose, and then smoothed?
Jul 26, 2019  11:07 AM | Stephen L. - Coma Science Group, GIGA-Consciousness, Hospital & University of Liege
RE: Externally preprocessed functional and structural data
Dear Andreas,

Yes data scrubbing is highly recommended as motion can be a big artifact of functional connectivity. Scrubbing will tell CONN what volumes have too much motion to have any meaningful result, so that they will be rejected altogether, while keeping the temporal integrity intact. If you investigate negative connectivity (aka anticorrelations) in particular, data scrubbing is necessary, as negative connectivity is even more sensitive to motion than positive connectivity.

About performing on unsmoothed normalized data, yes this is the advised procedure, but in practice doing it on smoothed normalized data does not much change the results. You can easily specify the unsmoothed normalized data in CONN with the dropbox at the bottom on the Setup > Functional screen which has several option for you to select to tell CONN how to find the non smoothed data (by removing a 's' prefix, or any prefix of your choice, or you can directly select the appropriate nifti files etc). This dataset will then be selectable in CONN preprocessing as a separate dataset (but I can't remember if it will be Dataset 0 or 1, check in the CONN interface in Setup > Functionals, it should tell you in the upper left or right corner).

Hope this helps,
Best regards,
Stephen
Jul 26, 2019  01:07 PM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: Externally preprocessed functional and structural data
Hi Andreas and Stephen,

Conn's default pre-processing pipeline identifies outliers immediately after slice timing and motion correction step but before normalization. However, you could also do it on normalized images but typically is done on unsmoothed data, like Stephen mentioned. Stephen also mentions two great points about maintaining the temporal integrity of the signal (as opposed to deleting time points) and the sensitivity of connectivity values to motion. There are a couple of recent papers which have a detailed coverage of this topic: Parkes et al (2018), Ciric et al (2017), and Caballero-Gaudes and Reynolds (2017) are some examples.


Best
Pravesh

Originally posted by Stephen L.:
Dear Andreas,

Yes data scrubbing is highly recommended as motion can be a big artifact of functional connectivity. Scrubbing will tell CONN what volumes have too much motion to have any meaningful result, so that they will be rejected altogether, while keeping the temporal integrity intact. If you investigate negative connectivity (aka anticorrelations) in particular, data scrubbing is necessary, as negative connectivity is even more sensitive to motion than positive connectivity.

About performing on unsmoothed normalized data, yes this is the advised procedure, but in practice doing it on smoothed normalized data does not much change the results. You can easily specify the unsmoothed normalized data in CONN with the dropbox at the bottom on the Setup > Functional screen which has several option for you to select to tell CONN how to find the non smoothed data (by removing a 's' prefix, or any prefix of your choice, or you can directly select the appropriate nifti files etc). This dataset will then be selectable in CONN preprocessing as a separate dataset (but I can't remember if it will be Dataset 0 or 1, check in the CONN interface in Setup > Functionals, it should tell you in the upper left or right corner).

Hope this helps,
Best regards,
Stephen
Jul 29, 2019  07:07 AM | Andreas Voldstad - University of Oslo and LMU of Munich
RE: Externally preprocessed functional and structural data
Thank you both! That was very helpful.

Looking at the QA plots in CONN, I can't seem to get a better normalisation and better GM/WM/CSF masks from the CAT12 toolbox, so I will go with the CONN default preprocessing.

Sincerely,

Andreas
Jul 29, 2019  07:07 AM | Pravesh Parekh - National Institute of Mental Health and Neurosciences
RE: Externally preprocessed functional and structural data
Hi Andreas,

I saw your post on the SPM forum about CAT12 normalization not working out too well in the expert mode. Can you post a picture comparing the previous normalization, the expert mode normalization, and the normalization that you get from Conn (perhaps a representative slice with overlay of GM)? It would be very useful to other people as quite a few people have already preprocessed data and would like to import them to Conn rather than re-run preprocessing.

Also, there is an old post on the SPM forum discussuing CAT12 normalization among other things: https://www.jiscmail.ac.uk/cgi-bin/webad... also noteworthy are some of the points about the size of IXI template and MNI template raised here: https://www.jiscmail.ac.uk/cgi-bin/webad... (same thread).


Thanks
Pravesh

Originally posted by Andreas Voldstad:
Thank you both! That was very helpful.

Looking at the QA plots in CONN, I can't seem to get a better normalisation and better GM/WM/CSF masks from the CAT12 toolbox, so I will go with the CONN default preprocessing.

Sincerely,

Andreas
Jul 29, 2019  03:07 PM | Andreas Voldstad - University of Oslo and LMU of Munich
RE: Externally preprocessed functional and structural data
I will prepare it now, and thanks for your help.

The CAT12 preprocessing settings worked fine for a different experiment earlier (2017) with another version of CAT12, but not with the current version.
The initial Affine preprocessing (APP) seems to make a difference: it doesn't work when set to "light" as before (in 2017, which produced a decent tight normalization), but it will run if set to "rough",although producing a different preprocessing than before with for example different total number of grey matter voxels. It seems it's not possible for me to process the data in the current version and get identical results to the preprocessing done then, only with CSF.
It is of interest to me to have a similar dataset to what we had then, because I do connectivity based on ROIs from the activations in that experiment. It is also puzzling that the APP worked then but not now.

Best
Andreas


------------------------------------------------------------------------
29-Jul-2019 16:39:22 - Running job #1
------------------------------------------------------------------------
29-Jul-2019 16:39:22 - Running 'CAT12: Segmentation'
------------------------------------------------------------------------
CAT12.6 r1446: 1/21:
------------------------------------------------------------------------
SANLM denoising (medium): 30s
APPs bias correction:
Preparation 3s
SPM bias correction (samp: 6.00 mm, fwhm: 120 mm) 43s
SPM bias correction (samp: 3.00 mm, fwhm: 60 mm) 105s
Postprocessing 168s
Coarse affine registration: 29s
Affine registration 5s
SPM preprocessing 1 (estimate 1): 107s
SPM preprocessing 1 (estimate 2): 76s
SPM preprocessing 2 (write):
Write Segmentation 17s
Update Segmentation
------------------------------------------------------------------------
CAT Preprocessing error for struct:
------------------------------------------------------------------------
Empty Segmentation:
Possibly the affine registration failed. Please check image orientation.
Tissue class: BG CSF GM WM HDH HDL
Rel. to image volume: 10.35 0.00 0.00 0.00 0.00 89.65
Rel. to brain volume: Inf NaN NaN NaN NaN Inf
Tissue intensity: 4.63 8.10 0.71 7.88 9.82 5.56
------------------------------------------------------------------------
101 - cat_main_updateSPM
70 - cat_main
786 - cat_run_job
15 - cat_run_newcatch
720 - run_job
434 - cat_run
29 - cfg_run_cm
1717 - local_runcj
972 - cfg_util
710 - MenuFileRun_Callback
95 - gui_mainfcn
53 - cfg_ui
------------------------------------------------------------------------
Print 'Graphics' figure to:
/home
29-Jul-2019 16:47:13 - Failed 'CAT12: Segmentation'
Error using cat_main_updateSPM (line 101)
Empty Segmentation:
Possibly the affine registration failed. Please check image orientation.
Tissue class: BG CSF GM WM HDH HDL
Rel. to image volume: 10.35 0.00 0.00 0.00 0.00 89.65
Rel. to brain volume: Inf NaN NaN NaN NaN Inf
Tissue intensity: 4.63 8.10 0.71 7.88 9.82 5.56
In file "/misc/sw/Linux_Ubuntu/SPM/spm12/toolbox/cat12/cat_main_updateSPM.m" (v1414), function "cat_main_updateSPM" at line 101.
In file "/misc/sw/Linux_Ubuntu/SPM/spm12/toolbox/cat12/cat_main.m" (v1446), function "cat_main" at line 70.
In file "/misc/sw/Linux_Ubuntu/SPM/spm12/toolbox/cat12/cat_run_job.m" (v1435), function "cat_run_job" at line 786.
In file "/misc/sw/Linux_Ubuntu/SPM/spm12/toolbox/cat12/cat_run_newcatch.m" (???), function "cat_run_newcatch" at line 15.
In file "/misc/sw/Linux_Ubuntu/SPM/spm12/toolbox/cat12/cat_run.m" (v1439), function "run_job" at line 720.
In file "/misc/sw/Linux_Ubuntu/SPM/spm12/toolbox/cat12/cat_run.m" (v1439), function "cat_run" at line 434.
The following modules did not run:
Failed: CAT12: Segmentation
Am Mo., 29. Juli 2019 um 09:49 Uhr schrieb Barbara Kreilkamp :
Hi Andreas,
Your tissue classes seem to be empty that may be the reason an affine
registration is failing.
"Tissue class: BG CSF GM WM
HDH HDL
Rel. to image volume: 12.38 0.00 0.00 0.00
0.00 87.62"
Are you sure you are processing a T1-w image (with sufficient contrast)?
Kind regards,
Barbara
On 27/07/2019 14:17, Andreas Voldstad wrote:
> Dear CAT12 experts,
> I am a beginner and would appreciate any help with the errors I am encountering in
> preprocessing.
>
> I am performing a CONN toolbox connectivity analysis, and wanted to
> import already preprocessed data, as I assume the CAT12 segmentation and
> normalisation is more accurate and this pipeline was the best
> preprocessing for our subjects, according to my colleagues who handled
> the data before me.
>
> This dataset was already normalized via CAT for a SPM analysis of stimulation data. For
> resting state connectivity analyses, however, I needed a normalised CSF image for
> denoising in the CONN toolbox, which was not produced in CAT by default.
>
> To enable CSF images, I ran the segmentation and normalisation again in the CAT12 expert
> mode. The first time it worked, but for some reason the segmentations and
> normalisations seemed less accurate than both the original one I was given, and the default preprocessing of the CONN toolbox, some subjects
> having (to my untrained eye) inadequate skullstripping and poor, patchy
> grey matter masks.
>
> I tried changing some of the segmentation settings, but now I can't seem
> to perform any segmentation, also when not in expert mode, as the CAT12 toolbox stops after the first
> affine processing. This puzzles me, as I was able to process the same
> images earlier without these errors. All images are set origin at AC. Reinstalling the toolbox did not seem to help.
>
> I was wondering if someone might have any thoughts about why I got a less
> accurate preprocessing when I used the expert mode, and help me interpret
> the error messages I am getting.
>
> Sincerely,
> Andreas
>
>
> From the command window:
>
> cat12('expert')
> CAT default file:
> /Users/andreasv/spm12/toolbox/cat12/cat_defaults.m
>
> ------------------------------------------------------------------------
> 27-Jul-2019 12:17:19 - Running 'CAT12: Segmentation'
>
> ------------------------------------------------------------------------
> CAT12.6 r1450: 1/2: ./GVS_PETMR2017/20130723A/Struct/struct.nii
> ------------------------------------------------------------------------
> SANLM denoising (medium): 71s
> APPs bias correction:
> Preparation 4s
> SPM bias correction (samp: 6.00 mm, fwhm: 120 mm) 49s
> SPM bias correction (samp: 3.00 mm, fwhm: 60 mm) 128s
> Postprocessing 198s
> Coarse affine registration: 37s
> Affine registration 6s
> SPM preprocessing 1 (estimate 1): 108s
> SPM preprocessing 1 (estimate 2): 90s
> SPM preprocessing 2 (write):
> Write Segmentation 15s
> Update Segmentation
> ------------------------------------------------------------------------
> CAT Preprocessing error for struct:
> ------------------------------------------------------------------------
> Empty Segmentation:
> Possibly the affine registration failed. Please check image orientation.
> Tissue class: BG CSF GM WM HDH HDL
> Rel. to image volume: 12.38 0.00 0.00 0.00 0.00 87.62
> Rel. to brain volume: Inf NaN NaN NaN NaN Inf
> Tissue intensity: 4.76 2.41 6.08 9.75 9.98 8.27
> ------------------------------------------------------------------------
> 101 - cat_main_updateSPM
> 70 - cat_main
> 786 - cat_run_job
> 15 - cat_run_newcatch
> 720 - run_job
> 434 - cat_run
> 29 - cfg_run_cm
> 1717 - local_runcj
> 972 - cfg_util
> 710 - MenuFileRun_Callback
> 95 - gui_mainfcn
> 53 - cfg_ui
> ------------------------------------------------------------------------
>
> Print 'Graphics' figure to:
> /Users/andreasv/GVS_PETMR2017/20130723A/Struct/report/catreport_struct.pdf
> 27-Jul-2019 12:26:49 - Failed 'CAT12: Segmentation'
> Error using cat_main_updateSPM (line 101)
> Empty Segmentation:
> Possibly the affine registration failed. Please check image orientation.
> Tissue class: BG CSF GM WM HDH HDL
> Rel. to image volume: 12.38 0.00 0.00 0.00 0.00 87.62
> Rel. to brain volume: Inf NaN NaN NaN NaN Inf
> Tissue intensity: 4.76 2.41 6.08 9.75 9.98 8.27
> In file "/Users/andreasv/spm12/toolbox/cat12/cat_main_updateSPM.m" (v1414), function "cat_main_updateSPM" at line 101.
> In file "/Users/andreasv/spm12/toolbox/cat12/cat_main.m" (v1446), function "cat_main" at line 70.
> In file "/Users/andreasv/spm12/toolbox/cat12/cat_run_job.m" (v1435), function "cat_run_job" at line 786.
> In file "/Users/andreasv/spm12/toolbox/cat12/cat_run_newcatch.m" (???), function "cat_run_newcatch" at line 15.
> In file "/Users/andreasv/spm12/toolbox/cat12/cat_run.m" (v1439), function "run_job" at line 720.
> In file "/Users/andreasv/spm12/toolbox/cat12/cat_run.m" (v1439), function "cat_run" at line 434.
>
> The following modules did not run:
> Failed: CAT12: Segmentation
>
> Warning: A value of class "int32" was indexed with no subscripts specified.
> Currently the result of this operation is the indexed value itself, but in a future
> release, it will be an error.
>> In gifti/subsref (line 45)
> In gifti/subsref (line 56)
> In spm_ov_mesh>mesh_display (line 192)
> In spm_ov_mesh>mesh_redraw (line 240)
> In spm_ov_mesh (line 45)
> In spm_orthviews>redraw (line 1441)
> In spm_orthviews>redraw_all (line 1454)
> In spm_orthviews (line 352)
> In spm_orthviews>repos_start (line 961)
>
>
>
Jul 29, 2019  03:07 PM | Andreas Voldstad - University of Oslo and LMU of Munich
RE: Externally preprocessed functional and structural data
Absolutely. Please see enclosed file.


The average Grey Matter outline (averaged with spm_mean) of all subjects processed in CAT12, and of selected subjects, looks fine/better than CONN when I look at it in SPM, but looks not so great for some subjects in QA plots in CONN, which made me question which one to use and if I had made some mistake in the CAT12 processing. Now I am not quite sure which dataset/preprocessing to use, based on the enclosed plots.


Best

Andreas




Originally posted by Pravesh Parekh:
Hi Andreas,

I saw your post on the SPM forum about CAT12 normalization not working out too well in the expert mode. Can you post a picture comparing the previous normalization, the expert mode normalization, and the normalization that you get from Conn (perhaps a representative slice with overlay of GM)? It would be very useful to other people as quite a few people have already preprocessed data and would like to import them to Conn rather than re-run preprocessing.

Also, there is an old post on the SPM forum discussuing CAT12 normalization among other things: https://www.jiscmail.ac.uk/cgi-bin/webad... also noteworthy are some of the points about the size of IXI template and MNI template raised here: https://www.jiscmail.ac.uk/cgi-bin/webad... (same thread).


Thanks
Pravesh

Originally posted by Andreas Voldstad:
Thank you both! That was very helpful.

Looking at the QA plots in CONN, I can't seem to get a better normalisation and better GM/WM/CSF masks from the CAT12 toolbox, so I will go with the CONN default preprocessing.

Sincerely,

Andreas
Attachment: CAT_CONN.pdf
Mar 6, 2024  10:03 PM | Mahima Rebello
RE: Externally preprocessed functional and structural data

Hello Andreas,


I am using already preprocessed SPM12 data into CONN for resting state analysis. Is it better for me do the default preprocessing in CONN ? Also, how do I import already preprocessed SPM data into CONN ?


For structural and functional data I have the smoothed images. I give them as inputs in Structural and functional. I haven't done outlier detection in SPM should I add that as preprocessing step and then in Denoising give the segmented images (csf, wm, gm ..) files as input . How will I include quality assurance, also scrubbing?


 


Thank you


Mahima


Neuroscience student