Did I find the right examples for you? yes no

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/c/e/CellProfiler-HEAD/cellprofiler/modules/tests/test_identifysecondaryobjects.py   CellProfiler(Download)
    def test_02_01_zeros_propagation(self):
        workspace, module = self.make_workspace(np.zeros((10,10)),
                                                np.zeros((10,10), int))
        module.method.value = cpmi2.M_PROPAGATION
        module.run(workspace)
        labels[3:6,3:6] = 1
        workspace, module = self.make_workspace(img, labels)
        module.method.value = cpmi2.M_PROPAGATION
        module.threshold_scope.value = cpmi.TS_MANUAL
        module.manual_threshold.value = .25
        labels[3:6,13:16] = 2
        workspace, module = self.make_workspace(img, labels)
        module.method.value = cpmi2.M_PROPAGATION
        module.regularization_factor.value = 0 # propagate by image
        module.threshold_scope.value = cpmi.TM_MANUAL
        module.objects_name.value=OUTPUT_OBJECTS_NAME
        module.image_name.value = IMAGE_NAME
        module.method.value = cpmi2.M_PROPAGATION
        module.regularization_factor.value = 1000 # propagate by distance
        module.threshold_scope.value = cpmi.TM_MANUAL
        labels[3:6,3:6] = 1
        workspace, module = self.make_workspace(img, labels)
        module.method.value = cpmi2.M_PROPAGATION
        module.threshold_scope.value = cpmi.TS_GLOBAL
        module.threshold_method.value = cpmi.TM_OTSU