Пример #1
0
    def get_measurement_columns(self, pipeline):
        '''Return column definitions for measurements made by this module'''
        columns = cpmi.get_object_measurement_columns(self.objects_name.value)
        columns += [(self.primary_objects.value,
                     cpmi.FF_CHILDREN_COUNT % self.objects_name.value,
                     cpmeas.COLTYPE_INTEGER),
                    (self.objects_name.value,
                     cpmi.FF_PARENT % self.primary_objects.value,
                     cpmeas.COLTYPE_INTEGER)]
        if self.method != M_DISTANCE_N:
            columns += cpmi.get_threshold_measurement_columns(
                self.objects_name.value)
        if self.wants_discard_edge and self.wants_discard_primary:
            columns += cpmi.get_object_measurement_columns(
                self.new_primary_objects_name.value)
            columns += [(self.new_primary_objects_name.value,
                         cpmi.FF_CHILDREN_COUNT % self.objects_name.value,
                         cpmeas.COLTYPE_INTEGER),
                        (self.objects_name.value,
                         cpmi.FF_PARENT % self.new_primary_objects_name.value,
                         cpmeas.COLTYPE_INTEGER)]
            columns += [
                (self.primary_objects.value,
                 cpmi.FF_CHILDREN_COUNT % self.new_primary_objects_name.value,
                 cpmeas.COLTYPE_INTEGER),
                (self.new_primary_objects_name.value,
                 cpmi.FF_PARENT % self.primary_objects.value,
                 cpmeas.COLTYPE_INTEGER)
            ]

        return columns
    def get_measurement_columns(self, pipeline):
        '''Return column definitions for measurements made by this module'''
        columns = cpmi.get_object_measurement_columns(self.objects_name.value)
        columns += [(self.primary_objects.value,
                     cpmi.FF_CHILDREN_COUNT%self.objects_name.value,
                     cpmeas.COLTYPE_INTEGER),
                    (self.objects_name.value,
                     cpmi.FF_PARENT%self.primary_objects.value,
                     cpmeas.COLTYPE_INTEGER)]
        if self.method != M_DISTANCE_N:
            columns += cpmi.get_threshold_measurement_columns(self.objects_name.value)
        if self.wants_discard_edge and self.wants_discard_primary:
            columns += cpmi.get_object_measurement_columns(self.new_primary_objects_name.value)
            columns += [(self.new_primary_objects_name.value,
                         cpmi.FF_CHILDREN_COUNT%self.objects_name.value,
                         cpmeas.COLTYPE_INTEGER),
                        (self.objects_name.value,
                         cpmi.FF_PARENT%self.new_primary_objects_name.value,
                         cpmeas.COLTYPE_INTEGER)]
            columns += [(self.primary_objects.value,
                         cpmi.FF_CHILDREN_COUNT%self.new_primary_objects_name.value,
                         cpmeas.COLTYPE_INTEGER),
                        (self.new_primary_objects_name.value,
                         cpmi.FF_PARENT%self.primary_objects.value,
                         cpmeas.COLTYPE_INTEGER)]

        return columns