help
help > RE: ROI problem (csf)
Feb 13, 2016 03:02 PM | Alfonso Nieto-Castanon - Boston University
RE: ROI problem (csf)
Dear Jalmar,
Yes, your interpretation is exactly correct, currently binarization (thresholding the White/CSF masks) is taken as a part of the erosion step so if you skip this erosion step (setting the erosion level to zero) the White/CSF masks will not be binarized/thresholded either (CONN will use your raw CSF/White masks for ROI data extraction). You are also right that it is probably a good idea to allow users to keep the thresholding step even when removing the erosion step. To do that simply change the line in conn_process.m that reads "if ERODE>0" to "if 1". That will allow you to: a) skip both the thresholding and erosion step (e.g. set the erosion value to 0 and the threshold value to -inf); or b) skip only erosion but keep the thresholding step (set the erosion value to 0 and keep the threshold value to your desired threshold). I will keep this change in the next release as well since that seems to me perhaps to be a more intuitive behavior. Thanks for the suggestion, and let me know your thoughts
Best
Alfonso
Originally posted by Jalmar Teeuw:
Yes, your interpretation is exactly correct, currently binarization (thresholding the White/CSF masks) is taken as a part of the erosion step so if you skip this erosion step (setting the erosion level to zero) the White/CSF masks will not be binarized/thresholded either (CONN will use your raw CSF/White masks for ROI data extraction). You are also right that it is probably a good idea to allow users to keep the thresholding step even when removing the erosion step. To do that simply change the line in conn_process.m that reads "if ERODE>0" to "if 1". That will allow you to: a) skip both the thresholding and erosion step (e.g. set the erosion value to 0 and the threshold value to -inf); or b) skip only erosion but keep the thresholding step (set the erosion value to 0 and keep the threshold value to your desired threshold). I will keep this change in the next release as well since that seems to me perhaps to be a more intuitive behavior. Thanks for the suggestion, and let me know your thoughts
Best
Alfonso
Originally posted by Jalmar Teeuw:
Dear Alfonso,
We ran into a issue when processing our data without performing erosion on the CSF maps in both CONN15g+patch and CONN15h. We set the cwthreshold option to [0.5 1 0.5 0] for our analysis. But it appears that if no erosion is performed on a tissue map, no thresholding is applied to that tissue map either. Consequently, if I understand correctly, the denoising would extract eigenvariate components based on non-zero voxels in the unthresheld CSF tissue map, which in case of our tissue maps would cover most of the brain (including gray matter voxels which have been labeled as also containing a low fraction of CSF). I believe this could potentially remove signal of interest from GM voxels during denoising.
I tried to trace back where threshold (and erosion) was applied to the tissue maps. In conn_process.m:586, during the Setup data segmentation/extraction step, there is a conditional statement that checks if ERODE>0 before performing thresholding, and subsequently erosion, on the tissue map. I tested a few cases and could only conclude that if no erosion is request, no thresholding was applied to the tissue maps either.
We tested the pipeline by manually performing thresholding on the CSF tissue maps after preprocessing and prior to the Setup data extraction. The variance explained by the CSF components are more constrained to regions with CSF (which I guess is to be expected) and the results make more sense. When similarly performing manual thresholding on the WM tissue maps (for which CONN does perform thresholding and erosion as requested) it did not affect the results.
Could you confirm if CONN performs thresholding of the tissue maps, even when no erosion is requested? Or are we messing up the results by manually performing thresholding of the tissue maps?
Kind regards,
Jalmar
Originally posted by Alfonso Nieto-Castanon:
We ran into a issue when processing our data without performing erosion on the CSF maps in both CONN15g+patch and CONN15h. We set the cwthreshold option to [0.5 1 0.5 0] for our analysis. But it appears that if no erosion is performed on a tissue map, no thresholding is applied to that tissue map either. Consequently, if I understand correctly, the denoising would extract eigenvariate components based on non-zero voxels in the unthresheld CSF tissue map, which in case of our tissue maps would cover most of the brain (including gray matter voxels which have been labeled as also containing a low fraction of CSF). I believe this could potentially remove signal of interest from GM voxels during denoising.
I tried to trace back where threshold (and erosion) was applied to the tissue maps. In conn_process.m:586, during the Setup data segmentation/extraction step, there is a conditional statement that checks if ERODE>0 before performing thresholding, and subsequently erosion, on the tissue map. I tested a few cases and could only conclude that if no erosion is request, no thresholding was applied to the tissue maps either.
We tested the pipeline by manually performing thresholding on the CSF tissue maps after preprocessing and prior to the Setup data extraction. The variance explained by the CSF components are more constrained to regions with CSF (which I guess is to be expected) and the results make more sense. When similarly performing manual thresholding on the WM tissue maps (for which CONN does perform thresholding and erosion as requested) it did not affect the results.
Could you confirm if CONN performs thresholding of the tissue maps, even when no erosion is requested? Or are we messing up the results by manually performing thresholding of the tissue maps?
Kind regards,
Jalmar
Originally posted by Alfonso Nieto-Castanon:
Hi Sherihane and
Jalmar,
I am attaching a patch that allows defining different threshold/erosion options for the WM and CSF ROIs (this patch is for release 15g, copy the attached file to the conn distribution folder overwriting the file with the same name there). To define these options you may use the syntax:
options = [.5 1 0 0];
conn_batch('Setup.cwthreshold',options);
The four values in the vector "options" indicate:
options(1): Threshold for binary White Matter mask (default .5)
options(2): Number of binary-erosion steps for White Matter mask (default 1)
options(3): Threshold for binary CSF mask (default .5)
options(4): Number of binary-erosion steps for CSF mask (default 1)
The example above, then, would leave the default options for the White Matter mask while disabling the erosion step for the CSF mask.
Hope this helps and let me know if you run into any issues
And regarding the question about patches and releases, yes, each CONN update/release always includes all of the patches that may have been created for the previous release, and the next release should be out some time next week (we typically try to follow roughly a monthly-update schedule but this one has taken a little longer than usual)
Best
Alfonso
Originally posted by Jalmar Teeuw:
I am attaching a patch that allows defining different threshold/erosion options for the WM and CSF ROIs (this patch is for release 15g, copy the attached file to the conn distribution folder overwriting the file with the same name there). To define these options you may use the syntax:
options = [.5 1 0 0];
conn_batch('Setup.cwthreshold',options);
The four values in the vector "options" indicate:
options(1): Threshold for binary White Matter mask (default .5)
options(2): Number of binary-erosion steps for White Matter mask (default 1)
options(3): Threshold for binary CSF mask (default .5)
options(4): Number of binary-erosion steps for CSF mask (default 1)
The example above, then, would leave the default options for the White Matter mask while disabling the erosion step for the CSF mask.
Hope this helps and let me know if you run into any issues
And regarding the question about patches and releases, yes, each CONN update/release always includes all of the patches that may have been created for the previous release, and the next release should be out some time next week (we typically try to follow roughly a monthly-update schedule but this one has taken a little longer than usual)
Best
Alfonso
Originally posted by Jalmar Teeuw:
We too would be interested in setting the
threshold and erosion levels for CSF and WM separately. We require
slightly more lenient settings for CSF in our paediatric dataset
with relatively large voxel size; white matter is fine with default
settings.
Will this patch (and any other patches distributed through this forum since the release of 15.g) be included in the next release of CONN? We want to start processing the datasets soon, but for the purpose of replication & reproducibility we'd prefer to cite an official release of CONN rather than having to mention all the separate patches applied to CONN 15.g.
Will this patch (and any other patches distributed through this forum since the release of 15.g) be included in the next release of CONN? We want to start processing the datasets soon, but for the purpose of replication & reproducibility we'd prefer to cite an official release of CONN rather than having to mention all the separate patches applied to CONN 15.g.
Threaded View
| Title | Author | Date |
|---|---|---|
| sherihane Bensemmane | Nov 30, 2015 | |
| Alfonso Nieto-Castanon | Nov 30, 2015 | |
| sherihane Bensemmane | Dec 1, 2015 | |
| Alfonso Nieto-Castanon | Dec 1, 2015 | |
| sherihane Bensemmane | Dec 2, 2015 | |
| sherihane Bensemmane | Dec 2, 2015 | |
| Alfonso Nieto-Castanon | Dec 2, 2015 | |
| Jalmar Teeuw | Dec 2, 2015 | |
| Alfonso Nieto-Castanon | Dec 3, 2015 | |
| Jalmar Teeuw | Feb 8, 2016 | |
| Alfonso Nieto-Castanon | Feb 13, 2016 | |
| Jalmar Teeuw | Feb 15, 2016 | |
| Alfonso Nieto-Castanon | Feb 17, 2016 | |
| Bob Kraft | Jun 14, 2016 | |
| Alfonso Nieto-Castanon | Jun 14, 2016 | |
| Bob Kraft | Jun 22, 2016 | |
| Jalmar Teeuw | Dec 4, 2015 | |
| sherihane Bensemmane | Dec 3, 2015 | |
