예제 #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
    def get_measurement_columns(self, pipeline):
        '''Return column definitions for measurements made by this module'''
        columns = identify.get_object_measurement_columns(self.objects_name.value)
        columns += [(self.primary_objects.value,
                     cellprofiler.measurement.FF_CHILDREN_COUNT % self.objects_name.value,
                     cellprofiler.measurement.COLTYPE_INTEGER),
                    (self.objects_name.value,
                     cellprofiler.measurement.FF_PARENT % self.primary_objects.value,
                     cellprofiler.measurement.COLTYPE_INTEGER)]
        if self.method != M_DISTANCE_N:
            columns += super(IdentifySecondaryObjects, self).get_measurement_columns(pipeline)
        if self.wants_discard_edge and self.wants_discard_primary:
            columns += identify.get_object_measurement_columns(self.new_primary_objects_name.value)
            columns += [(self.new_primary_objects_name.value,
                         cellprofiler.measurement.FF_CHILDREN_COUNT % self.objects_name.value,
                         cellprofiler.measurement.COLTYPE_INTEGER),
                        (self.objects_name.value,
                         cellprofiler.measurement.FF_PARENT % self.new_primary_objects_name.value,
                         cellprofiler.measurement.COLTYPE_INTEGER)]
            columns += [(self.primary_objects.value,
                         cellprofiler.measurement.FF_CHILDREN_COUNT % self.new_primary_objects_name.value,
                         cellprofiler.measurement.COLTYPE_INTEGER),
                        (self.new_primary_objects_name.value,
                         cellprofiler.measurement.FF_PARENT % self.primary_objects.value,
                         cellprofiler.measurement.COLTYPE_INTEGER)]

        return columns
예제 #4
0
    def get_measurement_columns(self, pipeline):
        columns = []
        for file_setting in self.file_settings:
            if file_setting.image_objects_choice == IO_IMAGES:
                image_name = file_setting.image_name.value
                path_name_category = C_PATH_NAME
                file_name_category = C_FILE_NAME
                columns += [
                    (cpmeas.IMAGE, "_".join((C_MD5_DIGEST, image_name)),
                     cpmeas.COLTYPE_VARCHAR_FORMAT % 32),
                    (cpmeas.IMAGE, "_".join(
                        (C_SCALING, image_name)), cpmeas.COLTYPE_FLOAT),
                    (cpmeas.IMAGE, "_".join(
                        (C_HEIGHT, image_name)), cpmeas.COLTYPE_INTEGER),
                    (cpmeas.IMAGE, "_".join(
                        (C_WIDTH, image_name)), cpmeas.COLTYPE_INTEGER)
                ]
            else:
                image_name = file_setting.objects_name.value
                path_name_category = C_OBJECTS_PATH_NAME
                file_name_category = C_OBJECTS_FILE_NAME
                columns += get_object_measurement_columns(image_name)

            columns += [(cpmeas.IMAGE, '_'.join(
                (feature, image_name)), coltype) for feature, coltype in (
                    (file_name_category, cpmeas.COLTYPE_VARCHAR_FILE_NAME),
                    (path_name_category, cpmeas.COLTYPE_VARCHAR_PATH_NAME),
                )]
        return columns
예제 #5
0
    def get_measurement_columns(self, pipeline):
        columns = []
        for file_setting in self.file_settings:
            if file_setting.image_objects_choice == IO_IMAGES:
                image_name = file_setting.image_name.value
                path_name_category = C_PATH_NAME
                file_name_category = C_FILE_NAME
                columns += [
                    (cpmeas.IMAGE, "_".join((C_MD5_DIGEST, image_name)), cpmeas.COLTYPE_VARCHAR_FORMAT % 32),
                    (cpmeas.IMAGE, "_".join((C_SCALING, image_name)), cpmeas.COLTYPE_FLOAT),
                    (cpmeas.IMAGE, "_".join((C_HEIGHT, image_name)), cpmeas.COLTYPE_INTEGER),
                    (cpmeas.IMAGE, "_".join((C_WIDTH, image_name)), cpmeas.COLTYPE_INTEGER),
                ]
            else:
                image_name = file_setting.objects_name.value
                path_name_category = C_OBJECTS_PATH_NAME
                file_name_category = C_OBJECTS_FILE_NAME
                columns += get_object_measurement_columns(image_name)

            columns += [
                (cpmeas.IMAGE, "_".join((feature, image_name)), coltype)
                for feature, coltype in (
                    (file_name_category, cpmeas.COLTYPE_VARCHAR_FILE_NAME),
                    (path_name_category, cpmeas.COLTYPE_VARCHAR_PATH_NAME),
                )
            ]
        return columns
    def get_measurement_columns(self, pipeline):
        '''Return database info on measurements made in module

        pipeline - pipeline being run

        Return a list of tuples of object name, measurement name and data type
        '''
        result = I.get_object_measurement_columns(self.objects_name.value)
        return result
 def get_measurement_columns(self, pipeline):
     '''Return database info on measurements made in module
     
     pipeline - pipeline being run
     
     Return a list of tuples of object name, measurement name and data type
     '''
     result = I.get_object_measurement_columns(self.objects_name.value)
     return result
 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
예제 #9
0
 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
예제 #10
0
 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
예제 #11
0
 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
 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
예제 #13
0
 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
예제 #14
0
 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
예제 #15
0
 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