Dear Bst Team:
As far as I know,Brainstorm software have an important function is Export to SPM8/SPM12(volumn),However, this function is only available for 15,002 dipoles across the entire cerebral cortex. Now I have defined a Scout as my ROI. Again, I just want to apply this function to ROI rather than to the entire cerebral cortex and hope the resulting data will be [x y z * Time dimension].**
Hope to get your answer.
Your sincerely,
This function exports a source file from the Brainstorm database (surface or volume), to a .nii volume.
If you want to set to zero some values (maybe all the values except for the ones in a given scout), you need to do this manually on the file before using this process.
Maybe something like:
Compute your source file using the advanced option "Full results"
Right-click on the source file > File > Export to Matlab > "ResultsMat"
Right-click on the cortex surface > File > Export to Matlab > "CortexMat"
Look for the atlas index (iAtlas) and scout index (iScout) of your scout of interest
Get the indices of the scout vertices: iVerticesScout = CortexMat.Atlas(iAtlas).Scout(iScout).Vertices;
Get all the other vertices:
`iVerticesOther = setdiff(1:length(CortexMat.Vertices), iVerticesScout )
Set the source values to zero: ResultsMat.ImageGridAmp(iVerticesOther, : ) = 0;
Change the file comment: ResultsMat.Comment = [ResultsMat.Comment, ' zero'];
Import it as a new file in the database: right-click on the FOLDER containing the original source file > File > Import from Matlab > ResultsMat