def setUp(self): (self.image, self.labels, self.binary, self.stack) = generate_image() self.network = generate_probe_graph() self.regions = generate_regions() self.segments = [ ProbeSegment(region=region) for region in self.regions ]
def setUp(self): self.regions = generate_regions() self.fibre_network = ProbeFibreNetwork() self.fibres = [ProbeFibre(), ProbeFibre(), ProbeFibre()] self.segment = ProbeSegment() self.segments = [self.segment] self.image, _, _, _ = generate_image()
def setUp(self): self.image, _, _, _ = generate_image() self.network = generate_probe_graph() self.pos_2D = np.array([[1, 3], [4, 2], [1, 5]]) self.answer_d_2D = np.array([[[0, 0], [3, -1], [0, 2]], [[-3, 1], [0, 0], [-3, 3]], [[0, -2], [3, -3], [0, 0]]]) self.answer_r2_2D = np.array([[0, 10, 4], [10, 0, 18], [4, 18, 0]]) self.answer_cos_the = np.array([0, 0.9486833])
def setUp(self): (self.image, labels, self.binary, _) = generate_image() self.segments = regionprops(labels) self.fibre_network = ProbeFibreNetwork()