Issues loading SUMA atlas

Good morning, I hope everyone is doing well :slight_smile:
2 questions, please:

  1. I recently updated to MATLAB 2024a. When trying to load a SUMA atlas, I received errors in the import_label.m line 27
    import sun.misc.BASE64Decoder;

I tried commenting that line of code and using instead the following.
import java.util.Base64;
This solved my issue. However, is it the right thing to do, or by changing my MATLAB version I removed some encoding and decoding Base64 data?

  1. When I try loading the SUMA surfaces it doesn't yield an error but it does not produce any output. Looking at the code in_label_dset.m I noticed that the file is read properly but no labels are read. Am I using the wrong SUMA files?

Thank you!

Hi @CamiloCastelblanco, the sun.misc were dropped in JDK9, but should be ok in JDK8 that is the one shipped with MatlabR2024a
Java Platform, Standard Edition Oracle JDK 9 Migration Guide, Release 9

Could it be that you changed the JRE that Matlab uses?

Run the command below to know which version of java is being used:

>> version -java

You can change the version with the function jenv
Set Java path for MATLAB - MATLAB jenv

Awesome thank you for your reply, @Raymundo.Cassani. This is very helpful and solves my first issue.

When trying to read SUMA files (with the JAVA issue fixed), Brainstorm doesn't read any labels. It does not yield any errors per se, but when I run the code manually I can see that no labels are identified. Do you have a recommended way I can troubleshoot this?

Thank you!

SUMA .dset files are text files. Could you check their content to see they are formatted as expected in Brainstorm?

Beginning and end of an example .dset file

#  ni_type = "2*int"
#  ni_dimen = "16226"
#  data_type = "Node_ROI_data"
# >
 10 5
 14 5
 15 5
 17 5
 18 5
 159489 2

Also, it seem these atlases are divided in two files, one for left and one for right hemisphere.
Do you have two files per atlas? (one for left and one for right hemisphere)

Thank you for the example .dset!
I do have 2 .dset files per atlas; is that counterproductive?

One of them have similar properties to your example, but the labels aren't organized similarily:

I also have a 1D.roi file that looks more similar to the annotations you show, and to .annot files.

Would you recommend me to concatenate the .dset into one file?
Is ni_dimen in your example = number of vertices of the brain mesh? Maybe I have an issue here.

Thank you very much, Raymundo!

It may cause troubles. Usually, as the two hemispheres are separated surfaces, there atlas are separated as well, however this implies that there are two vertices with the number 1 (one in the L and one in the R hemisphere).

In Brainstorm, both hemispheres are saved as a single surface, [Left+Right].
So you would need to an offset of number_vertices_left_hemisphere to the vertex numbers of the right atlas. Then you can import them directly in Brainstorm.

But Brainstorm expects one atlas comprising scouts in both hemispheres.

1 Like