Skip to content

Unexpected output location for --write-interval-volumes #1836

@mathdugre

Description

@mathdugre

Operating system and version

Apptainer: docker://mathdugre/ants:flint-base

CPU architecture

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

ANTs code version

Manual compilation with commit 705a652ae14dffe774a561f4adffd9c395bcd7bb

ANTs installation type

Compiled from source

Summary of the problem

Current behavior

When using the --write-interval-volumes flag, files .nii.gz files are written to the current directory instead of the output directory.

Expected behavior

Files written to the specified output directory, along with the transform files.

Commands to reproduce the problem.

DATA_DIR=...
OUTPUT_DIR=...
SIF_IMG=...
FIXED_IMG=...
INPUT_IMG=...

apptainer exec --cleanenv \
    -B ${DATA_DIR}:${DATA_DIR} \
    -B ${OUTPUT_DIR}:${OUTPUT_DIR} \
    ${SIF_IMG} antsRegistration \
    --verbose 1 \
    --dimensionality 3 \
    --collapse-output-transforms 0 \
    --use-histogram-matching 0 \
    --winsorize-image-intensities [0.005,0.995] \
    --interpolation Linear \
    --random-seed 1 \
    --print-similarity-measure-interval 1 \
    --write-interval-volumes 1 \
    --output [${OUTPUT_DIR}/,${OUTPUT_DIR}/Warped.nii.gz,${OUTPUT_DIR}/InverseWarped.nii.gz] \
    --initial-moving-transform [${FIXED_IMG},${INPUT_IMG},1] \
    --transform Rigid[0.1] \
    --metric MI[${FIXED_IMG},${INPUT_IMG},1,32,Regular,0.25] \
    --convergence [1000x500x250x100,1e-6,10] \
    --shrink-factors 8x4x2x1 \
    --smoothing-sigmas 3x2x1x0vox 

Output of the command with verbose output.

Files created in PWD directory:

find . -name "Stage*" 
./Stage1_level1_Iter0004.nii.gz
./Stage1_level1_Iter0001.nii.gz
./Stage1_level1_Iter0002.nii.gz
./Stage1_level1_Iter0003.nii.gz
./Stage1_level1_Iter0005.nii.gz

Data to reproduce the problem

Any data

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementEnhancements under development - feel free to join discussion if you'd like to contribute

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions