OspreySeg Error

Hi all,

Does anyone know why I might be getting this error using OspreySeg?

A zipped version of the file is in the VoxelMasks directory.

I only started getting this error when I added second timepoints to a couple of my subjects. Sub-02 is one of the subjects that has a second timepoint, I wonder if this is related. I would appreciate your help!

Best,
Hannah

Update – I ran it again using only the subjects who had a second timepoint and it worked! For clarification, do all subjects need to have their second timepoint for this to function correctly?

Hard to answer without understanding the problem better.

  1. What does “second time point” mean here? Do they get two MRS scans back-to-back or in two different sessions?
  2. If the latter, did you use ses labels for both the MRS data and the T1s to differentiate? (I don’t see it in the filename of the error message)

Hi @HannahFB,
I’ve had a similar problem with OspreySeg and vol_image data when I’ve done these steps already and then added some new subjects/sessions. In this case some data are already zipped and other not and than the error occurs.
You can try to replace
gzip(fullfile(MaskDir,[MaskNameSPM152, MaskExt]));
delete(fullfile(MaskDir,[MaskNameSPM152, MaskExt]));
with something like:
if ~strcmp(MaskExt,‘.gz’) && isfile(fullfile(MaskDir,[MaskNameSPM152, MaskExt]))
gzip(fullfile(MaskDir,[MaskNameSPM152, MaskExt]));
delete(fullfile(MaskDir,[MaskNameSPM152, MaskExt]));
end
In that case, only existing datasets not ending in ‘gz’ should be zipped.

Best,
Heiner

Thank you for your reply and sorry for the delay!

  1. Two different sessions, ~8 months apart.

  2. I noticed that the ses label was not in the error message as well.

I do have ses labels on the T1s and on the MRS folders. I was copying the organization of the example .SDAT data which doesn’t have the individual MRS data sets labeled by session. Could that be the problem?

You should follow the full naming conventions for BIDS - yes, all filenames need to carry the ses label if you have multiple sessions:

Magnetic Resonance Spectroscopy - Brain Imaging Data Structure 1.10.0
and
Common principles - Brain Imaging Data Structure 1.10.0