Skip to content

Commit

Permalink
Merge pull request #647 from ANTsX/resample_dtype
Browse files Browse the repository at this point in the history
ENH: Hoping to stop the windows access violation errors

clone input images to float as in apply_transforms
  • Loading branch information
cookpa committed May 21, 2024
2 parents 10275e2 + f01009a commit c188bcc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,10 @@ jobs:
run: |
conda create -n antspy-env python=${{ env.python_version }} -y
conda activate antspy-env
conda install -c conda-forge conda-pack coverage
conda install -c conda-forge coverage
conda info
pip install ./antspy-pr
conda list
antspy-pr/tests/run_tests.sh -c
conda pack -n antspy-env -o ~/conda-env.tar.bz2
- name: Run tests
run: |
Expand Down
4 changes: 2 additions & 2 deletions ants/ops/resample_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ def resample_image_to_target(image, target, interp_type='linear', imagetype=0, v
if ants.is_image(fixed) and ants.is_image(moving):
inpixeltype = fixed.pixeltype
warpedmovout = moving.clone()
f = fixed
m = moving
f = fixed.clone('float')
m = moving.clone('float')
if (moving.dimension == 4) and (fixed.dimension==3) and (imagetype==0):
raise ValueError('Set imagetype 3 to transform time series images.')

Expand Down

0 comments on commit c188bcc

Please sign in to comment.