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_expandorshrinkobjects.py   CellProfiler(Download)
        self.assertEqual(len(modules),7)
        for module, output_object_name, operation, has_outline in \
            ((modules[2], "ShrunkenNuclei", E.O_SHRINK_INF, False),
             (modules[3], "ExpandedOnceNuclei", E.O_EXPAND, True),
             (modules[4], "ShrunkenOnceNuclei", E.O_SHRINK, False),
        expected = np.zeros((10,10),int)
        expected[4,4] = 1
        workspace, module = self.make_workspace(labels, E.O_SHRINK_INF)
        module.run(workspace)
        objects = workspace.object_set.get_objects(OUTPUT_NAME)
        expected[4,4] = 1
        # Test failure without filling the hole
        workspace, module = self.make_workspace(labels, E.O_SHRINK_INF)
        module.run(workspace)
        objects = workspace.object_set.get_objects(OUTPUT_NAME)
        self.assertFalse(np.all(objects.segmented == expected))
        # Test success after filling the hole
        workspace, module = self.make_workspace(labels, E.O_SHRINK_INF,