BCBToolkit Questions

Hi Chris, sorry for the delay…
I have Sonoma 14.5; could that be the problem ?

Actually, I just downloaded and unzipped it on Sonoma :face_with_raised_eyebrow:. Nevertheless Chris and I will redo the archive early September to make sure this problem does not happen again. Sorry for the inconvenience.

Dear Chris and Michel,
I am currently trying to run the Normalization tool in the BCBToolKit, but I encountered an issue where the process fails with the following error message:

/path//BCBToolKit/Tools/binaries/ANTs/antsBrainExtraction.sh: line 105: 27401 was killed

It appears that the antsBrainExtraction.sh script is being terminated unexpectedly, and I suspect it could be related to memory or resource limitations. I have checked the usual suspects such as memory usage and available disk space, but I am still unable to resolve the issue.
Could you please provide guidance on how to proceed? Are there any specific settings I should modify to prevent this process from being killed?
Thank you in advance for your help.
Best regards,
David

Hi David,

Sorry you’re having this issue. And sorry the error message is not more helpful. It does indeed look like a resource issue to crash so abruptly like that. Have you been able to track your disk memory or RAM while running the normalization? You can do that with things like top or htop.
There is a -z option for antsBrainExtraction.sh that could be added (it doesn’t provide the expected results but if it runs through it would suggest the script should run on the data and that would probably confirm the resource problem).

You can add it in the script Tools/script/normalize.sh where it calls antsBrainExtraction.sh, at the end of that command. (Don’t forget to remove it after the tests or it will mess up the brain extraction)

Best,
Chris

Hi Chris,
I’ve resolved the previous issue, it turned out that I hadn’t allocated enough RAM to the virtual machine. Thank you very much for your help!
However, I’ve encountered a new problem. I’m trying to use the disconnectome map function. I placed the lesion mask in the “other directory” as required, but the resulting processed mask is not binary—it contains decimal values . How I can ensure the mask remains binary?
Best regards,
David

This is normal as the disconnectome produces maps of probability of disconnection.
If you want a binary map you can threshold it (e.g. >0.2) and binarise it with FSL. Let me know if you need some help with that step.
Cheers

Mich

Thank you for your reply! Just to clarify, the issue is not with the disconnectome map itself, but with the lesion mask after running the normalization tool. The normalized lesion mask is not binary—it contains decimal values.
Thanks again for your assistance!
Best,
David

Ha sorry got you!

This because when you non linearly aligned your lesion in the MNI space some voxels falls in between and therefore are tagged with a value between 0 and 1 according to the proportion of involvement of that voxels in the MNI space. You can threshold and binarise your lesion map at 0.5 (this would be the equivalent of doing a normalisation using the nearest neighbour interpolation)

Hope this helps!
Mich

Hi Mich,

Thanks for the clarification! That makes perfect sense now. I’ll go ahead and threshold the lesion map at 0.5 as you suggested. I really appreciate your help with this!

Best regards,
David

Hello.

I’m having trouble with the output of “Disconnectome maps”.

I have drawn Lesion on a T1 image converted with the command “Normalization” on the MNI152 template and put the mask image of Lesion in the command “Disconnectome maps”.
I get an “End!” notification and the message “Data properly written in [out put folder]“, but the result is not output.
A folder named “log” is created, but it does not contain anything. Other image data such as NIfTI data are not output. Since no error code is generated, I cannot tell which part of the operation was incorrect.

If you know the cause, please let me know.

Best regards,
Shun Sawai

Hi Shun,

It is weird indeed. Is your output folder different from the input folder?

Dear, Chris

Thank you for replying.
Whether the input and output folders are the same or different, an empty folder named “log” is created.

Is it correct to map lesion to T1 registered in the MNI template output in “Normalized” command and put in “Disconnectome maps”?
Do I need to do any additional work?

By the way, I’m using M3 MacbookAir and macOS is Sonoma 14.6.1.

Dear BCBToolKit Maintainers,

I am having trouble with disconnectome maps. Therefore, I used the fslmaths function of FSL to analyze the NIfTI data of the MNI template showing the disrupted white matter fibers output by the tractotron.
I would like to know if the results of the FSL analysis are valid or not, as follows: The Disconnectome maps command in BCBToolKit says that the analysis was successful, but nothing is output.

  1. Merging multiple NIfTI data (data where white matter fibers impaired by the MNI template are indicated by 0 to 1 with the fslmaths function.

  2. Averages the merged data with the fslmaths function.

  3. Cut 0.5 as a threshold value from the data averaged by fslmaths function.

Before the step 1, I also attempted to unify the disabled side using the fslswapdim function, because in my data, there were people with right hemisphere disability and people with left hemisphere disability. Is this procedure legitimate?

Hey, sorry for the delay. Just back from holiday.
I’m sorry but we added this atlas upon request from our reviewers and are not in charge of its maintenance. All I could find is this page JHU DTI-based white-matter atlases. Good luck

Hi Shun,

I’m sorry I am a bit confused with your request.
I can run the analysis locally if you have any trouble. Feel free to reach out michel.thiebaut@gmail.com

I would rather avoid flipping data in general.

@sawai.neuroreha did you use the Normalize module with the folder of T1 images as input and then used the “Apply transformation to other” option with the folder of the lesion masks as input?

If so, this is a way to do it so it should have worked. Have you verified the normalized brains and masks align well?

We’ve been having issues with M3 laptops so maybe it could be that too.

When I have some time I will try to make a Docker image to simplify the BCBToolkit setup, hopefully that will help.

No worries! I was wondering if the missing tracts would be available for future use with Tractotron, but I suppose not. Thanks for the reply.

Dear Dr. Chris Foulon,

Thanks for replying to my message.
I did not check the “Apply transformation to other” box during Normalization processing. Is it correct to specify the folder where the lesion data is stored in this part?

Sorry I am not familiar with white matter fiber bundle analysis.

Yes, you should use “Apply transformation to other” (on the lesions folder) when you are normalizing your T1 images if you also need to align your lesions masks to be in the same space as your normalized T1s (if you cannot re-segment the lesions on the normalized T1 which would be better but time consuming).

Normalize, by default, takes T1 images and aligns them to the MNI152 T1 template. Lesion masks are usually binary images, or at least they do not contain the same type of values as in a T1 images (first they do not actually contain a brain). The normalization computes what would be the transformation from your input image to have roughly the same size, shape, and alignment as the template and to do that it needs to find similarities between the input and the template (a brain, the substructures and landmarks). A lesion mask doesn’t have any similarity to the template and thus cannot be directly aligned to the template, that is likely why the disconnectome didn’t work because the lesions you gave it were probably completely wrong (probably outside of the brain).