Skip to content

Commit ff0e65c

Browse files
MAINT: apply reviewers comments
1 parent 9f2dd5a commit ff0e65c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

tests/test_stainaugment.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ def test_stainaugment(source_image, norm_vahadane):
2020

2121
# Test invalid method in the input
2222
with pytest.raises(ValueError, match=r".*Unsupported stain extractor method.*"):
23-
_ = StainAugmentation(method="mosi")
23+
_ = StainAugmentation(method="invalid")
2424

2525
# 1. Testing without stain matrix.
26-
# Test with Vahadane stain extractor
26+
# Test with macenko stain extractor
2727
augmentor = StainAugmentation(
2828
method="macenko", sigma1=3.0, sigma2=3.0, augment_background=True
2929
)

tiatoolbox/tools/stainaugment.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# All rights reserved.
2222
# ***** END GPL LICENSE BLOCK *****
2323

24-
"""Staing augmentation"""
24+
"""Stain augmentation"""
2525
import copy
2626
import random
2727

@@ -63,6 +63,7 @@ class StainAugmentation(ImageOnlyTransform):
6363
p (0.5): For use with 'albumentations' pipeline which specifies the probability
6464
of using the augmentation in a 'albumentations' pipeline. . Please refer to
6565
albumentations documentations for more information.
66+
6667
Attributes:
6768
stain_normaliser: Fitted stain normalization class.
6869
stain_matrix (:class:`numpy.ndarray`): extracted stain matrix from the image
@@ -71,6 +72,7 @@ class StainAugmentation(ImageOnlyTransform):
7172
n_stains (int): number of stain channels in the stain concentrations.
7273
Expected to be 2 for H&E stained images.
7374
tissue_mask (:class:`numpy.ndarray`): tissue region mask in the image.
75+
7476
Examples:
7577
>>> '''Using the stain augmentor in the 'albumentations' pipeline'''
7678
>>> from tiatoolbox.tools.stainaugment import StainAugmentaiton

0 commit comments

Comments
 (0)