Commit 5feb353
Fix lazy rand affine (#6774)
Fixes #6773.
### Description
Call `rand_affine_grid()` once before call
`rand_affine_grid.get_transformation_matrix()`, since its documented as
"Get the most recently applied transformation matrix", or the `.affine`
attribute will not be set.
Also, set `randomize=False` here since randomization if performed in the
beginning of the function.
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
---------
Signed-off-by: function2 <[email protected]>
Co-authored-by: Wenqi Li <[email protected]>1 parent e2fa53b commit 5feb353
File tree
3 files changed
+4
-0
lines changed- monai/transforms/spatial
- tests
3 files changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2523 | 2523 | | |
2524 | 2524 | | |
2525 | 2525 | | |
| 2526 | + | |
| 2527 | + | |
2526 | 2528 | | |
2527 | 2529 | | |
2528 | 2530 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1141 | 1141 | | |
1142 | 1142 | | |
1143 | 1143 | | |
| 1144 | + | |
1144 | 1145 | | |
1145 | 1146 | | |
1146 | 1147 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| 148 | + | |
148 | 149 | | |
149 | 150 | | |
150 | 151 | | |
| |||
0 commit comments