help > Seed-to-voxel within ROI analysis
Showing 1-7 of 7 posts
Dec 13, 2016 03:12 PM | Isabel Berwian
Seed-to-voxel within ROI analysis
Hello
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
Dec 13, 2016 06:12 PM | Alfonso Nieto-Castanon - Boston University
RE: Seed-to-voxel within ROI analysis
Hi Isabel,
If I am interpreting correctly, the simplest way to do that would be to perform standard seed-to-voxel analyses (between your seed and every voxel in the brain) and then simply restrict your results to only voxels within your target region of interest (you can do that, for example, from the results explorer window by clicking on 'display SPM' and then entering whem prompted your ROI file as a mask). Another possibility, if you really are not planning to look beyond the ROI voxels, is to directly select your ROI as an 'analysis mask' (in Setup.Options), so that all voxel-level analyses are restricted automatically to only voxels within your ROI.
Hope this helps
Alfonso
Originally posted by Isabel Berwian:
If I am interpreting correctly, the simplest way to do that would be to perform standard seed-to-voxel analyses (between your seed and every voxel in the brain) and then simply restrict your results to only voxels within your target region of interest (you can do that, for example, from the results explorer window by clicking on 'display SPM' and then entering whem prompted your ROI file as a mask). Another possibility, if you really are not planning to look beyond the ROI voxels, is to directly select your ROI as an 'analysis mask' (in Setup.Options), so that all voxel-level analyses are restricted automatically to only voxels within your ROI.
Hope this helps
Alfonso
Originally posted by Isabel Berwian:
Hello
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
May 4, 2020 08:05 PM | Pedro Valdes-Hernandez - University of Florida
RE: Seed-to-voxel within ROI analysis
Hi Alfonso,
Regarding this. It seems that CONN is not using the mask in Setup.Options once the whole preprocessing and estimations were done with a previous (bigger) mask.
I calculated everything with a GM mask up to the seed to voxel estimations. Then I changed my mind and decided to analyze (and thus restrict the FDR corrections) within a smaller mask (subset of the bigger GM mask). However, CONN keeps ignoring this smaller mask and is still plotting and FDR correcting across the original bigger mask.
Any solution to this?
Originally posted by Alfonso Nieto-Castanon:
Regarding this. It seems that CONN is not using the mask in Setup.Options once the whole preprocessing and estimations were done with a previous (bigger) mask.
I calculated everything with a GM mask up to the seed to voxel estimations. Then I changed my mind and decided to analyze (and thus restrict the FDR corrections) within a smaller mask (subset of the bigger GM mask). However, CONN keeps ignoring this smaller mask and is still plotting and FDR correcting across the original bigger mask.
Any solution to this?
Originally posted by Alfonso Nieto-Castanon:
Hi
Isabel,
If I am interpreting correctly, the simplest way to do that would be to perform standard seed-to-voxel analyses (between your seed and every voxel in the brain) and then simply restrict your results to only voxels within your target region of interest (you can do that, for example, from the results explorer window by clicking on 'display SPM' and then entering whem prompted your ROI file as a mask). Another possibility, if you really are not planning to look beyond the ROI voxels, is to directly select your ROI as an 'analysis mask' (in Setup.Options), so that all voxel-level analyses are restricted automatically to only voxels within your ROI.
Hope this helps
Alfonso
Originally posted by Isabel Berwian:
If I am interpreting correctly, the simplest way to do that would be to perform standard seed-to-voxel analyses (between your seed and every voxel in the brain) and then simply restrict your results to only voxels within your target region of interest (you can do that, for example, from the results explorer window by clicking on 'display SPM' and then entering whem prompted your ROI file as a mask). Another possibility, if you really are not planning to look beyond the ROI voxels, is to directly select your ROI as an 'analysis mask' (in Setup.Options), so that all voxel-level analyses are restricted automatically to only voxels within your ROI.
Hope this helps
Alfonso
Originally posted by Isabel Berwian:
Hello
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
May 4, 2020 11:05 PM | Alfonso Nieto-Castanon - Boston University
RE: Seed-to-voxel within ROI analysis
Hi Pedro,
Right, the 'analysis mask' field is really applied only at the initial 'Setup' step (by selecting only voxels within that mask for further analyses). If you want to apply a different (smaller) mask to your second-level analysis, you may do that using the 'display SPM' option mentioned in the previous mail. Alternatively, you may also use conn_module('glm',...) syntax to run any arbitrary second-level analysis, and, among other things, that allows you to explicitly select a different voxel-level mask just for that analysis (see conn_module for more details), for example using something like:
load SPM.mat; % existing second-level analysis
maskfile = '/data/mymask.nii'; % new voxel-level mask (in same space, e.g. MNI)
info = SPM.xX_multivariate;
conn_module('glm',...
'design_matrix', info.X,... % design matrix
'data', info.Zfiles,... % functional data
'contrast_between', info.C,... % between-subjects contrast
'contrast_within', info.M,... % between-conditions contrast
'mask', maskfile, ... % mask
'folder', fullfile(SPM.swd,'masked')); % output analysis folder
Best
Alfonso
Originally posted by Pedro Valdes-Hernandez:
Right, the 'analysis mask' field is really applied only at the initial 'Setup' step (by selecting only voxels within that mask for further analyses). If you want to apply a different (smaller) mask to your second-level analysis, you may do that using the 'display SPM' option mentioned in the previous mail. Alternatively, you may also use conn_module('glm',...) syntax to run any arbitrary second-level analysis, and, among other things, that allows you to explicitly select a different voxel-level mask just for that analysis (see conn_module for more details), for example using something like:
load SPM.mat; % existing second-level analysis
maskfile = '/data/mymask.nii'; % new voxel-level mask (in same space, e.g. MNI)
info = SPM.xX_multivariate;
conn_module('glm',...
'design_matrix', info.X,... % design matrix
'data', info.Zfiles,... % functional data
'contrast_between', info.C,... % between-subjects contrast
'contrast_within', info.M,... % between-conditions contrast
'mask', maskfile, ... % mask
'folder', fullfile(SPM.swd,'masked')); % output analysis folder
Best
Alfonso
Originally posted by Pedro Valdes-Hernandez:
Hi
Alfonso,
Regarding this. It seems that CONN is not using the mask in Setup.Options once the whole preprocessing and estimations were done with a previous (bigger) mask.
I calculated everything with a GM mask up to the seed to voxel estimations. Then I changed my mind and decided to analyze (and thus restrict the FDR corrections) within a smaller mask (subset of the bigger GM mask). However, CONN keeps ignoring this smaller mask and is still plotting and FDR correcting across the original bigger mask.
Any solution to this?
Originally posted by Alfonso Nieto-Castanon:
Regarding this. It seems that CONN is not using the mask in Setup.Options once the whole preprocessing and estimations were done with a previous (bigger) mask.
I calculated everything with a GM mask up to the seed to voxel estimations. Then I changed my mind and decided to analyze (and thus restrict the FDR corrections) within a smaller mask (subset of the bigger GM mask). However, CONN keeps ignoring this smaller mask and is still plotting and FDR correcting across the original bigger mask.
Any solution to this?
Originally posted by Alfonso Nieto-Castanon:
Hi
Isabel,
If I am interpreting correctly, the simplest way to do that would be to perform standard seed-to-voxel analyses (between your seed and every voxel in the brain) and then simply restrict your results to only voxels within your target region of interest (you can do that, for example, from the results explorer window by clicking on 'display SPM' and then entering whem prompted your ROI file as a mask). Another possibility, if you really are not planning to look beyond the ROI voxels, is to directly select your ROI as an 'analysis mask' (in Setup.Options), so that all voxel-level analyses are restricted automatically to only voxels within your ROI.
Hope this helps
Alfonso
Originally posted by Isabel Berwian:
If I am interpreting correctly, the simplest way to do that would be to perform standard seed-to-voxel analyses (between your seed and every voxel in the brain) and then simply restrict your results to only voxels within your target region of interest (you can do that, for example, from the results explorer window by clicking on 'display SPM' and then entering whem prompted your ROI file as a mask). Another possibility, if you really are not planning to look beyond the ROI voxels, is to directly select your ROI as an 'analysis mask' (in Setup.Options), so that all voxel-level analyses are restricted automatically to only voxels within your ROI.
Hope this helps
Alfonso
Originally posted by Isabel Berwian:
Hello
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
May 7, 2020 06:05 AM | Pedro Valdes-Hernandez - University of Florida
RE: Seed-to-voxel within ROI analysis
That look great
Thank you Alfonso
Originally posted by Alfonso Nieto-Castanon:
Thank you Alfonso
Originally posted by Alfonso Nieto-Castanon:
Hi Pedro,
Right, the 'analysis mask' field is really applied only at the initial 'Setup' step (by selecting only voxels within that mask for further analyses). If you want to apply a different (smaller) mask to your second-level analysis, you may do that using the 'display SPM' option mentioned in the previous mail. Alternatively, you may also use conn_module('glm',...) syntax to run any arbitrary second-level analysis, and, among other things, that allows you to explicitly select a different voxel-level mask just for that analysis (see conn_module for more details), for example using something like:
load SPM.mat; % existing second-level analysis
maskfile = '/data/mymask.nii'; % new voxel-level mask (in same space, e.g. MNI)
info = SPM.xX_multivariate;
conn_module('glm',...
'design_matrix', info.X,... % design matrix
'data', info.Zfiles,... % functional data
'contrast_between', info.C,... % between-subjects contrast
'contrast_within', info.M,... % between-conditions contrast
'mask', maskfile, ... % mask
'folder', fullfile(SPM.swd,'masked')); % output analysis folder
Best
Alfonso
Originally posted by Pedro Valdes-Hernandez:
Right, the 'analysis mask' field is really applied only at the initial 'Setup' step (by selecting only voxels within that mask for further analyses). If you want to apply a different (smaller) mask to your second-level analysis, you may do that using the 'display SPM' option mentioned in the previous mail. Alternatively, you may also use conn_module('glm',...) syntax to run any arbitrary second-level analysis, and, among other things, that allows you to explicitly select a different voxel-level mask just for that analysis (see conn_module for more details), for example using something like:
load SPM.mat; % existing second-level analysis
maskfile = '/data/mymask.nii'; % new voxel-level mask (in same space, e.g. MNI)
info = SPM.xX_multivariate;
conn_module('glm',...
'design_matrix', info.X,... % design matrix
'data', info.Zfiles,... % functional data
'contrast_between', info.C,... % between-subjects contrast
'contrast_within', info.M,... % between-conditions contrast
'mask', maskfile, ... % mask
'folder', fullfile(SPM.swd,'masked')); % output analysis folder
Best
Alfonso
Originally posted by Pedro Valdes-Hernandez:
Hi
Alfonso,
Regarding this. It seems that CONN is not using the mask in Setup.Options once the whole preprocessing and estimations were done with a previous (bigger) mask.
I calculated everything with a GM mask up to the seed to voxel estimations. Then I changed my mind and decided to analyze (and thus restrict the FDR corrections) within a smaller mask (subset of the bigger GM mask). However, CONN keeps ignoring this smaller mask and is still plotting and FDR correcting across the original bigger mask.
Any solution to this?
Originally posted by Alfonso Nieto-Castanon:
Regarding this. It seems that CONN is not using the mask in Setup.Options once the whole preprocessing and estimations were done with a previous (bigger) mask.
I calculated everything with a GM mask up to the seed to voxel estimations. Then I changed my mind and decided to analyze (and thus restrict the FDR corrections) within a smaller mask (subset of the bigger GM mask). However, CONN keeps ignoring this smaller mask and is still plotting and FDR correcting across the original bigger mask.
Any solution to this?
Originally posted by Alfonso Nieto-Castanon:
Hi
Isabel,
If I am interpreting correctly, the simplest way to do that would be to perform standard seed-to-voxel analyses (between your seed and every voxel in the brain) and then simply restrict your results to only voxels within your target region of interest (you can do that, for example, from the results explorer window by clicking on 'display SPM' and then entering whem prompted your ROI file as a mask). Another possibility, if you really are not planning to look beyond the ROI voxels, is to directly select your ROI as an 'analysis mask' (in Setup.Options), so that all voxel-level analyses are restricted automatically to only voxels within your ROI.
Hope this helps
Alfonso
Originally posted by Isabel Berwian:
If I am interpreting correctly, the simplest way to do that would be to perform standard seed-to-voxel analyses (between your seed and every voxel in the brain) and then simply restrict your results to only voxels within your target region of interest (you can do that, for example, from the results explorer window by clicking on 'display SPM' and then entering whem prompted your ROI file as a mask). Another possibility, if you really are not planning to look beyond the ROI voxels, is to directly select your ROI as an 'analysis mask' (in Setup.Options), so that all voxel-level analyses are restricted automatically to only voxels within your ROI.
Hope this helps
Alfonso
Originally posted by Isabel Berwian:
Hello
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
I would like to do a a seed-to-voxel analysis, but not for all voxels in the whole brain, but only for those voxel which lie within a specified ROI. It seems to me that this is not possible using the GUI or the script or am I mistaken? Originally I thought, I could do this by doing a ROI-to-ROI analysis, but Conn seems to only correlate the timeseries of my seed with the average timeseries of all voxels, or their PCA decomposition or a weighted sum, but I did not figure out how to correlate the seed timeseries with the timeseries of the voxels within the ROI.
Is it possible to do this by adjusting the source code?
Is there a specific reason why one should not do the approach I was planning to do? What is the advantage of using e.g. the PCA decomposition and what do I lose compared to looking at individual voxels?
Best,
Isabel
Oct 27, 2020 11:10 PM | Alex G
RE: Seed-to-voxel within ROI analysis
Hi Alfonso,
As a follow-up to this, I'm trying to run a seed-based connectivity analysis and examine group comparisons between patients and controls, and restrict it to an ROI (for which I have a mask saved). To do this, should I first generate a comparison between patient and controls with a given seed and then select "Display SPM" before adding in the mask? Or is it best to mask results of another analysis? My concern is that the whole-brain analysis is more stringent than a small volume correction, so I'm wondering how to specifically limit my comparisons to the activity within the ROI.
As a follow-up to this, I'm trying to run a seed-based connectivity analysis and examine group comparisons between patients and controls, and restrict it to an ROI (for which I have a mask saved). To do this, should I first generate a comparison between patient and controls with a given seed and then select "Display SPM" before adding in the mask? Or is it best to mask results of another analysis? My concern is that the whole-brain analysis is more stringent than a small volume correction, so I'm wondering how to specifically limit my comparisons to the activity within the ROI.
Sep 11, 2021 05:09 PM | Dione Q
RE: Seed-to-voxel within ROI analysis
In my second level analysis, results for seed to voxel is
successful (generates results) but ROI to ROI is unsuccessful.
The error message that appears for ROI to ROI analysis is :
ERROR DESCRIPTION:
Index exceeds array bounds.
Error in conn_process (line 5172)
newneffects=CONN_x.Results.saved.nsubjecteffects{ncontrast};
Error in conn_process (line 61)
case 'results_roi', [varargout{1:nargout}]=conn_process(17,varargin{:});
Error in conn (line 9522)
CONN_h.menus.m_results.roiresults=conn_process('results_ROI',CONN_x.Results.xX.nsources,CONN_x.Results.xX.csources);
Error in conn (line 7636)
else conn gui_results_r2r;
Error in conn_menumanager (line 121)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN19.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2018b
project: CONN19.b
How do I get ROI to ROI analysis to work? and does anyone know what this error means?
Background information:
I'm using FMRIprep preproceessing data, denoising and first level analysis worked out well.
I'm only using ROIs from the ones provided in CONN
I'm only using ROIs from those that are provided in CONN
The error message that appears for ROI to ROI analysis is :
ERROR DESCRIPTION:
Index exceeds array bounds.
Error in conn_process (line 5172)
newneffects=CONN_x.Results.saved.nsubjecteffects{ncontrast};
Error in conn_process (line 61)
case 'results_roi', [varargout{1:nargout}]=conn_process(17,varargin{:});
Error in conn (line 9522)
CONN_h.menus.m_results.roiresults=conn_process('results_ROI',CONN_x.Results.xX.nsources,CONN_x.Results.xX.csources);
Error in conn (line 7636)
else conn gui_results_r2r;
Error in conn_menumanager (line 121)
feval(CONN_MM.MENU{n0}.callback{n1}{1},CONN_MM.MENU{n0}.callback{n1}{2:end});
CONN19.b
SPM12 + DEM FieldMap MEEGtools
Matlab v.2018b
project: CONN19.b
How do I get ROI to ROI analysis to work? and does anyone know what this error means?
Background information:
I'm using FMRIprep preproceessing data, denoising and first level analysis worked out well.
I'm only using ROIs from the ones provided in CONN
I'm only using ROIs from those that are provided in CONN