def test_surface_measurement_find_edge(self): tvg = TBVolume() yaml_path = os.path.join(path_to_script, "./hist_stats_test.yaml") tvg.importFromYaml(yaml_path) tvg.voxelsize_mm = [1, 1, 1] tvg.shape = [100, 100, 100] data3d = tvg.buildTree() self.assertGreater(np.sum(data3d), 10, "Image should be not empty")
def test_vessel_tree_volume_with_new_subclass_on_artifical_sample_data(self): tube_skeleton = self.sample_tube_skeleton() tvg = TBVolume() tvg.set_model1d(model1d=tube_skeleton) # yaml_path = os.path.join(path_to_script, "./hist_stats_test.yaml") # tvg.importFromYaml(yaml_path) tvg.voxelsize_mm = [1, 1, 1] tvg.shape = [100, 100, 100] output = tvg.buildTree() # noqa self.assertTrue(type(output) == np.ndarray)
def test_surface_measurement_find_edge(self): import imtools.surface_measurement as sm tvg = TBVolume() yaml_path = os.path.join(path_to_script, "./hist_stats_test.yaml") tvg.importFromYaml(yaml_path) tvg.voxelsize_mm = [1, 1, 1] tvg.shape = [100, 100, 100] data3d = tvg.buildTree() # init histology Analyser # metadata = {'voxelsize_mm': tvg.voxelsize_mm} # data3d = data3d * 10 # threshold = 2.5 im_edg = sm.find_edge(data3d, 0) # in this area should be positive edge self.assertGreater(np.sum(im_edg[25:30, 25:30, 30]), 3)