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_maskobjects.py   CellProfiler(Download)
    def test_02_01_measurement_columns(self):
        '''Test get_measurement_columns'''
        workspace, module = self.make_workspace(np.zeros((20,10), int),
                                                M.P_MASK,
                                                np.zeros((20,10), int))
    def test_02_03_measurements(self):
        workspace, module = self.make_workspace(np.zeros((20,10), int),
                                                M.P_MASK,
                                                np.zeros((20,10), int))
        ftr_count = (M.I.FF_CHILDREN_COUNT % OUTPUT_OBJECTS).split('_',1)[1]
        expected = labels.copy()
        expected[mask == 0] = 0
        workspace, module = self.make_workspace(labels, M.P_MASK, mask)
        module.run(workspace)
        objects = workspace.object_set.get_objects(OUTPUT_OBJECTS)
        expected = labels.copy()
        expected[~ mask] = 0
        workspace, module = self.make_workspace(labels, M.P_MASK, 
                                                masking_image = mask)
        module.run(workspace)
        expected[~ mask] = 0
        expected[expected == 3] = 2
        workspace, module = self.make_workspace(labels, M.P_MASK, 
                                                masking_image = mask)
        module.run(workspace)