Hi,
I wonder how I can project the MRS voxel to the MNI space with Osprey?
If I provide the anatomical image in native space, then they align perfectly. But if I provide the anatomical image in MNI space, then they misalign where the MRS voxel is still in native space instead of normalizing to the template.
Another thing, after the processing, I can not use the osp_plotVoxelOverlap function because the overlapfile does not exist. What did I miss in the job file? Thank you! (Osprey 2.4.0 with Matlab2022b)
In the jobfile you should include the MRS data and T1 images in subject space. And you have to make sure that there are no SPM segmentation results from a prior SPM/Osprey analysis in the output folder.
Afterward, you should be able to run the osp_plotVoxelOverlap function. See more details about options for this function in this post (Osprey Voxel Overlap Heatmap Problem).
That is strange. Are you sure that you have deleted all old SPM results before running it? I’ll double-check on my side if there could be any other reason why it is not created.
If the OspreySeg is working correctly it will already produce the MRS voxel in MNI space. This is used to generate the overlap plot.
Yes - Osprey automatically extracts the header information including the number of averages and the number of points.
Looks like @Wang and I are having similar issues with OspreySeg. I ran a few subjects with a debug breakpoint at line 491 of OspreySeg, and the DeformField value was 0, so the overlap image is not being created. Stepping through OspreySeg, I think the issue is at line 294: should PreFix be PreFixMask?
If you run those subjects do you actually see the SPM segmentation being run by looking at the console? And are the files with ‘_spm12-transforamtion_field’.nii actually created in the Output folder?
Yes, the segmentation runs and outputs the transformation field. The voxel masks and seg maps are created for each subject, but the MNI voxels and the overlap voxel are not created. I changed line 294 to PreFixMask and re-ran the subjects (deleted the old segmentation first), and it generated the voxel overlap image and the individual subjects’ MNI voxel images.
Thanks for figuring that out! I guess this slipped my testing case because I usually have fully BIDSified data and don’t end up in this part of the if statement.