Skip to content
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

No GenericAffine.mat exist when running antsMultivariateTemplateConstruction2.sh #1824

Open
Bamboo429 opened this issue Jan 8, 2025 · 2 comments

Comments

@Bamboo429
Copy link

Operating system and version

Ubuntu 20.04

CPU architecture

x86_64 (PC, Intel Mac, other Intel/AMD)

ANTs code version

ANTs Version: 2.5.1.post42-g35d9381

ANTs installation type

Compiled from source

Summary of the problem

Hi ANTs team,
I am running antsMultivariateTemplateConstruction2.sh but keep facing error message
Screenshot from 2025-01-07 20-23-20

I have tried to set the ITK_GLOBAL_DEFAULT_NUMBER_OF_THREADS=1 but still the same error

However, if I run the command antsRegistration provided in job_00_r.sh, the program create the *Warp.nii.gz and *GenericAffine.mat successfully
image

Here is the full log file
job_0_metriclog.txt

Please let me know how can I fix it. Thank you so much!

Commands to reproduce the problem.

antsMultivariateTemplateConstruction2.sh -b 1 -d 3 -v 32 -a 0 -g 0.2 -i 20 -j 2 -c 2 -k 4 -n 0 -m MI /home/subjectList_2.csv

Output of the command with verbose output.


Multivariate template construction using the following 4-tuples:

/home/Reg_2/VT_00026_arterial_pc.nii.gz /home/Reg_2/VT_00026_vein_supp_arterial_sub.nii.gz /home/Reg_2/VT_00026_venous_pc.nii.gz /home/Reg_2/VT_00026_artery_supp_venous_sub.nii.gz
/home/Reg_2/VT_00007_arterial_pc.nii.gz /home/Reg_2/VT_00007_vein_supp_arterial_sub.nii.gz /home/Reg_2/VT_00007_venous_pc.nii.gz /home/Reg_2/VT_00007_artery_supp_venous_sub.nii.gz


Creating template antsBTPtemplate0.nii.gz from a population average image from the inputs.
/home/Reg_2/VT_00026_arterial_pc.nii.gz /home/Reg_2/VT_00007_arterial_pc.nii.gz

bigimage 4 maxSize [512, 512, 470]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading /home/Reg_2/VT_00026_arterial_pc.nii.gz
reading /home/Reg_2/VT_00007_arterial_pc.nii.gz
writing output
Sharpening method none
Using double precision for computations.
Input scalar image: /home/Reg_2/VT_00026_arterial_pc.nii.gz
Reference image: antsBTPtemplate0.nii.gz

The composite transform comprises the following transforms (in order):

  1. ./initialCOM0_0_VT_00026_arterial_pc.mat (type = TranslationTransform)
    =============================================================================
    Default pixel value: 0
    Interpolation type: LinearInterpolateImageFunction
    Output warped image: ./initialCOM0_0_VT_00026_arterial_pc.nii.gz
    Using double precision for computations.
    Input scalar image: /home/Reg_2/VT_00007_arterial_pc.nii.gz
    Reference image: antsBTPtemplate0.nii.gz
    =============================================================================
    The composite transform comprises the following transforms (in order):
  2. ./initialCOM0_1_VT_00007_arterial_pc.mat (type = TranslationTransform)
    =============================================================================
    Default pixel value: 0
    Interpolation type: LinearInterpolateImageFunction
    Output warped image: ./initialCOM0_1_VT_00007_arterial_pc.nii.gz
    bigimage 4 maxSize [512, 512, 470]
    Setting physical space of output average image based on largest image
    Averaging 2 images with dim = 3 vector components 1
    reading ./initialCOM0_0_VT_00026_arterial_pc.nii.gz
    reading ./initialCOM0_1_VT_00007_arterial_pc.nii.gz
    writing output
    Sharpening method none

Creating template antsBTPtemplate1.nii.gz from a population average image from the inputs.
/home/Reg_2/VT_00026_vein_supp_arterial_sub.nii.gz /home/Reg_2/VT_00007_vein_supp_arterial_sub.nii.gz

bigimage 4 maxSize [512, 512, 470]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading /home/Reg_2/VT_00026_vein_supp_arterial_sub.nii.gz
reading /home/Reg_2/VT_00007_vein_supp_arterial_sub.nii.gz
writing output
Sharpening method none
Using double precision for computations.
Input scalar image: /home/Reg_2/VT_00026_vein_supp_arterial_sub.nii.gz
Reference image: antsBTPtemplate1.nii.gz

The composite transform comprises the following transforms (in order):

  1. ./initialCOM1_0_VT_00026_vein_supp_arterial_sub.mat (type = TranslationTransform)
    =============================================================================
    Default pixel value: 0
    Interpolation type: LinearInterpolateImageFunction
    Output warped image: ./initialCOM1_0_VT_00026_vein_supp_arterial_sub.nii.gz
    Using double precision for computations.
    Input scalar image: /home/Reg_2/VT_00007_vein_supp_arterial_sub.nii.gz
    Reference image: antsBTPtemplate1.nii.gz
    =============================================================================
    The composite transform comprises the following transforms (in order):
  2. ./initialCOM1_1_VT_00007_vein_supp_arterial_sub.mat (type = TranslationTransform)
    =============================================================================
    Default pixel value: 0
    Interpolation type: LinearInterpolateImageFunction
    Output warped image: ./initialCOM1_1_VT_00007_vein_supp_arterial_sub.nii.gz
    bigimage 4 maxSize [512, 512, 470]
    Setting physical space of output average image based on largest image
    Averaging 2 images with dim = 3 vector components 1
    reading ./initialCOM1_0_VT_00026_vein_supp_arterial_sub.nii.gz
    reading ./initialCOM1_1_VT_00007_vein_supp_arterial_sub.nii.gz
    writing output
    Sharpening method none

