Skip to content

Commit 435499d

Browse files
committed
function name change
1 parent f23aa7f commit 435499d

File tree

1 file changed

+3
-3
lines changed
  • torch_staintools/functional/stain_extraction

1 file changed

+3
-3
lines changed

torch_staintools/functional/stain_extraction/macenko.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def stain_matrix_helper(t_hat: torch.Tensor, mask_flatten: torch.Tensor,
8181

8282

8383
@staticmethod
84-
def stain_matrix_helper_original(t_hat: torch.Tensor, perc: int, eig_vecs: torch.Tensor):
85-
"""Helper function to compute the stain matrix.
84+
def stain_matrix_helper_single(t_hat: torch.Tensor, perc: int, eig_vecs: torch.Tensor):
85+
"""Helper function to compute the stain matrix. (no vectorization)
8686
8787
Separate the projected OD vectors on singular vectors (SVD of OD in Macenko paper, which is also the
8888
eigen vector of the covariance matrix of the OD)
@@ -188,7 +188,7 @@ def stain_mat_loop(self, od_flatten: torch.Tensor, tissue_mask_flatten: torch.Te
188188
# HW
189189
# t_hat -> num_pixels x num_stain
190190
# eig_vecs -> C x num_stain
191-
stain_mat = MacenkoAlg.stain_matrix_helper_original(t_hat, perc, eig_vecs)
191+
stain_mat = MacenkoAlg.stain_matrix_helper_single(t_hat, perc, eig_vecs)
192192
stain_mat = stain_mat.T
193193
stain_mat_list.append(stain_mat)
194194
return torch.stack(stain_mat_list)

0 commit comments

Comments
 (0)