
Hello, I am new to Dipy and this email list. I am working on post-processing streamlines created with the Tractoflow <https://tractoflow-documentation.readthedocs.io/en/latest/> pipeline. The pipeline’s final output is a whole brain tractogram .trk file created with Dipy code. As a next step, I would like to separate the whole brain tractogram into different white matter bundles, particularly the 80 bundles included in bundle_atlas_hcp482. Ultimately, I would like to use these extracted bundles to produce the AFQ-like tract profiles. <https://dipy.org/documentation/1.1.0./examples_built/afq_tract_profiles/> Since I am trying to script as much of this as possible, I would like to use the command line version of RecoBundles (dipy_recobundles <https://dipy.org/documentation/1.1.1./reference_cmd/dipy_recobundles/>). I have three questions about running this command. 1) dipy_recobundles takes as required inputs a whole brain tractogram and one .trk model file. Is it possible to, without looping the command, segment the whole brain tractogram with all of the atlas bundles? 2) The RecoBundles tutorial listed on the Dipy website <https://dipy.org/documentation/0.16.0./examples_built/bundle_extraction/> includes a registration step to make sure the target and model brains are in the same space. Is this step included in the command-line version, and if not is there a command that will do this (I also have the whole brain model from the hcp482 atlas for this purpose)? 3) Am I using the right command to do what I described in the first paragraph? I am not sure I understand the difference between dipy_recobundles and dipy_labelsbundles <https://dipy.org/documentation/1.1.1./reference_cmd/dipy_labelsbundles/>. I am running the latest version of Dipy (1.1.1) from the Brainlife docker container <https://hub.docker.com/r/brainlife/dipy> on a linux HPC. I would be happy to provide more information as needed. Thank you, Steven -- Steven Meisler, MSE <https://scholar.harvard.edu/steven-meisler>PhD Student in Speech and Hearing Bioscience and Technology <https://www.hms.harvard.edu/dms/shbt/> Harvard Medical School / MIT smeisler@g.harvard.edu <mailto:smeisler@g.harvard.edu> | (216) 215-3805

Hello Steven, Thank you for your interest in DIPY and RecoBundles. RecoBundles requires target tractogram to be in the same space as the model bundles to be extracted. You can use *whole_brain_MNI.trk *atlas for this purpose. You can register your input tractogram to the atlas by running dipy_slr command line: - *dipy_slr whole_brain_MNI.trk target_tractogram.trk * The output transformed tractogram will be saved as *moved.trk* by default. You can run RecoBundles to extract all 80 model bundles at once by running the dipy_recobundles workflow in the following way: - *dipy_recobundles moved.trk bundles/*.trk --mix_names --out_dir "output"* *dipy_recobundles * workflow will extract all the tracts in the folder ' *bundles'.* Here, --mix_names flag will save extracted bundles with different names. dipy_recobundles generates output in common space (in this case, MNI space). If you prepare to go back to the subject's original space. You need to run *dipy_labelsbundles*. RecoBundles workflow saves .npy files as well for every extracted bundle. Which has bundle coordinates in the native space. To transform extracted bundles to target tractogram's original space you can run dipy_labelsbundles command line: - *dipy_labelsbundles target_streamlines.trk output/*.npy --mix_names* You can also check all the parameter options of each commandline/workflow like this: - *dipy_recobundles -h* Lastly, I would recommend using updated bundle atlas. You can download it from *here* <https://figshare.com/articles/Atlas_of_30_Human_Brain_Bundles_in_MNI_space/1...>. This has 30 selected bundles that we prefer out of the 80 bundles you currently have. Let us know if you have any questions about the command lines. Thanks, Bramsh On Mon, Apr 20, 2020 at 1:11 PM Steven Meisler <smeisler@g.harvard.edu> wrote:

Hello Steven, Thank you for your interest in DIPY and RecoBundles. RecoBundles requires target tractogram to be in the same space as the model bundles to be extracted. You can use *whole_brain_MNI.trk *atlas for this purpose. You can register your input tractogram to the atlas by running dipy_slr command line: - *dipy_slr whole_brain_MNI.trk target_tractogram.trk * The output transformed tractogram will be saved as *moved.trk* by default. You can run RecoBundles to extract all 80 model bundles at once by running the dipy_recobundles workflow in the following way: - *dipy_recobundles moved.trk bundles/*.trk --mix_names --out_dir "output"* *dipy_recobundles * workflow will extract all the tracts in the folder ' *bundles'.* Here, --mix_names flag will save extracted bundles with different names. dipy_recobundles generates output in common space (in this case, MNI space). If you prepare to go back to the subject's original space. You need to run *dipy_labelsbundles*. RecoBundles workflow saves .npy files as well for every extracted bundle. Which has bundle coordinates in the native space. To transform extracted bundles to target tractogram's original space you can run dipy_labelsbundles command line: - *dipy_labelsbundles target_streamlines.trk output/*.npy --mix_names* You can also check all the parameter options of each commandline/workflow like this: - *dipy_recobundles -h* Lastly, I would recommend using updated bundle atlas. You can download it from *here* <https://figshare.com/articles/Atlas_of_30_Human_Brain_Bundles_in_MNI_space/1...>. This has 30 selected bundles that we prefer out of the 80 bundles you currently have. Let us know if you have any questions about the command lines. Thanks, Bramsh On Mon, Apr 20, 2020 at 1:11 PM Steven Meisler <smeisler@g.harvard.edu> wrote:
participants (2)
-
Bramsh Qamar
-
Steven Meisler