Creating template antsBTPtemplate2.nii.gz from a population average image from the inputs.
/home/Reg_2/VT_00026_venous_pc.nii.gz /home/Reg_2/VT_00007_venous_pc.nii.gz

bigimage 4 maxSize [512, 512, 470]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading /home/Reg_2/VT_00026_venous_pc.nii.gz
reading /home/Reg_2/VT_00007_venous_pc.nii.gz
writing output
Sharpening method none
Using double precision for computations.
Input scalar image: /home/Reg_2/VT_00026_venous_pc.nii.gz
Reference image: antsBTPtemplate2.nii.gz

The composite transform comprises the following transforms (in order):

  1. ./initialCOM2_0_VT_00026_venous_pc.mat (type = TranslationTransform)
    =============================================================================
    Default pixel value: 0
    Interpolation type: LinearInterpolateImageFunction
    Output warped image: ./initialCOM2_0_VT_00026_venous_pc.nii.gz
    Using double precision for computations.
    Input scalar image: /home/Reg_2/VT_00007_venous_pc.nii.gz
    Reference image: antsBTPtemplate2.nii.gz
    =============================================================================
    The composite transform comprises the following transforms (in order):
  2. ./initialCOM2_1_VT_00007_venous_pc.mat (type = TranslationTransform)
    =============================================================================
    Default pixel value: 0
    Interpolation type: LinearInterpolateImageFunction
    Output warped image: ./initialCOM2_1_VT_00007_venous_pc.nii.gz
    bigimage 4 maxSize [512, 512, 470]
    Setting physical space of output average image based on largest image
    Averaging 2 images with dim = 3 vector components 1
    reading ./initialCOM2_0_VT_00026_venous_pc.nii.gz
    reading ./initialCOM2_1_VT_00007_venous_pc.nii.gz
    writing output
    Sharpening method none

Creating template antsBTPtemplate3.nii.gz from a population average image from the inputs.
/home/Reg_2/VT_00026_artery_supp_venous_sub.nii.gz /home/Reg_2/VT_00007_artery_supp_venous_sub.nii.gz

bigimage 4 maxSize [512, 512, 470]
Setting physical space of output average image based on largest image
Averaging 2 images with dim = 3 vector components 1
reading /home/Reg_2/VT_00026_artery_supp_venous_sub.nii.gz
reading /home/Reg_2/VT_00007_artery_supp_venous_sub.nii.gz
writing output
Sharpening method none
Using double precision for computations.
Input scalar image: /home/Reg_2/VT_00026_artery_supp_venous_sub.nii.gz
Reference image: antsBTPtemplate3.nii.gz

The composite transform comprises the following transforms (in order):

  1. ./initialCOM3_0_VT_00026_artery_supp_venous_sub.mat (type = TranslationTransform)
    =============================================================================
    Default pixel value: 0
    Interpolation type: LinearInterpolateImageFunction
    Output warped image: ./initialCOM3_0_VT_00026_artery_supp_venous_sub.nii.gz
    Using double precision for computations.
    Input scalar image: /home/Reg_2/VT_00007_artery_supp_venous_sub.nii.gz
    Reference image: antsBTPtemplate3.nii.gz
    =============================================================================
    The composite transform comprises the following transforms (in order):
  2. ./initialCOM3_1_VT_00007_artery_supp_venous_sub.mat (type = TranslationTransform)
    =============================================================================
    Default pixel value: 0
    Interpolation type: LinearInterpolateImageFunction
    Output warped image: ./initialCOM3_1_VT_00007_artery_supp_venous_sub.nii.gz
    bigimage 4 maxSize [512, 512, 470]
    Setting physical space of output average image based on largest image
    Averaging 2 images with dim = 3 vector components 1
    reading ./initialCOM3_0_VT_00026_artery_supp_venous_sub.nii.gz
    reading ./initialCOM3_1_VT_00007_artery_supp_venous_sub.nii.gz
    writing output
    Sharpening method none

Start to build templates: antsBTPtemplate0.nii.gz antsBTPtemplate1.nii.gz antsBTPtemplate2.nii.gz antsBTPtemplate3.nii.gz


Mapping parameters

Dimensionality: 3
Do N4 bias correction: 0
Back up each iteration: 1
Similarity metric: MI MI MI MI
Gradient step: 0.2
Transformation: SyN
Max iterations: 100x100x70x20
Smoothing factors: 3x2x1x0
Shrink factors: 6x4x2x1
Output prefix: antsBTP
Template: antsBTPtemplate
Template update steps: 20
Template population: /home/subjectList_2.csv
Number of modalities: 4
Modality weights:
Image statistic: 0
Sharpening method: 1
Shape update full affine: 1


Starting ANTS registration on max 2 cpucores. Iteration: 1 of 20
Progress can be viewed in job*_0_metriclog.txt

Using max 2 parallel threads
Running sh ./job_00_r.sh
Running sh ./job_01_r.sh
Killed
Transform file does not exist: ./antsBTPVT_00026_arterial_pc00GenericAffine.mat
Transform file does not exist: ./antsBTPVT_00026_arterial_pc00GenericAffine.mat
Transform file does not exist: ./antsBTPVT_00026_arterial_pc00GenericAffine.mat
Transform file does not exist: ./antsBTPVT_00026_arterial_pc00GenericAffine.mat

Data to reproduce the problem

Sorry, I can't share data.
Here is the csv file
subjectList_2.csv

@ntustison
Copy link
Member

Are you able to run one of these 2-D template building examples?

@cookpa
Copy link
Member

cookpa commented Jan 9, 2025

The "Killed" message suggests the system is killing the processes for some reason.

Is this a PC or a compute cluster?

You might try running without pexec, ie use -c 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants