-
-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building template in ANTs #1745
Comments
I reckon it's confused by the multiple extensions, can you try renaming to something like
|
Yes, I did it and the error changes in the last part:
|
Can you upload |
template.csv |
I think this is the problem, there's carriage return characters in the file |
It works normally for me after
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Operating system and version
Ubuntu 22.04.4
CPU architecture
Unknown
ANTs code version
2.5.0.post43-g2d4c931
ANTs installation type
Compiled from source
Summary of the problem
I am using the 3T HCP dataset to build a multimodal template with T1w, T2w and FA images. When I am doing it i get the following error:
nelson@oliveira-maia-pc:/mnt/data1/nelson/STRUCTURAL_CONNECTOME/template$ antsMultivariateTemplateConstruction2.sh -d 3 -i 3 -k 3 -t SyN -r 1 -c 2 -o template template.csv
Multivariate template construction using the following 3-tuples:
100206_3T_T1w_MPR1_brain.nii.gz 100206_3T_T2w_SPC1_brain.nii.gz 100206_data.src.gz.gqi.1.25.fib.gz.dti_fa.nii.gz
100307_3T_T1w_MPR1_brain.nii.gz 100307_3T_T2w_SPC1_brain.nii.gz 100307_data.src.gz.gqi.1.25.fib.gz.dti_fa.nii.gz
Creating template templatetemplate0.nii.gz from a population average image from the inputs.
100206_3T_T1w_MPR1_brain.nii.gz 100307_3T_T1w_MPR1_brain.nii.gz
bigimage 4 maxSize [256, 320, 320]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading 100206_3T_T1w_MPR1_brain.nii.gz
reading 100307_3T_T1w_MPR1_brain.nii.gz
writing output
1Sharpening method none
Using double precision for computations.
Input scalar image: 100206_3T_T1w_MPR1_brain.nii.gz
Reference image: templatetemplate0.nii.gz
The composite transform comprises the following transforms (in order):
=============================================================================
Default pixel value: 0
Interpolation type: LinearInterpolateImageFunction
Output warped image: ./initialCOM0_0_100206_3T_T1w_MPR1_brain.nii.gz
Using double precision for computations.
Input scalar image: 100307_3T_T1w_MPR1_brain.nii.gz
Reference image: templatetemplate0.nii.gz
=============================================================================
The composite transform comprises the following transforms (in order):
=============================================================================
Default pixel value: 0
Interpolation type: LinearInterpolateImageFunction
Output warped image: ./initialCOM0_1_100307_3T_T1w_MPR1_brain.nii.gz
bigimage 4 maxSize [256, 320, 320]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading ./initialCOM0_0_100206_3T_T1w_MPR1_brain.nii.gz
reading ./initialCOM0_1_100307_3T_T1w_MPR1_brain.nii.gz
writing output
Sharpening method none
Creating template templatetemplate1.nii.gz from a population average image from the inputs.
100206_3T_T2w_SPC1_brain.nii.gz 100307_3T_T2w_SPC1_brain.nii.gz
bigimage 4 maxSize [256, 320, 320]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading 100206_3T_T2w_SPC1_brain.nii.gz
reading 100307_3T_T2w_SPC1_brain.nii.gz
writing output
Sharpening method none
Using double precision for computations.
Input scalar image: 100206_3T_T2w_SPC1_brain.nii.gz
Reference image: templatetemplate1.nii.gz
The composite transform comprises the following transforms (in order):
=============================================================================
Default pixel value: 0
Interpolation type: LinearInterpolateImageFunction
Output warped image: ./initialCOM1_0_100206_3T_T2w_SPC1_brain.nii.gz
Using double precision for computations.
Input scalar image: 100307_3T_T2w_SPC1_brain.nii.gz
Reference image: templatetemplate1.nii.gz
=============================================================================
The composite transform comprises the following transforms (in order):
=============================================================================
Default pixel value: 0
Interpolation type: LinearInterpolateImageFunction
Output warped image: ./initialCOM1_1_100307_3T_T2w_SPC1_brain.nii.gz
bigimage 4 maxSize [256, 320, 320]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading ./initialCOM1_0_100206_3T_T2w_SPC1_brain.nii.gz
reading ./initialCOM1_1_100307_3T_T2w_SPC1_brain.nii.gz
writing output
Sharpening method none
Creating template templatetemplate2.nii.gz from a population average image from the inputs.
100307_data.src.gz.gqi.1.25.fib.gz.dti_fa.nii.gzgz
Cannot read input file: 100206_data.src.gz.gqi.1.25.fib.gz.dti_fa.nii.gz
summarizeimageset: ERROR - output file templatetemplate2.nii.gz could not be created
I have confirmed and my template csv as the correct name files.
Any idea on how to solve this?
Commands to reproduce the problem.
antsMultivariateTemplateConstruction2.sh -d 3 -i 3 -k 3 -t SyN -r 1 -c 2 -o template template.csv
Output of the command with verbose output.
nelson@oliveira-maia-pc:/mnt/data1/nelson/STRUCTURAL_CONNECTOME/template$ antsMultivariateTemplateConstruction2.sh -d 3 -i 3 -k 3 -t SyN -r 1 -c 2 -o template template.csv
Multivariate template construction using the following 3-tuples:
100206_3T_T1w_MPR1_brain.nii.gz 100206_3T_T2w_SPC1_brain.nii.gz 100206_data.src.gz.gqi.1.25.fib.gz.dti_fa.nii.gz
100307_3T_T1w_MPR1_brain.nii.gz 100307_3T_T2w_SPC1_brain.nii.gz 100307_data.src.gz.gqi.1.25.fib.gz.dti_fa.nii.gz
Creating template templatetemplate0.nii.gz from a population average image from the inputs.
100206_3T_T1w_MPR1_brain.nii.gz 100307_3T_T1w_MPR1_brain.nii.gz
bigimage 4 maxSize [256, 320, 320]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading 100206_3T_T1w_MPR1_brain.nii.gz
reading 100307_3T_T1w_MPR1_brain.nii.gz
writing output
1Sharpening method none
Using double precision for computations.
Input scalar image: 100206_3T_T1w_MPR1_brain.nii.gz
Reference image: templatetemplate0.nii.gz
The composite transform comprises the following transforms (in order):
=============================================================================
Default pixel value: 0
Interpolation type: LinearInterpolateImageFunction
Output warped image: ./initialCOM0_0_100206_3T_T1w_MPR1_brain.nii.gz
Using double precision for computations.
Input scalar image: 100307_3T_T1w_MPR1_brain.nii.gz
Reference image: templatetemplate0.nii.gz
=============================================================================
The composite transform comprises the following transforms (in order):
=============================================================================
Default pixel value: 0
Interpolation type: LinearInterpolateImageFunction
Output warped image: ./initialCOM0_1_100307_3T_T1w_MPR1_brain.nii.gz
bigimage 4 maxSize [256, 320, 320]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading ./initialCOM0_0_100206_3T_T1w_MPR1_brain.nii.gz
reading ./initialCOM0_1_100307_3T_T1w_MPR1_brain.nii.gz
writing output
Sharpening method none
Creating template templatetemplate1.nii.gz from a population average image from the inputs.
100206_3T_T2w_SPC1_brain.nii.gz 100307_3T_T2w_SPC1_brain.nii.gz
bigimage 4 maxSize [256, 320, 320]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading 100206_3T_T2w_SPC1_brain.nii.gz
reading 100307_3T_T2w_SPC1_brain.nii.gz
writing output
Sharpening method none
Using double precision for computations.
Input scalar image: 100206_3T_T2w_SPC1_brain.nii.gz
Reference image: templatetemplate1.nii.gz
The composite transform comprises the following transforms (in order):
=============================================================================
Default pixel value: 0
Interpolation type: LinearInterpolateImageFunction
Output warped image: ./initialCOM1_0_100206_3T_T2w_SPC1_brain.nii.gz
Using double precision for computations.
Input scalar image: 100307_3T_T2w_SPC1_brain.nii.gz
Reference image: templatetemplate1.nii.gz
=============================================================================
The composite transform comprises the following transforms (in order):
=============================================================================
Default pixel value: 0
Interpolation type: LinearInterpolateImageFunction
Output warped image: ./initialCOM1_1_100307_3T_T2w_SPC1_brain.nii.gz
bigimage 4 maxSize [256, 320, 320]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading ./initialCOM1_0_100206_3T_T2w_SPC1_brain.nii.gz
reading ./initialCOM1_1_100307_3T_T2w_SPC1_brain.nii.gz
writing output
Sharpening method none
Creating template templatetemplate2.nii.gz from a population average image from the inputs.
100307_data.src.gz.gqi.1.25.fib.gz.dti_fa.nii.gzgz
Cannot read input file: 100206_data.src.gz.gqi.1.25.fib.gz.dti_fa.nii.gz
summarizeimageset: ERROR - output file templatetemplate2.nii.gz could not be created
Data to reproduce the problem
FA maps are obtained from DSI studio
The text was updated successfully, but these errors were encountered: