How to multiple input nii file segmentation through CAT12

Dear Brainstorm Team,

I am currently working with 782 MRI images in .nii.gz format and using CAT12-based segmentation methods. However, I find it challenging to repeatedly input each image into the protocol manually. I would like to automate this process to handle multiple inputs efficiently.

While I have referred to the following links:

  1. Scripting Tutorial
  2. Pipeline Editor Tutorial
  3. Loop over subjects

I am having difficulty understanding how to implement this for my case. Could you provide guidance or resources for scripting or using the GUI for this purpose?

Best regards,
LCY

Were you able to generate one script for one subject?

It should be straightforward afterward, once you have the script for one subject you can add a for loop and go over all your subjects.

Thank you for reply to my question.

This is my brainstorm UI in the matlab.

How to make the new script in the subject?

You can open the process tab,
Click on the Run button, then select Import> Anatomy > Segment with Cat12, and then select the subject you want to segment.

From this panel, you can generate the associated script for the selected subject,
and then change the script to loop over all your subjects.

Thank you tmednai we solved this problem

1 Like

:sunglasses:
It's great to hear it; thank you for the feedback!