Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_measurement_columns(self, pipeline):
'''Return information to use when creating database columns'''
orig_image_name = self.object_name.value
filtered_image_name = self.filtered_objects.value
columns = I.get_object_measurement_columns(filtered_image_name)
columns += [(orig_image_name,
I.FF_CHILDREN_COUNT % filtered_image_name,
cpmeas.COLTYPE_INTEGER),
(filtered_image_name,
I.FF_PARENT % orig_image_name,
cpmeas.COLTYPE_INTEGER)]
return columns
def get_measurement_columns(self, pipeline):
'''Return column definitions for measurements made by this module'''
subregion_name = self.subregion_objects_name.value
columns = cpmi.get_object_measurement_columns(subregion_name)
for parent in (self.primary_objects_name.value,
self.secondary_objects_name.value):
columns += [(parent,
cpmi.FF_CHILDREN_COUNT%subregion_name,
cpmeas.COLTYPE_INTEGER),
(subregion_name,
cpmi.FF_PARENT%parent,
cpmeas.COLTYPE_INTEGER)]
return columns
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'''
object_name = self.object_name.value
remaining_object_name = self.remaining_objects.value
columns = I.get_object_measurement_columns(self.remaining_objects.value)
columns += [(object_name, I.FF_CHILDREN_COUNT % remaining_object_name,
cpmeas.COLTYPE_INTEGER),
(remaining_object_name, I.FF_PARENT % object_name,
cpmeas.COLTYPE_INTEGER)]
return columns