Skip to content

Commit a0902d7

Browse files
authored
Merge branch 'main' into add-no-verify-path
2 parents 17f115b + 251fd5d commit a0902d7

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ types = [
9090
"pandas-stubs==2.2.2.240807",
9191
"pillow==11.0.0",
9292
"pip==25.0.1",
93+
"types-deprecated==1.2.15.20250304",
94+
"types-tqdm==4.67.0.20250516",
9395
]
9496
test = [
9597
"coverage==7.6.10",

src/torchio/transforms/preprocessing/spatial/crop.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def apply_transform(self, subject: Subject) -> Subject:
5252
low = self.bounds_parameters[::2]
5353
high = self.bounds_parameters[1::2]
5454
index_ini = low
55-
index_fin = np.array(subject.spatial_shape) - high
55+
index_fin = np.asarray(subject.spatial_shape, dtype=int) - high
5656

5757
if self._copy_patch:
5858
# Create a clean new subject to copy the images into
@@ -79,7 +79,7 @@ def apply_transform(self, subject: Subject) -> Subject:
7979
cropped_subject[key] = self._crop_image(
8080
value,
8181
index_ini,
82-
index_fin,
82+
index_fin, # type: ignore[arg-type]
8383
copy_patch=self._copy_patch,
8484
)
8585

@@ -92,7 +92,7 @@ def apply_transform(self, subject: Subject) -> Subject:
9292
self._crop_image(
9393
image,
9494
index_ini,
95-
index_fin,
95+
index_fin, # type: ignore[arg-type]
9696
copy_patch=self._copy_patch,
9797
)
9898
return subject

0 commit comments

Comments
 (0)