DigitalSlideArchive / HistomicsTK

A Python toolkit for pathology image analysis algorithms.
https://digitalslidearchive.github.io/HistomicsTK/
Apache License 2.0
395 stars 117 forks source link

histomicstk.features.compute_nuclei_features output column name 'Identifier.Centroid' is wrong #1118

Closed Bejsernia closed 4 months ago

Bejsernia commented 4 months ago

histomicstk vesion: 1.3.8

The function in _histomicstk.features.compute_nucleifeatures:

def process_nucleus(nprop, im_nuclei_bool):
    for nprop in nuclei_props:
        row = {
            'Label': nprop.label,
            'Identifier.Xmin': nprop.bbox[1],
            'Identifier.Ymin': nprop.bbox[0],
            'Identifier.Xmax': nprop.bbox[3],
            'Identifier.Ymax': nprop.bbox[2],
            'Identifier.Centroid': nprop.centroid[1],
            'Identifier.CentroidY': nprop.centroid[0],
        }
        if im_nuclei_bool:
            wcy, wcx = nprop.weighted_centroid
            row['Identifier.WeightedCentroidX'] = wcx
            row['Identifier.WeightedCentroidY'] = wcy
        data.append(row)
    return pd.DataFrame(data)

line186: 'Identifier.Centroid' should be 'Identifier.CentroidX'

manthey commented 4 months ago

@Bejsernia Thank you for finding this