Comments (10)
So far there is no option to only track a specific bundle. You could adapt line 132 in bin/Tracking
and give it a list containing only the bundles you want to e.g. bundles = ['CC_1', 'CC_2', 'CC_3', 'CC_4', 'CC_5', 'CC_6', 'CC_7']
from tractseg.
Thanks!
from tractseg.
Sorry, but I am completely new to this, so I have another question! How would you edit the bin/Tracking
file in docker? I am assuming this is a file inside the docker container, but when I executed ls bin
there was no file called Tracking.
from tractseg.
The file is here /usr/local/bin/Tracking
. Not sure if it works if you just edit it, because this is not the original source file, but the location where it was installed to by pip.
And I guess if you change it this change will not be saved in the docker container after exiting from the interactive session.
So unfortunately with docker it is not that easy. To make it properly you would have to rebuild the docker container and in the dockerfile install your own modified TractSeg version instead of the official TractSeg.
Would be easier without docker. Just change the source code. Then do pip install -e .
inside of the source directory.
from tractseg.
Just wanted to point out a potential bug - I ran TractSeg on a VMware CentOS 7 system with all the pre-requisites installed. Tractseg gave an error:
`[fsluser@localhost tractseg]$ TractSeg -i dwi.nii.gz --raw_diffusion_input --preprocess --verbose
Creating brain mask...
Moving input to MNI space...
Creating brain mask...
Creating peaks (1 of 3)...
Traceback (most recent call last):
File "/home/fsluser/mrtrix3/bin/dwi2response", line 102, in <module>
if int(image.statistic('mask.mif', 'count', '-mask mask.mif')) == 0:
ValueError: invalid literal for int() with base 10: '236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 236517 '
Creating peaks (2 of 3)...
dwi2fod: [ERROR] no data in matrix file "tractseg_output/response.txt"
dwi2fod: [ERROR] CSD algorithm expects second argument to be the input response function file
Creating peaks (3 of 3)...
sh2peaks: [ERROR] failed to open key/value file "tractseg_output/WM_FODs.mif": No such file or directory
sh2peaks: [ERROR] error opening image "tractseg_output/WM_FODs.mif"
Traceback (most recent call last):
File "/usr/bin/TractSeg", line 303, in <module>
main()
File "/usr/bin/TractSeg", line 201, in main
data_img = nib.load(peak_path)
File "/usr/lib/python2.7/site-packages/nibabel/loadsave.py", line 42, in load
raise FileNotFoundError("No such file or no access: '%s'" % filename)
nibabel.py3k.FileNotFoundError: No such file or no access: 'tractseg_output/peaks.nii.gz'
`
After finding this post on the Mrtrix forum, and responses to it, I was able to figure out what was happening. When running the TractSeg command, inside the dwi2response-tmp directory, files called dwi.mif and mask.mif are created. From what I understand, mask.mif is FSL-generated nodif_brain_mask.nii.gz copied. When I run mrstats:
[fsluser@localhost dwi2response-tmp-SXSIY2]$ mrstats dwi.mif -info
mrstats: [INFO] opening image "dwi.mif"...
mrstats: [INFO] image "dwi.mif" opened with dimensions 90x108x90x48, voxel spacing 2x2x2x7.2000000000000002, datatype Float32LE
[fsluser@localhost dwi2response-tmp-SXSIY2]$ mrstats mask.mif -info
mrstats: [INFO] opening image "mask.mif"...
mrstats: [INFO] image "mask.mif" opened with dimensions 90x108x90x55, voxel spacing 2x2x2x7.2000000000000002, datatype Bit
The dimensions of dwi.mif and mask.mif are different which might be causing the problem.
I commented out lines 87, 88, 95-99 in dwi2response, essentially forcing Mrtrix to generate its own mask.mif and that has solved the error.
However, due to memory errors, I wasn't able to run the complete TractSeg command and track specific bundles according to your suggestion above. On to that now!
from tractseg.
I was not able to reproduce this problem. When running on ubuntu 16.04 and using mrtrix 3.0 RC3 and fsl build 509 it works fine.
from tractseg.
I don't know if it has got anything to do with the fact that I'm running TractSeg on a virtual machine - it is the VMWare CentOS 7 installation that comes with FSL download; and with Mrtrix 3.0 RC3 as well.
from tractseg.
The file is here
/usr/local/bin/Tracking
. Not sure if it works if you just edit it, because this is not the original source file, but the location where it was installed to by pip.
And I guess if you change it this change will not be saved in the docker container after exiting from the interactive session.
So unfortunately with docker it is not that easy. To make it properly you would have to rebuild the docker container and in the dockerfile install your own modified TractSeg version instead of the official TractSeg.
Would be easier without docker. Just change the source code. Then dopip install -e .
inside of the source directory.
This works; I can now track just the corpus callosum. I also wanted to ask if there is a way to do something similar for the TractSeg command - while creating the endings_segmentations, bundle_segmentations etc.. Is there a way to segment just the corpus callosum? I have been looking at the code but couldn't figure it out. This is just to save time if possible since I plan to do some batch processing on a lot of images.
from tractseg.
TractSeg
is segmenting all bundles / bundle-endings at the same time. Doing only one bundle would not reduce the runtime.
from tractseg.
Ok, thanks!
from tractseg.
Related Issues (20)
- loss become minus when train my own TOM model
- Definition of AF and SLF-III HOT 2
- Apply TractSeg to the study specific population template using the peaks of the spherical harmonic function at each voxel as input HOT 9
- error message when tracking HOT 10
- About trk_2_binary.py HOT 4
- No such file or no access "template/TOM/bundle_segmentations/AF_left.nii.gz HOT 1
- Very minor setup.py problem HOT 1
- About bundle_masks.nii.gz
- Plot3D error HOT 1
- CUDA error with M1 chip HOT 2
- Failed to install TractSeg in Ubuntu18 HOT 1
- [Explanation] Training slice-wise and predicting subject-wise? HOT 2
- EOFError: Ran out of input HOT 6
- download_all_pretrained_weights does not flag when it cannot download to folder HOT 1
- Tractometry results plots with negative average metric values HOT 3
- Training Process Question HOT 2
- Boundles output empty or not well segmented HOT 2
- Tracking issue : TypeError: 'NoneType' object is not subscriptable HOT 2
- Loading weights error HOT 2
- Import Error HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tractseg.