docstr: Test that an input image returns an expected stain matrix.
  
  For test case 4:
  - a uniformly filled input image should result in
    eigenvectors [[1,0,0],[0,1,0],[0,0,1]]
  - phi should be an array containing only values of
    arctan(1) since the ratio between the eigenvectors
    corresponding to the two largest eigenvalues is 1
  - maximum phi and minimum phi should thus be arctan(1)
  - thus, maximum vector and minimum vector should be
    [[0],[0.70710677],[0.70710677]]
  - the resulting extracted stain should be
    [[0,0],[0.70710678,0.70710678],[0.70710678,0.70710678]]
  
  For test case 5:
  - the non-uniformly filled input image should result in
    eigenvectors [[0,0,1],[1,0,0],[0,1,0]]
  - maximum phi and minimum phi should thus be 0.785 and
    0.188 respectively
  - thus, maximum vector and minimum vector should be
    [[0.18696113],[0],[0.98236734]] and
    [[0.70710677],[0],[0.70710677]] respectively
  - the resulting extracted stain should be
    [[0.70710677,0.18696113],[0,0],[0.70710677,0.98236734]]
docstr_tok: ["Test","that","an","input","image","returns","an","expected","stain","matrix",".","For","test","case","4",":","-","a","uniformly","filled","input","image","should","result","in","eigenvectors","[","[","1,0,0","]",",","[","0,1,0","]",",","[","0,0,1","]","]","-","phi","should","be","an","array","containing","only","values","of","arctan","(","1",")","since","the","ratio","between","the","eigenvectors","corresponding","to","the","two","largest","eigenvalues","is","1","-","maximum","phi","and","minimum","phi","should","thus","be","arctan","(","1",")","-","thus",",","maximum","vector","and","minimum","vector","should","be","[","[","0","]",",","[","0.70710677","]",",","[","0.70710677","]","]","-","the","resulting","extracted","stain","should","be","[","[","0,0","]",",","[","0.70710678,0.70710678","]",",","[","0.70710678,0.70710678","]","]","For","test","case","5",":","-","the","non-uniformly","filled","input","image","should","result","in","eigenvectors","[","[","0,0,1","]",",","[","1,0,0","]",",","[","0,1,0","]","]","-","maximum","phi","and","minimum","phi","should","thus","be","0.785","and","0.188","respectively","-","thus",",","maximum","vector","and","minimum","vector","should","be","[","[","0.18696113","]",",","[","0","]",",","[","0.98236734","]","]","and","[","[","0.70710677","]",",","[","0","]",",","[","0.70710677","]","]","respectively","-","the","resulting","extracted","stain","should","be","[","[","0.70710677,0.18696113","]",",","[","0,0","]",",","[","0.70710677,0.98236734","]","]"]
code: def test_result_value(self, image, expected_data):
      """
      Test that an input image returns an expected stain matrix.
  
      For test case 4:
      - a uniformly filled input image should result in
        eigenvectors [[1,0,0],[0,1,0],[0,0,1]]
      - phi should be an array containing only values of
        arctan(1) since the ratio between the eigenvectors
        corresponding to the two largest eigenvalues is 1
      - maximum phi and minimum phi should thus be arctan(1)
      - thus, maximum vector and minimum vector should be
        [[0],[0.70710677],[0.70710677]]
      - the resulting extracted stain should be
        [[0,0],[0.70710678,0.70710678],[0.70710678,0.70710678]]
  
      For test case 5:
      - the non-uniformly filled input image should result in
        eigenvectors [[0,0,1],[1,0,0],[0,1,0]]
      - maximum phi and minimum phi should thus be 0.785 and
        0.188 respectively
      - thus, maximum vector and minimum vector should be
        [[0.18696113],[0],[0.98236734]] and
        [[0.70710677],[0],[0.70710677]] respectively
      - the resulting extracted stain should be
        [[0.70710677,0.18696113],[0,0],[0.70710677,0.98236734]]
      """
      if image is None:
          with self.assertRaises(TypeError):
              ExtractHEStains()(image)
      else:
          result = ExtractHEStains()(image)
          np.testing.assert_allclose(result, expected_data)
  
file_path: MONAI/tests/test_pathology_he_stain.py
imports: from __future__ import annotations
  import unittest
  import numpy
  from parameterized import parameterized
  from monai.apps.pathology.transforms import ExtractHEStains, NormalizeHEStains
label_desc: Use image node_id 3 for calling the TestExtractHEStains obj's underlying member method code with example usage: obj.test_result_value(image, expected_data) without return types