def get_measurement_columns(self, pipeline): '''Return columns that define the measurements produced by this module''' result = get_object_measurement_columns(self.straightened_objects_name.value) if self.wants_measurements: nsegments = self.number_of_segments.value nstripes = self.number_of_stripes.value if nsegments > 1: result += [(self.straightened_objects_name.value, "_".join((C_WORM, ftr, group.straightened_image_name.value, self.get_scale_name(None, segment))), cpmeas.COLTYPE_FLOAT) for ftr, group, segment in product((FTR_MEAN_INTENSITY, FTR_STD_INTENSITY), self.images, range(nsegments))] if nstripes > 1: result += [(self.straightened_objects_name.value, "_".join((C_WORM, ftr, group.straightened_image_name.value, self.get_scale_name(stripe, None))), cpmeas.COLTYPE_FLOAT) for ftr, group, stripe in product((FTR_MEAN_INTENSITY, FTR_STD_INTENSITY), self.images, range(nstripes))] if nsegments > 1 and nstripes > 1: result += [(self.straightened_objects_name.value, "_".join((C_WORM, ftr, group.straightened_image_name.value, self.get_scale_name(stripe, segment))), cpmeas.COLTYPE_FLOAT) for ftr, group, stripe, segment in product((FTR_MEAN_INTENSITY, FTR_STD_INTENSITY), self.images, range(nstripes), range(nsegments))] return result
def get_measurement_scales(self, pipeline, object_name, category, measurement, image_name): result = [] if image_name in self.get_measurement_images( pipeline, object_name, category, measurement): nsegments = self.number_of_segments.value nstripes = self.number_of_stripes.value if nsegments > 1: result += [self.get_scale_name(None, segment) for segment in range(nsegments)] if nstripes > 1: result += [self.get_scale_name(stripe, None) for stripe in range(nstripes)] if nstripes > 1 and nsegments > 1: result += [self.get_scale_name(h, v) for h,v in product( range(nstripes), range(nsegments))] return result