-
Notifications
You must be signed in to change notification settings - Fork 258
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Is there an existing issue for this?
- I have searched the existing issues
Bug summary
When setting a min_constraint in Transform._parse_range and calling with an upper bound only, the upper bound is also used as the lower bound (instead of using the min_constraint there).
The bug is in this line
torchio/src/torchio/transforms/transform.py
Line 334 in 16d3dc6
| min_range = -nums_range if min_constraint is None else nums_range |
It should read:
min_range = -nums_range if min_constraint is None else min_constraintCode for reproduction
tio.Transform._parse_range(5, 'name', min_constraint=0)Actual outcome
(5, 5)
Error messages
Expected outcome
(0, 5)
System info
Platform: Linux-6.1.0-40-amd64-x86_64-with-glibc2.36
TorchIO: 0.21.0
PyTorch: 2.9.1+cu128
SimpleITK: 2.5.3 (ITK 5.4)
NumPy: 2.3.5
Python: 3.13.8 (main, Oct 10 2025, 12:48:21) [Clang 20.1.4 ]Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working