Skip to content

Commit d2a7a36

Browse files
authored
Fix def grad windows (#828)
* COMP: Bump Windows ITK / ANTs
1 parent 5ac336d commit d2a7a36

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

ants/registration/create_jacobian_determinant_image.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
__all__ = ['create_jacobian_determinant_image',
55
'deformation_gradient']
66

7-
from tempfile import mktemp
7+
from tempfile import NamedTemporaryFile
88

99
import ants
1010
import numpy as np
@@ -56,14 +56,14 @@ def deformation_gradient( warp_image, to_rotation=False, to_inverse_rotation=Fal
5656
if not py_based:
5757
# --- Original C++ based implementation ---
5858
if ants.is_image(warp_image):
59-
txuse = mktemp(suffix='.nii.gz')
59+
txuse = NamedTemporaryFile(suffix='.nii.gz', delete=False).name
6060
ants.image_write(warp_image, txuse)
6161
else:
6262
txuse = warp_image
6363
warp_image=ants.image_read(txuse)
6464
if not ants.is_image(warp_image):
6565
raise RuntimeError("antsimage is required")
66-
writtenimage = mktemp(suffix='.nii.gz')
66+
writtenimage = NamedTemporaryFile(suffix='.nii.gz', delete=False).name
6767
dimage = warp_image.split_channels()[0].clone('double')
6868
dim = dimage.dimension
6969
tshp = dimage.shape
@@ -161,7 +161,7 @@ def create_jacobian_determinant_image(domain_image, tx, do_log=False, geom=False
161161
"""
162162
dim = domain_image.dimension
163163
if ants.is_image(tx):
164-
txuse = mktemp(suffix='.nii.gz')
164+
txuse = NamedTemporaryFile(suffix='.nii.gz', delete=False).name
165165
ants.image_write(tx, txuse)
166166
else:
167167
txuse = tx

scripts/configure_ANTs.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ COPY data\* %USERPROFILE%\.antspy
1111

1212
:: clone ANTs and move all files into library directory
1313
SET antsgit=https://github.com/ANTsX/ANTs.git
14-
:: ANTs commit from 02-26-2025
15-
SET antstag=fc0589fd23826e53d51e67eb8a3f9a3d63e63a14
14+
:: ANTs 2025-06-10 v2.6.2
15+
SET antstag=52bc0ab588102682587303d31c720de94e6ef6c1
1616
echo "ANTS;%antstag%" REM UNKNOWN: {"type":"Redirect","op":{"text":">>","type":"dgreat"},"file":{"text":"./data/softwareVersions.csv","type":"Word"}}
1717
cd src
1818
echo "123"

scripts/configure_ANTs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ cp data/* ~/.antspy/
1313
# clone ANTs and move all files into library directory
1414

1515
antsgit=https://github.com/ANTsX/ANTs.git
16-
antstag=52bc0ab588102682587303d31c720de94e6ef6c1 # 2025-06-10 v2.6.2
16+
antstag=52bc0ab588102682587303d31c720de94e6ef6c1 # 2025-06-10 v2.6.2
1717
echo "ANTS;${antstag}" >> ./data/softwareVersions.csv
1818

1919
cd src # go to lib dir

scripts/configure_ITK.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
SET CMAKE_BUILD_TYPE=Release
55

66
SET itkgit=https://github.com/InsightSoftwareConsortium/ITK.git
7-
:: 2025-14-02
8-
SET itktag=f67dd9ac229f92f966452b1cff45c81b8e370c79
7+
:: 5.4.3
8+
SET itktag=0913f2a962d28eb5725a50a17304c4652ca6cfdc
99

1010
:: if there is a directory but no git, remove it
1111
if exist itksource\ (

0 commit comments

Comments
 (0)