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

number of shrink factors does nto match the number of levels #367

Closed
jazlynntan opened this issue Apr 30, 2024 · 5 comments
Closed

number of shrink factors does nto match the number of levels #367

jazlynntan opened this issue Apr 30, 2024 · 5 comments

Comments

@jazlynntan
Copy link

jazlynntan commented Apr 30, 2024

Hi,

I tried running RABIES on the token dataset as well as the test dataset. Both times, it ran to completion. I then tried it on my own resting state fMRI data of dimensions 64x64x16x1350. Using the same command for preprocess as per the tutorial (bold2anat_coreg registration=no_reg), it managed to run but I hope to do some distortion correction using bold2anat_coreg where I set registration to Rigid as per:

docker run -it --rm \
-v /mydatapath/:/data:ro \
-v /myoutputpath:/outputs/ ghcr.io/cobralab/rabies:latest \
-p MultiProc --local_threads 8 \
--force preprocess /data /outputs \
--anatomical_resampling 1x1x1 \
--anat_inho_cor method=disable,otsu_thresh=2,multiotsu=false \
--bold_inho_cor method=disable,otsu_thresh=2,multiotsu=false \
--bold2anat_coreg registration=Rigid,masking=true,brain_extraction=true \
--commonspace_reg masking=false,brain_extraction=false,fast_commonspace=true,template_registration=no_reg \
--data_type int16

However, this gives the error that the number of shrink factors does not match the number of levels. I'm not sure what I'm doing wrong and would appreciate any guidance. Thank you.

Here is the full output:

240430-19:09:05,559 nipype.workflow INFO:
	 Running RABIES - version: 0.5.1
240430-19:09:05,560 nipype.workflow INFO:
	 CLI INPUTS: 
-> rabies_stage = preprocess 
-> inclusion_ids = ['all'] 
-> exclusion_ids = ['none'] 
-> plugin = MultiProc 
-> local_threads = 8 
-> scale_min_memory = 1.0 
-> min_proc = 1 
-> figure_format = png 
-> verbose = 1 
-> force = True 
-> bids_dir = /data 
-> output_dir = /outputs 
-> bids_filter = {'func': {'suffix': ['bold', 'cbv']}, 'anat': {'suffix': ['T1w', 'T2w']}} 
-> bold_only = False 
-> anat_autobox = False 
-> bold_autobox = False 
-> oblique2card = none 
-> apply_despiking = False 
-> HMC_option = optim 
-> isotropic_HMC = False 
-> voxelwise_motion = False 
-> apply_slice_mc = False 
-> detect_dummy = False 
-> data_type = int16 
-> anat_inho_cor = {'method': 'disable', 'otsu_thresh': '2', 'multiotsu': False} 
-> anat_robust_inho_cor = {'apply': False, 'masking': False, 'brain_extraction': False, 'template_registration': 'SyN'} 
-> bold_inho_cor = {'method': 'disable', 'otsu_thresh': '2', 'multiotsu': False} 
-> bold_robust_inho_cor = {'apply': False, 'masking': False, 'brain_extraction': False, 'template_registration': 'SyN'} 
-> commonspace_reg = {'masking': False, 'brain_extraction': False, 'fast_commonspace': True, 'template_registration': 'no_reg'} 
-> inherit_unbiased_template = none 
-> bold2anat_coreg = {'registration': 'Rigid', 'masking': True, 'brain_extraction': True} 
-> nativespace_resampling = inputs_defined 
-> commonspace_resampling = inputs_defined 
-> anatomical_resampling = 1x1x1 
-> apply_STC = False 
-> TR = auto 
-> tpattern = alt-z 
-> stc_axis = Y 
-> interp_method = fourier 
-> anat_template = /home/mambauser/.local/share/rabies/DSURQE_40micron_average.nii.gz 
-> brain_mask = /home/mambauser/.local/share/rabies/DSURQE_40micron_mask.nii.gz 
-> WM_mask = /home/mambauser/.local/share/rabies/DSURQE_40micron_eroded_WM_mask.nii.gz 
-> CSF_mask = /home/mambauser/.local/share/rabies/DSURQE_40micron_eroded_CSF_mask.nii.gz 
-> vascular_mask = /home/mambauser/.local/share/rabies/vascular_mask.nii.gz 
-> labels = /home/mambauser/.local/share/rabies/DSURQE_40micron_labels.nii.gz 

240430-19:09:05,560 nipype.workflow INFO:
	 INPUT BIDS DATASET:  
data/ 
    ses-1/ 
        fmap/ 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_fieldmap.nii.gz 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_fieldmap.json 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_magnitude.nii.gz 
        func/ 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_mcw_DWEpiWavev7.json 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-01_EPI.json 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_EPI_bold.nii.gz 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_mcw_DWEpiWavev7.nii.gz 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-01_EPI.nii.gz 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_EPI_bold.json 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-01_mcw_DWEpiWavev7.json 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-01_mcw_DWEpiWavev7.nii.gz 
        anat/ 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w.json 
            sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w.nii.gz 

240430-19:09:11,834 nipype.utils WARNING:
	 A newer version (1.8.4) of nipy/nipype is available. You are using 1.6.1
/opt/conda/lib/python3.9/site-packages/bids/config.py:38: FutureWarning: Setting 'extension_initial_dot' will be removed in pybids 0.16.
  warnings.warn("Setting 'extension_initial_dot' will be removed in pybids 0.16.",
240430-19:09:12,3 nipype.workflow WARNING:
	 The BIDS compliance failed: 'dataset_description.json' is missing from project root. Every valid BIDS dataset must have this file.
Example contents of 'dataset_description.json': 
{"Name": "Example dataset", "BIDSVersion": "1.0.2"} 

RABIES will run anyway; double-check that the right files were picked up for processing.

240430-19:09:12,322 nipype.workflow INFO:
	 Running workflow with MultiProc plugin.
240430-19:09:12,516 nipype.workflow INFO:
	 Workflow main_wf settings: ['check', 'execution', 'logging', 'monitoring']
240430-19:09:12,549 nipype.workflow INFO:
	 Running in parallel.
240430-19:09:12,560 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 3 jobs ready. Free memory (GB): 113.04/113.04, Free processors: 8/8.
240430-19:09:12,600 nipype.workflow INFO:
	 [Job 0] Cached (main_wf.resample_template).
240430-19:09:12,601 nipype.workflow INFO:
	 [Job 1] Cached (main_wf.anat_selectfiles).
240430-19:09:12,602 nipype.workflow INFO:
	 [Job 2] Cached (main_wf.bold_selectfiles).
240430-19:09:14,601 nipype.workflow INFO:
	 [Node] Outdated cache found for "main_wf.template_info".
240430-19:09:14,622 nipype.workflow INFO:
	 [Node] Setting-up "main_wf.template_info" in "/outputs/main_wf/template_info".
240430-19:09:14,622 nipype.workflow INFO:
	 [Job 4] Cached (main_wf.anat_convert_to_RAS).
240430-19:09:14,624 nipype.workflow INFO:
	 [Job 5] Cached (main_wf.bold_convert_to_RAS).
240430-19:09:14,622 nipype.workflow INFO:
	 [Node] Outdated cache found for "main_wf.template_info".
240430-19:09:14,675 nipype.workflow INFO:
	 [Node] Running "template_info" ("nipype.interfaces.utility.wrappers.Function")
/opt/conda/lib/python3.9/site-packages/nilearn/datasets/__init__.py:87: FutureWarning: Fetchers from the nilearn.datasets module will be updated in version 0.9 to return python strings instead of bytes and Pandas dataframes instead of Numpy arrays.
  warn("Fetchers from the nilearn.datasets module will be "
240430-19:09:16,563 nipype.workflow INFO:
	 [MultiProc] Running 1 tasks, and 2 jobs ready. Free memory (GB): 112.84/113.04, Free processors: 7/8.
                     Currently running:
                       * main_wf.template_info
240430-19:09:16,632 nipype.workflow INFO:
	 [Job 6] Cached (main_wf.anat_inho_cor_wf.InhoCorrection).
240430-19:09:16,635 nipype.workflow INFO:
	 [Job 7] Cached (main_wf.bold_main_wf.gen_bold_ref.gen_ref).
240430-19:09:16,829 nipype.workflow INFO:
	 [Node] Finished "main_wf.template_info".
240430-19:09:18,565 nipype.workflow INFO:
	 [Job 3] Completed (main_wf.template_info).
240430-19:09:18,566 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 3 jobs ready. Free memory (GB): 113.04/113.04, Free processors: 8/8.
240430-19:09:18,612 nipype.workflow INFO:
	 [Job 9] Cached (main_wf.commonspace_reg_wf.atlas_reg).
240430-19:09:18,613 nipype.workflow INFO:
	 [Node] Setting-up "main_wf.anat_datasink" in "/outputs/main_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/anat_datasink".
240430-19:09:18,614 nipype.workflow INFO:
	 [Job 10] Cached (main_wf.bold_main_wf.bold_hmc_wf.ants_MC).
240430-19:09:18,615 nipype.workflow INFO:
	 [Node] Running "anat_datasink" ("nipype.interfaces.io.DataSink")
240430-19:09:18,626 nipype.workflow INFO:
	 [Node] Finished "main_wf.anat_datasink".
240430-19:09:20,567 nipype.workflow INFO:
	 [Job 8] Completed (main_wf.anat_datasink).
240430-19:09:20,568 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 2 jobs ready. Free memory (GB): 113.04/113.04, Free processors: 8/8.
240430-19:09:20,609 nipype.workflow INFO:
	 [Job 11] Cached (main_wf.commonspace_reg_wf.prep_commonspace_transform).
240430-19:09:20,611 nipype.workflow INFO:
	 [Job 12] Cached (main_wf.commonspace_reg_wf.PlotOverlap_Native2Atlas).
240430-19:09:22,573 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 1 jobs ready. Free memory (GB): 113.04/113.04, Free processors: 8/8.
240430-19:09:22,644 nipype.workflow INFO:
	 [Node] Setting-up "main_wf.bold_main_wf.bold_inho_cor_wf.InhoCorrection" in "/outputs/main_wf/bold_main_wf/bold_inho_cor_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/_run_02/InhoCorrection".
240430-19:09:22,646 nipype.workflow INFO:
	 [Node] Running "InhoCorrection" ("rabies.preprocess_pkg.inho_correction.InhoCorrection")
240430-19:09:22,668 nipype.workflow INFO:
	 [Node] Finished "main_wf.bold_main_wf.bold_inho_cor_wf.InhoCorrection".
240430-19:09:24,573 nipype.workflow INFO:
	 [Job 13] Completed (main_wf.bold_main_wf.bold_inho_cor_wf.InhoCorrection).
240430-19:09:24,577 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 2 jobs ready. Free memory (GB): 113.04/113.04, Free processors: 8/8.
240430-19:09:24,617 nipype.workflow INFO:
	 [Node] Setting-up "main_wf.bold_main_wf.cross_modal_reg_wf.EPI_Coregistration" in "/outputs/main_wf/bold_main_wf/cross_modal_reg_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/_run_02/EPI_Coregistration".
240430-19:09:24,618 nipype.workflow INFO:
	 [Node] Outdated cache found for "main_wf.bold_inho_cor_diagnosis".
240430-19:09:24,619 nipype.workflow INFO:
	 [Node] Setting-up "main_wf.bold_inho_cor_diagnosis" in "/outputs/main_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/_run_02/bold_inho_cor_diagnosis".
240430-19:09:24,620 nipype.workflow INFO:
	 [Node] Outdated cache found for "main_wf.bold_inho_cor_diagnosis".
240430-19:09:24,622 nipype.workflow INFO:
	 [Node] Running "bold_inho_cor_diagnosis" ("nipype.interfaces.utility.wrappers.Function")
240430-19:09:24,620 nipype.workflow INFO:
	 [Node] Running "EPI_Coregistration" ("nipype.interfaces.utility.wrappers.Function")
240430-19:09:26,244 nipype.workflow INFO:
	 [Node] Finished "main_wf.bold_inho_cor_diagnosis".
240430-19:09:26,573 nipype.workflow INFO:
	 [Job 15] Completed (main_wf.bold_inho_cor_diagnosis).
240430-19:09:26,574 nipype.workflow INFO:
	 [MultiProc] Running 1 tasks, and 0 jobs ready. Free memory (GB): 110.04/113.04, Free processors: 7/8.
                     Currently running:
                       * main_wf.bold_main_wf.cross_modal_reg_wf.EPI_Coregistration
240430-19:09:27,799 nipype.workflow WARNING:
	 2024-04-30 19:09:24 UTC [     info] Histogram matching disabled
2024-04-30 19:09:24 UTC [     info] Calculations performed with double
2024-04-30 19:09:24 UTC [     info] Creating extracted versions of input files using masks
2024-04-30 19:09:24 UTC [     info] Mimimum voxel dimension 1.0mm
2024-04-30 19:09:24 UTC [     info] Calculating maximum image feature dimension of fixed reference using thresholding
2024-04-30 19:09:27 UTC [     info] Maximum image feature dimension 14.0mm
2024-04-30 19:09:27 UTC [     info] Using Center-of-Mass between fixed_extracted.h5 and moving_extracted.h5 for registration initialization
All_Command_lines_OK
Using double precision for computations.
=============================================================================
The composite transform comprises the following transforms (in order): 
  1. Center of mass alignment using fixed image: /tmp/tmp.26teU4FNfb/fixed_extracted.h5 and moving image: /tmp/tmp.26teU4FNfb/moving_extracted.h5 (type = Euler3DTransform)
=============================================================================
  Reading mask(s).
    Registration stage 0
 file NOMASK does not exist . 
      No fixed mask
 file NOMASK does not exist . 
      No moving mask
    Registration stage 1
 file NOMASK does not exist . 
      No fixed mask
 file NOMASK does not exist . 
      No moving mask
    Registration stage 2
 file NOMASK does not exist . 
      No fixed mask
 file NOMASK does not exist . 
      No moving mask
    Registration stage 3
      Fixed mask = /outputs/main_wf/commonspace_reg_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/prep_commonspace_transform/sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w_RAS_resampled_mask.nii.gz
      Moving mask = /outputs/main_wf/commonspace_reg_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/prep_commonspace_transform/sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w_RAS_resampled_mask.nii.gz
    Registration stage 4
      Fixed mask = /outputs/main_wf/commonspace_reg_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/prep_commonspace_transform/sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w_RAS_resampled_mask.nii.gz
      Moving mask = /outputs/main_wf/commonspace_reg_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/prep_commonspace_transform/sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w_RAS_resampled_mask.nii.gz
  number of levels = 0
  number of levels = 1
  number of levels = 1
  number of levels = 1
  number of levels = 0
  fixed image: /tmp/tmp.26teU4FNfb/fixed_extracted.h5
  moving image: /tmp/tmp.26teU4FNfb/moving_extracted.h5
  fixed image: /tmp/tmp.26teU4FNfb/fixed_extracted.h5
  moving image: /tmp/tmp.26teU4FNfb/moving_extracted.h5
  fixed image: /tmp/tmp.26teU4FNfb/fixed_extracted.h5
  moving image: /tmp/tmp.26teU4FNfb/moving_extracted.h5
  fixed image: /tmp/tmp.26teU4FNfb/fixed_extracted.h5
  moving image: /tmp/tmp.26teU4FNfb/moving_extracted.h5
  fixed image: /tmp/tmp.26teU4FNfb/fixed_extracted.h5
  moving image: /tmp/tmp.26teU4FNfb/moving_extracted.h5
Dimension = 3
Number of stages = 5
Use histogram matching = false
Winsorize image intensities = false
  Lower quantile = 0
  Upper quantile = 1


Stage 1 State
   Image metric = Mattes
     Fixed image = Image (0x556a03064360)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 2881
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 2656
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  Spacing: [1, 1, 1]
  Origin: [10.5167, 9.32707, -6.35948]
  Direction: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  IndexToPointMatrix: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  PointToIndexMatrix: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  Inverse Direction: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  PixelContainer: 
    ImportImageContainer (0x556a030132e0)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 2653
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a03000b60
      Container manages memory: true
      Size: 6720
      Capacity: 6720

     Moving image = Image (0x556a0302e080)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 2882
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 2879
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  Spacing: [1, 1, 1]
  Origin: [8.68833, 6.04019, -8.27211]
  Direction: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  IndexToPointMatrix: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  PointToIndexMatrix: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  Inverse Direction: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  PixelContainer: 
    ImportImageContainer (0x556a031927f0)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 2876
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a0319a900
      Container manages memory: true
      Size: 5776
      Capacity: 5776

     Weighting = 1
     Sampling strategy = none
     Number of bins = 32
     Radius = 4
     Sampling percentage  = 1
   Transform = Translation
     Gradient step = 0.5
     Update field sigma (voxel space) = 0
     Total field sigma (voxel space) = 0
     Update field time sigma = 0
     Total field time sigma  = 0
     Number of time indices = 0
     Number of time point samples = 0
Stage 2 State
   Image metric = Mattes
     Fixed image = Image (0x556a03020e50)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 3329
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 3104
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  Spacing: [1, 1, 1]
  Origin: [10.5167, 9.32707, -6.35948]
  Direction: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  IndexToPointMatrix: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  PointToIndexMatrix: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  Inverse Direction: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  PixelContainer: 
    ImportImageContainer (0x556a03042a10)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 3101
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a0309a700
      Container manages memory: true
      Size: 6720
      Capacity: 6720

     Moving image = Image (0x556a03192530)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 3330
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 3327
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  Spacing: [1, 1, 1]
  Origin: [8.68833, 6.04019, -8.27211]
  Direction: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  IndexToPointMatrix: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  PointToIndexMatrix: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  Inverse Direction: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  PixelContainer: 
    ImportImageContainer (0x556a030a9d10)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 3324
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a031527e0
      Container manages memory: true
      Size: 5776
      Capacity: 5776

     Weighting = 1
     Sampling strategy = none
     Number of bins = 32
     Radius = 4
     Sampling percentage  = 1
   Transform = Rigid
     Gradient step = 0.33437
     Update field sigma (voxel space) = 0
     Total field sigma (voxel space) = 0
     Update field time sigma = 0
     Total field time sigma  = 0
     Number of time indices = 0
     Number of time point samples = 0
Stage 3 State
   Image metric = Mattes
     Fixed image = Image (0x556a03048f90)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 3777
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 3552
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  Spacing: [1, 1, 1]
  Origin: [10.5167, 9.32707, -6.35948]
  Direction: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  IndexToPointMatrix: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  PointToIndexMatrix: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  Inverse Direction: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  PixelContainer: 
    ImportImageContainer (0x556a03011930)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 3549
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a0310a6c0
      Container manages memory: true
      Size: 6720
      Capacity: 6720

     Moving image = Image (0x556a0300f550)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 3778
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 3775
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  Spacing: [1, 1, 1]
  Origin: [8.68833, 6.04019, -8.27211]
  Direction: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  IndexToPointMatrix: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  PointToIndexMatrix: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  Inverse Direction: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  PixelContainer: 
    ImportImageContainer (0x556a03011af0)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 3772
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a0308a5c0
      Container manages memory: true
      Size: 5776
      Capacity: 5776

     Weighting = 1
     Sampling strategy = none
     Number of bins = 32
     Radius = 4
     Sampling percentage  = 1
   Transform = Rigid
     Gradient step = 0.223607
     Update field sigma (voxel space) = 0
     Total field sigma (voxel space) = 0
     Update field time sigma = 0
     Total field time sigma  = 0
     Number of time indices = 0
     Number of time point samples = 0
Stage 4 State
   Image metric = Mattes
     Fixed image = Image (0x556a03038290)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 4225
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 4000
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  Spacing: [1, 1, 1]
  Origin: [10.5167, 9.32707, -6.35948]
  Direction: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  IndexToPointMatrix: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  PointToIndexMatrix: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  Inverse Direction: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  PixelContainer: 
    ImportImageContainer (0x556a03165cf0)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 3997
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a03117900
      Container manages memory: true
      Size: 6720
      Capacity: 6720

     Moving image = Image (0x556a030464c0)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 4226
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 4223
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  Spacing: [1, 1, 1]
  Origin: [8.68833, 6.04019, -8.27211]
  Direction: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  IndexToPointMatrix: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  PointToIndexMatrix: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  Inverse Direction: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  PixelContainer: 
    ImportImageContainer (0x556a03011160)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 4220
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a02fad9e0
      Container manages memory: true
      Size: 5776
      Capacity: 5776

     Weighting = 1
     Sampling strategy = none
     Number of bins = 32
     Radius = 4
     Sampling percentage  = 1
   Transform = Rigid
     Gradient step = 0.149535
     Update field sigma (voxel space) = 0
     Total field sigma (voxel space) = 0
     Update field time sigma = 0
     Total field time sigma  = 0
     Number of time indices = 0
     Number of time point samples = 0
Stage 5 State
   Image metric = Mattes
     Fixed image = Image (0x556a03029230)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 4673
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 4448
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [20, 21, 16]
  Spacing: [1, 1, 1]
  Origin: [10.5167, 9.32707, -6.35948]
  Direction: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  IndexToPointMatrix: 
-0.999955 -0.00484664 0.00819878
0.00481248 -0.99998 -0.00418152
0.00821888 -0.00414187 0.999958

  PointToIndexMatrix: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  Inverse Direction: 
-0.999955 0.00481248 0.00821888
-0.00484664 -0.99998 -0.00414187
0.00819878 -0.00418152 0.999958

  PixelContainer: 
    ImportImageContainer (0x556a0318cb90)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 4445
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a0312a6c0
      Container manages memory: true
      Size: 6720
      Capacity: 6720

     Moving image = Image (0x556a030a9480)
  RTTI typeinfo:   itk::Image<double, 3u>
  Reference Count: 2
  Modified Time: 4674
  Debug: Off
  Object Name: 
  Observers: 
    none
  Source: (none)
  Source output name: (none)
  Release Data: Off
  Data Released: False
  Global Release Data: Off
  PipelineMTime: 0
  UpdateMTime: 4671
  RealTimeStamp: 0 seconds 
  LargestPossibleRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  BufferedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  RequestedRegion: 
    Dimension: 3
    Index: [0, 0, 0]
    Size: [19, 16, 19]
  Spacing: [1, 1, 1]
  Origin: [8.68833, 6.04019, -8.27211]
  Direction: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  IndexToPointMatrix: 
-0.990852 -0.0184441 0.133685
0.0189033 -0.999819 0.00216657
0.133621 0.00467384 0.991022

  PointToIndexMatrix: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  Inverse Direction: 
-0.990852 0.0189033 0.133621
-0.0184441 -0.999819 0.00467384
0.133685 0.00216657 0.991022

  PixelContainer: 
    ImportImageContainer (0x556a03126f10)
      RTTI typeinfo:   itk::ImportImageContainer<unsigned long, double>
      Reference Count: 1
      Modified Time: 4668
      Debug: Off
      Object Name: 
      Observers: 
        none
      Pointer: 0x556a02fc0f60
      Container manages memory: true
      Size: 5776
      Capacity: 5776

     Weighting = 1
     Sampling strategy = none
     Number of bins = 64
     Radius = 4
     Sampling percentage  = 1
   Transform = Rigid
     Gradient step = 0.1
     Update field sigma (voxel space) = 0
     Total field sigma (voxel space) = 0
     Update field time sigma = 0
     Total field time sigma  = 0
     Number of time indices = 0
     Number of time point samples = 0
Registration using 5 total stages.

Stage 0
  iterations = 
  convergence threshold = 1e-06
  convergence window size = 10
  number of levels = 0
  using the Mattes MI metric (number of bins = 32, weight = 1, use gradient filter = 1)



ERROR:  The number of shrink factors does not match the number of levels.
Shrink Factors: 1
Number Of Levels: 0



2024-04-30 19:09:27 UTC [    alert] Failed at 638: ${run_command}

240430-19:09:27,802 nipype.workflow WARNING:
	 Storing result file without outputs
240430-19:09:27,802 nipype.workflow WARNING:
	 [Node] Error on "main_wf.bold_main_wf.cross_modal_reg_wf.EPI_Coregistration" (/outputs/main_wf/bold_main_wf/cross_modal_reg_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/_run_02/EPI_Coregistration)
240430-19:09:28,578 nipype.workflow ERROR:
	 Node EPI_Coregistration.a0.a0 failed to run on host 873d8017804e.
240430-19:09:28,579 nipype.workflow ERROR:
	 Saving crash info to /tmp/crash-20240430-190928-mambauser-EPI_Coregistration.a0.a0-534d8656-5bcd-4918-a828-d9bcc532d6cc.pklz
Traceback (most recent call last):
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/plugins/multiproc.py", line 67, in run_node
    result["result"] = node.run(updatehash=updatehash)
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 516, in run
    result = self._run_interface(execute=True)
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 635, in _run_interface
    return self._run_command(execute)
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/nodes.py", line 741, in _run_command
    result = self._interface.run(cwd=outdir)
  File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/base/core.py", line 428, in run
    runtime = self._run_interface(runtime)
  File "/opt/conda/lib/python3.9/site-packages/nipype/interfaces/utility/wrappers.py", line 142, in _run_interface
    out = function_handle(**args)
  File "<string>", line 16, in run_antsRegistration
  File "/home/mambauser/RABIES/rabies/utils.py", line 354, in run_command
    process = subprocess.run(
  File "/opt/conda/lib/python3.9/subprocess.py", line 528, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command 'antsRegistration_affine_SyN.sh --linear-type rigid --skip-nonlinear --mask-extract --keep-mask-after-extract --moving-mask /outputs/main_wf/commonspace_reg_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/prep_commonspace_transform/sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w_RAS_resampled_mask.nii.gz --fixed-mask /outputs/main_wf/commonspace_reg_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/prep_commonspace_transform/sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w_RAS_resampled_mask.nii.gz --resampled-output sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_EPI_bold_RAS_resampled_output_warped_image.nii.gz /outputs/main_wf/bold_main_wf/bold_inho_cor_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/_run_02/InhoCorrection/sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_EPI_bold_RAS_resampled.nii.gz /outputs/main_wf/anat_inho_cor_wf/_scan_info_subject_idLDUnderscoreC57BL6Underscore13.session1_split_name_sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w/InhoCorrection/sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_T2w_RAS_resampled.nii.gz sub-LDUnderscoreC57BL6Underscore13_ses-1_run-02_EPI_bold_RAS_resampled_output_' returned non-zero exit status 1.

240430-19:09:28,581 nipype.workflow INFO:
	 [MultiProc] Running 0 tasks, and 0 jobs ready. Free memory (GB): 113.04/113.04, Free processors: 8/8.
240430-19:09:30,577 nipype.workflow INFO:
	 ***********************************
240430-19:09:30,578 nipype.workflow ERROR:
	 could not run node: main_wf.bold_main_wf.cross_modal_reg_wf.EPI_Coregistration.a0.a0
240430-19:09:30,578 nipype.workflow INFO:
	 crashfile: /tmp/crash-20240430-190928-mambauser-EPI_Coregistration.a0.a0-534d8656-5bcd-4918-a828-d9bcc532d6cc.pklz
240430-19:09:30,579 nipype.workflow INFO:
	 ***********************************
240430-19:09:30,580 nipype.workflow CRITICAL:
	 RABIES failed: Workflow did not execute cleanly. Check log for details
Traceback (most recent call last):
  File "/opt/conda/bin/rabies", line 7, in <module>
    exec(compile(f.read(), __file__, 'exec'))
  File "/home/mambauser/RABIES/scripts/rabies", line 3, in <module>
    execute_workflow()
  File "/home/mambauser/RABIES/rabies/run_main.py", line 68, in execute_workflow
    graph_out = workflow.run(plugin=opts.plugin, plugin_args={'max_jobs': 50, 'dont_resubmit_completed_jobs': True,
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/engine/workflows.py", line 638, in run
    runner.run(execgraph, updatehash=updatehash, config=self.config)
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/plugins/base.py", line 192, in run
    report_nodes_not_run(notrun)
  File "/opt/conda/lib/python3.9/site-packages/nipype/pipeline/plugins/tools.py", line 96, in report_nodes_not_run
    raise RuntimeError(
RuntimeError: Workflow did not execute cleanly. Check log for details
@gdevenyi
Copy link
Member

--anatomical_resampling 1x1x1

This doesn't look right at all. This would be 1mm x 1mm x 1mm. Why did you choose this?

Can you please provide much more info about your input data. What resolution is it collected at? Do you have structural images?

@Gab-D-G
Copy link
Collaborator

Gab-D-G commented Apr 30, 2024

This is indeed likely the source of the error. 1X1X1 is recommend only for testing on token data (I suspect this is why you are using this parameter). This parameters doesn't make sense with real data. You should leave out this parameter if you want an automatic estimation of your image dimensionality, or use a more sensible dimension (e.g. 0.15mm isotropic for mouse data).

@jazlynntan
Copy link
Author

Ah I see, I used 1x1x1 based off the tutorial - didn't realise it was in mm units. My data resolution is 0.3mm x 0.3mm x 1mm with (64 x 64 x 16 pixels) and 1350 volumes in the time dimension (TR=2s). I have structural images, resolution 0.15mm x 0.15mm x 1mm (128 x 128 x 16 pixels).

I'm trying again 0.3 as per my functional image and alternatively without specifying that parameter. Will update when it's done. Thank you.

@Gab-D-G
Copy link
Collaborator

Gab-D-G commented Apr 30, 2024

0.3 should work, but you may want to consider keeping the 0.15mm resolution of your anatomical scans, as higher resolution for anatomical preprocessing may result in better registration.

@jazlynntan
Copy link
Author

Yes, that seemed to solve the issue. In the end, I just let the sampling be automatically determined. Thank you.

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