Comments (11)
Looks like it ran! Thanks so much for your attention on this and rapid reply.
I see it output the "Prob atlas in individual space : pA_tmp2ind.nii.gz" into the current directory and consistently labelled but I believe there was an error in the output of the "Template T1 in individual space : T1w_tmp2ind.nii.gz".
Could this be labelled something else by the script? I see several other files generated but unsure what to make of this extra output and what is the T1 template in individual space if labelled something else. Here's an example of the extra files. I'm guessing from the warp log file that TMP2IND_Warped.nii.gz is the one I am looking for?
/home/grangers/Desktop/practice/700umatlas/TMP2IND_0GenericAffine.mat
/home/grangers/Desktop/practice/700umatlas/TMP2IND_1InverseWarp.nii.gz
/home/grangers/Desktop/practice/700umatlas/TMP2IND_1Warp.nii.gz
/home/grangers/Desktop/practice/700umatlas/TMP2IND_Warp.log
/home/grangers/Desktop/practice/700umatlas/TMP2IND_Warped.nii.gz
from citatlaskit.
Looks like it worked!! Thanks so much for your attention on this!
-Steve
from citatlaskit.
Here is an example of my use and errors in attempting to run the software...
user@Sidious ~/Desktop/practice/700umatlas $ sh tmp2ind_T1.sh -t1i /567_1_MRI1_WIP_MPrage_Coronal_sense_SENSE_3_1.nii -t1t /CIT168_T1w_700um_MNI.nii.gz -pt /CIT168_iAmyNuc_700um_MNI.nii.gz
tmp2ind_T1.sh: 52: tmp2ind_T1.sh: [[: Input/output error
SyN Warp T1 template to individual space
Individual T1 :
Template T1 :
Prob Atlas :
mv: cannot stat ‘TMP2IND__Warped.nii.gz’: No such file or directory
FIELD: TMP2IND_1Warp.nii.gz
AFFINE: TMP2IND_0GenericAffine.mat
Segmentation fault
Output files
Template T1 in individual space : T1w_tmp2ind.nii.gz
Prob atlas in individual space : pA_tmp2ind.nii.gz
from citatlaskit.
Hi Steven,
Really happy to hear you like the atlas!
I'll try to answer your questions in order:
-
The tmp2ind_T1.sh script actually warps the atlas into the individual space (ie the opposite direction from the one you stated above) - didn't want this to cause confusion down the line.
-
The third argument should be a 4D Nifti probabilistic atlas like CIT168_pAmyNuc_700um_MNI.nii.gz. FSL also uses this format for the Harvard-Oxford probabilistic atlases (see for example $FSLDIR/data/atlases/HarvardOxford/HarvardOxford-cort-prob-1mm.nii.gz in a typical FSL 5 installation). Each 3D volume in the 4D data is a separate probabilistic map for a given tissue label (voxel intensity in range 0.0 to 1.0).
-
The "i" and "p" prefixes in the filename refer to "integer-valued" and "probabilistic" labels respectively. We've actually moved to "d" (for deterministic) for the integer-valued labels. These would be equivalent to something like HarvardOxford-cort-maxprob-thr25-1mm.nii.gz in the FSL installation and would be 3D volumes.
-
Apologies, I'm not sure I completely understand what you're planning on exporting as text for further analysis. Voxel values from the warped atlas or individual data, calculated volumes of subnuclei? Let me know and I'll try to dig into that a bit further for you.
from citatlaskit.
It looks like the script isn't parsing the command line arguments correctly, since there's no filename string following "Individual T1:", etc. Try making the script executable (chmod +x tmp2ind_T1.sh) then rerunning without the leading "sh" in your command line. Let me know if filenames start to appear in the initial output text from the script.
from citatlaskit.
Thank you so much for the rapid reply!
My misunderstanding, but that will work great. Thanks for clarifying points 2 and 3.
My apologies for the confusion on my last question, let me rephrase. I am hoping after warping the T1 atlas and the probabilistic atlas to my structural scans that I would then be able to access the corrected NIFTI file format for each of the subfields in the output separately.
from citatlaskit.
In addition, I have made tmp2ind_T1.sh executable but am still running into the same issue with and without the leading "sh". I presume since the shell and all necessary files are in the same directory I don't need to specify a path for each argument.
grangers@Sidious ~/Desktop/practice/700umatlas $ tmp2ind_T1.sh -t1i /567_1_MRI1_WIP_MPrage_Coronal_sense_SENSE_3_1.nii -t1t /CIT168_T1w_700um_MNI.nii.gz -pt /CIT168_pAmyNuc_700um_MNI.nii.gz
tmp2ind_T1.sh: command not found
grangers@Sidious ~/Desktop/practice/700umatlas $ sh tmp2ind_T1.sh -t1i /567_1_MRI1_WIP_MPrage_Coronal_sense_SENSE_3_1.nii -t1t /CIT168_T1w_700um_MNI.nii.gz -pt /CIT168_pAmyNuc_700um_MNI.nii.gz
tmp2ind_T1.sh: 52: tmp2ind_T1.sh: [[: Input/output error
SyN Warp T1 template to individual space
Individual T1 :
Template T1 :
Prob Atlas :
mv: cannot stat ‘TMP2IND__Warped.nii.gz’: No such file or directory
FIELD: TMP2IND_1Warp.nii.gz
AFFINE: TMP2IND_0GenericAffine.mat
Segmentation fault
Output files
Template T1 in individual space : T1w_tmp2ind.nii.gz
Prob atlas in individual space : pA_tmp2ind.nii.gz
from citatlaskit.
I didn't spot this first time round, but do you want the leading "/" for all your image files? Are they all in the root directory or the current directory? If the latter, you can either drop the "/" completely or prefix the filenames with "./"
Also, try running the script with bash rather than sh.
from citatlaskit.
I've simplified the argument handling so that both tmp2ind_*.sh scripts no longer need the argument key (eg -t1i). Try pulling the latest version (git pull ...) and see whether this fixes the weird argument handling you're experiencing. Tested this under macOS Sierra. Both "sh --version" and "bash --version" indicate that "GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin16)" is the underlying shell. You might want to check on your Ubuntu system too.
from citatlaskit.
This is the output in the terminal window in case you need it to reference at any point
grangers@Sidious ~/Desktop/practice/700umatlas $ sh tmp2ind_T1.sh 567_1_MRI1_WIP_MPrage_Coronal_sense_SENSE_3_1.nii CIT168_T1w_700um_MNI.nii.gz CIT168_pAmyNuc_700um_MNI.nii.gz
SyN Warp T1 template to individual space
Individual T1 : 567_1_MRI1_WIP_MPrage_Coronal_sense_SENSE_3_1.nii
Template T1 : CIT168_T1w_700um_MNI.nii.gz
Prob Atlas : CIT168_pAmyNuc_700um_MNI.nii.gz
Starting SyN registration
mv: cannot stat ‘TMP2IND__Warped.nii.gz’: No such file or directory
Warping probabilistic atlas into individual space
FIELD: TMP2IND_1Warp.nii.gz
AFFINE: TMP2IND_0GenericAffine.mat
moving_image_filename: CIT168_pAmyNuc_700um_MNI.nii.gz components 1
output_image_filename: pA_tmp2ind.nii.gz
reference_image_filename: 567_1_MRI1_WIP_MPrage_Coronal_sense_SENSE_3_1.nii
[0/2]: FIELD: TMP2IND_1Warp.nii.gz
[1/2]: AFFINE: TMP2IND_0GenericAffine.mat
Not currently supported because of a lack of vector support
We check the syntax of your call ....
syntax probably ok.
output origin: [-127.582, -134.018, 128, 0]
output size: [256, 256, 208, 1]
output spacing: [1, 1, 1, 1]
output direction: 1 0 0 0
0 -0 1 0
0 -1 0 0
0 0 0 1
Output files
Template T1 in individual space : T1w_tmp2ind.nii.gz
Prob atlas in individual space : pA_tmp2ind.nii.gz
from citatlaskit.
Hi Steven,
Glad this worked out! I've fixed the issue with renaming the warped template T1 too (there was an extra underscore in the command). Let me know if everything works now and I'll close the issue.
Cheers - Mike
from citatlaskit.
Related Issues (1)
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 citatlaskit.