Commit 530cc1f
authored
Fix ImageFilter to allow Gaussian filter without filter_size (#8189)
Fixes #8127
Update `ImageFilter` to handle Gaussian filter without requiring
`filter_size`.
* Modify `monai/transforms/utility/array.py` to allow Gaussian filter
without `filter_size`.
- Adjust `_check_filter_format` method to skip `filter_size` check for
Gaussian filter. Indeed Gauss filter is the only one in the list that
doesn't require a filter_size.
* Add unit test in `tests/test_image_filter.py` for Gaussian filter
without `filter_size`.
- Verify output shape matches input shape.
Note that this method is compliant with the dictionnary version since
this one load the fixed version.
Signed-off-by: Eloi <eloi.navet@gmail.com>
---------
Signed-off-by: Eloi Navet <eloi.navet@labri.fr>
Signed-off-by: Eloi <eloi.navet@gmail.com>
Signed-off-by: Eloi eloi.navet@gmail.com1 parent c1ceea3 commit 530cc1f
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1609 | 1609 | | |
1610 | 1610 | | |
1611 | 1611 | | |
1612 | | - | |
| 1612 | + | |
1613 | 1613 | | |
1614 | | - | |
| 1614 | + | |
1615 | 1615 | | |
1616 | 1616 | | |
1617 | 1617 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
137 | 143 | | |
138 | 144 | | |
139 | 145 | | |
| |||
0 commit comments