How to use the identify.O_TWO_CLASS function in identify

To help you get started, we’ve selected a few identify examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CellProfiler / CellProfiler / pyCellProfiler / cellprofiler / modules / View on Github external
def threshold_scale(self):
        '''The "scale" for the threshold = minor parameterizations'''
        # Distinguish Otsu choices from each other
        threshold_algorithm = self.threshold_algorithm
        if threshold_algorithm == cpthresh.TM_OTSU:
            if self.two_class_otsu == O_TWO_CLASS:
                scale = "2"
                scale = "3"
                if self.assign_middle_to_foreground == O_FOREGROUND:
                    scale += "F"
                    scale += "B"
            if self.use_weighted_variance == O_WEIGHTED_VARIANCE:
                scale += "W"
                scale += "S"
            return scale
        elif threshold_algorithm == cpthresh.TM_MOG:
            return str(int(self.object_fraction.value * 100))