Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/source/transforms.rst
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ Intensity

`SavitzkyGolaySmooth`
"""""""""""""""""""""
.. image:: https://github.com/Project-MONAI/DocImages/raw/main/transforms/SavitzkyGolaySmooth.png
:alt: example of SavitzkyGolaySmooth
.. autoclass:: SavitzkyGolaySmooth
:members:
:special-members: __call__
Expand Down Expand Up @@ -408,6 +410,8 @@ Intensity

`RandRicianNoise`
"""""""""""""""""
.. image:: https://github.com/Project-MONAI/DocImages/raw/main/transforms/RandRicianNoise.png
:alt: example of RandRicianNoise
.. autoclass:: RandRicianNoise
:members:
:special-members: __call__
Expand Down Expand Up @@ -1173,6 +1177,14 @@ Intensity (Dict)
:members:
:special-members: __call__

`RandRicianNoised`
""""""""""""""""""
.. image:: https://github.com/Project-MONAI/DocImages/raw/main/transforms/RandRicianNoised.png
:alt: example of RandRicianNoised
.. autoclass:: RandRicianNoised
:members:
:special-members: __call__

`ScaleIntensityRangePercentilesd`
"""""""""""""""""""""""""""""""""
.. image:: https://github.com/Project-MONAI/DocImages/raw/main/transforms/ScaleIntensityRangePercentilesd.png
Expand Down
2 changes: 1 addition & 1 deletion monai/transforms/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def generate_spatial_bounding_box(
margin: Union[Sequence[int], int] = 0,
) -> Tuple[List[int], List[int]]:
"""
generate the spatial bounding box of foreground in the image with start-end positions.
generate the spatial bounding box of foreground in the image with start-end positions (inclusive).
Users can define arbitrary function to select expected foreground from the whole image or specified channels.
And it can also add margin to every dim of the bounding box.
The output format of the coordinates is:
Expand Down
10 changes: 8 additions & 2 deletions monai/transforms/utils_create_transform_ims.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,11 @@
RandGibbsNoise,
RandHistogramShift,
RandKSpaceSpikeNoise,
RandRicianNoise,
RandScaleIntensity,
RandShiftIntensity,
RandStdShiftIntensity,
SavitzkyGolaySmooth,
ScaleIntensityRange,
ScaleIntensityRangePercentiles,
ShiftIntensity,
Expand All @@ -130,6 +132,7 @@
RandGibbsNoised,
RandHistogramShiftd,
RandKSpaceSpikeNoised,
RandRicianNoised,
RandScaleIntensityd,
RandShiftIntensityd,
RandStdShiftIntensityd,
Expand Down Expand Up @@ -520,6 +523,9 @@ def create_transform_im(
dict(keys=CommonKeys.IMAGE, global_prob=1, prob=1, common_sampling=True, intensity_range=(13, 15)),
data,
)
create_transform_im(RandRicianNoise, dict(prob=1.0, mean=1, std=0.5), data)
create_transform_im(RandRicianNoised, dict(keys=CommonKeys.IMAGE, prob=1.0, mean=1, std=0.5), data)
create_transform_im(SavitzkyGolaySmooth, dict(window_length=5, order=1), data)
create_transform_im(GibbsNoise, dict(alpha=0.8), data)
create_transform_im(GibbsNoised, dict(keys=CommonKeys.IMAGE, alpha=0.8), data)
create_transform_im(RandGibbsNoise, dict(prob=1.0, alpha=(0.6, 0.8)), data)
Expand Down Expand Up @@ -640,8 +646,8 @@ def create_transform_im(
create_transform_im(RandScaleCropd, dict(keys=keys, roi_scale=0.4), data)
create_transform_im(CenterScaleCrop, dict(roi_scale=0.4), data)
create_transform_im(CenterScaleCropd, dict(keys=keys, roi_scale=0.4), data)
create_transform_im(AsDiscrete, dict(to_onehot=2, threshold=10), data, is_post=True, colorbar=True)
create_transform_im(AsDiscreted, dict(keys=CommonKeys.LABEL, to_onehot=2, threshold=10), data, is_post=True)
create_transform_im(AsDiscrete, dict(to_onehot=None, threshold=10), data, is_post=True, colorbar=True)
create_transform_im(AsDiscreted, dict(keys=CommonKeys.LABEL, to_onehot=None, threshold=10), data, is_post=True)
create_transform_im(LabelFilter, dict(applied_labels=(1, 2, 3, 4, 5, 6)), data, is_post=True)
create_transform_im(
LabelFilterd, dict(keys=CommonKeys.LABEL, applied_labels=(1, 2, 3, 4, 5, 6)), data, is_post=True
Expand Down