Using the ResampleImageBySpacing command:
ResampleImageBySpacing 3 input_image.nii.gz resampled_image.nii.gz 0.4 0.4 0.4 0
gives different results inside and outside the nipype workflow. Outside has intended results (i.e. image voxel sizes become 0.4 x 0.4 x 0.4mm) but within workflow, the voxel sizes are multiplied by the original voxel size (i.e. image voxel size * 0.4)
Using the ResampleImageBySpacing command:
ResampleImageBySpacing 3 input_image.nii.gz resampled_image.nii.gz 0.4 0.4 0.4 0
gives different results inside and outside the nipype workflow. Outside has intended results (i.e. image voxel sizes become 0.4 x 0.4 x 0.4mm) but within workflow, the voxel sizes are multiplied by the original voxel size (i.e. image voxel size * 0.4)