ANTsX / ANTs

Advanced Normalization Tools (ANTs)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImageMath TimeSeriesDisassemble 'std::out_of_range'

butellyn opened this issue · comments

Describe the problem

When I use the TimeSeriesDisassemble feature of ImageMath, I get the following error: "terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr Aborted (core dumped)". I am not sure how to address this. I tried running it with the -v 1 flag, but did not get any additional output. Is there something wrong with my call? If not, what can I do to address this error?

To Reproduce

ImageMath 4 /projects/b1108/studies/mwmh/data/processed/neuroimaging/surf/sub-MWMH212/ses-2/func/TR \
   TimeSeriesDisassemble \
   /projects/b1108/studies/mwmh/data/processed/neuroimaging/fmriprep_23.1.4/sub-MWMH212/ses-2/func/sub-MWMH212_ses-2_task-rest_space-T1w_desc-preproc_bold.nii.gz

System information (please complete the following information)

  • OS: NAME="Red Hat Enterprise Linux Server"
    VERSION="7.9 (Maipo)"
    ID="rhel"
    ID_LIKE="fedora"
    VARIANT="Server"
    VARIANT_ID="server"
    VERSION_ID="7.9"
    PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
    ANSI_COLOR="0;31"
    CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
    HOME_URL="https://www.redhat.com/"
    BUG_REPORT_URL="https://bugzilla.redhat.com/"
    REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
    REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
    REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
    REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
  • Type of system: HPC cluster
  • CPU architecture: unsure

ANTs version information

  • ANTs code version: ANTs Version: 0.0.0.0 Compiled: Oct 6 2020 04:58:02
  • ANTs installation type: Unsure. Installed by admins

Additional information

/projects/b1108/studies/mwmh/data/processed/neuroimaging/fmriprep_23.1.4/sub-MWMH212/ses-2/func/sub-MWMH212_ses-2_task-rest_space-T1w_desc-preproc_bold.nii.gz
Spacing [2, 2, 2, 0.555]
Origin [65.6448, 63.687, -59.6174, 0]
Direction
-1 0 0 0
0 -1 0 0
0 0 1 0
0 0 0 1

Size : [69, 90, 69, 1110]

Image Dimensions : [69, 90, 69, 1110]
Bounding Box : {[65.6448 63.687 -59.6174 0], [203.645 243.687 78.3826 616.05]}
Voxel Spacing : [2, 2, 2, 0.555]
Intensity Range : [0, 31125.8]
Mean Intensity : 3874.74
Direction Cos Mtx. :
-1 0 0 0
0 -1 0 0
0 0 1 0
0 0 0 1

Voxel->RAS x-form :
Image Metadata:
ITK_FileNotes = xform matrices modified by FixHeaderApplyTransforms (niworkflows v1.8.1).
ITK_original_direction of unsupported type N3itk6MatrixIdLj4ELj4EEE
ITK_original_spacing of unsupported type St6vectorIdSaIdEE
bitpix = 32
cal_max = 31125.8
cal_min = 0
datatype = 16
descrip = xform matrices modified by FixHeaderApplyTransforms (niworkflows v1.8.1).
dim[0] = 4
dim[1] = 69
dim[2] = 90
dim[3] = 69
dim[4] = 1110
dim[5] = 1
dim[6] = 1
dim[7] = 1
dim_info = 0
intent_code = 0
intent_p1 = 0
intent_p2 = 0
intent_p3 = 0
nifti_type = 1
pixdim[0] = 0
pixdim[1] = 2
pixdim[2] = 2
pixdim[3] = 2
pixdim[4] = 0.555
pixdim[5] = 1
pixdim[6] = 1
pixdim[7] = 1
qform_code = 2
qform_code_name = NIFTI_XFORM_ALIGNED_ANAT
qoffset_x = -65.6448
qoffset_y = -63.687
qoffset_z = -59.6174
quatern_b = 0
quatern_c = 0
quatern_d = 0
scl_inter = 0
scl_slope = 1
sform_code = 2
sform_code_name = NIFTI_XFORM_ALIGNED_ANAT
slice_code = 0
slice_duration = 0
slice_end = 0
slice_start = 0
srow_x = 2 0 0 -65.6448
srow_y = 0 2 0 -63.687
srow_z = 0 0 2 -59.6174
toffset = 0
vox_offset = 352
xyzt_units = 10

This isn't good but unfortunately you have to add the output extension so it knows how to save the images. So make the output image

/projects/b1108/studies/mwmh/data/processed/neuroimaging/surf/sub-MWMH212/ses-2/func/TR.nii.gz

and it should produce

TR1000.nii.gz TR1001.nii.gz TR1002.nii.gz

etc

That worked! Thank you