def test_get_grayscale_from_dicom(self):
     dcm_folder = str(self.test_data_folder / 'testcase_dicom_hu')
     for file_name in param.param_list_dcm_hu:
         with self.subTest("Test for file: {0}".format(file_name)):
             gray_array = \
                 gray.get_grayscale_from_dicom(file_name, dcm_folder)
             self.assertIsNotNone(gray_array)
             min_val = np.min(gray_array)
             max_val = np.max(gray_array)
             self.assertTrue(gray_array.ndim == 2)
             self.assertTrue(min_val >= 0)
             self.assertTrue(max_val <= 255)
 def test_not_null(self):
     image = gray.get_grayscale_from_dicom(self.test_file,
                                           self.test_data_folder_hu)
     mask = sgm.make_lungmask(image, False)
     self.assertIsNotNone(mask)