Skip to content

Error at Intensity Feature extraction #10

@QuyANgo

Description

@QuyANgo

Hello,

Thank you very much for this very nice NMCO pipeline.

When I ran your notebook Nuclear_Feature.ipynb, at the step of extracting Intensity features, I got the following error. Could you please check it and provide a fix for it?

Many thanks!


IndexError Traceback (most recent call last)
in <cell line: 2>()
1 # Below are the features computed for 4 nuclei.
----> 2 Int_feat= pd.concat([IDF.measure_intensity_features(props[nuc_of_interest[0]].image,props[nuc_of_interest[0]].intensity_image),
3 IDF.measure_intensity_features(props[nuc_of_interest[1]].image,props[nuc_of_interest[1]].intensity_image),
4 IDF.measure_intensity_features(props[nuc_of_interest[2]].image,props[nuc_of_interest[2]].intensity_image),
5 IDF.measure_intensity_features(props[nuc_of_interest[3]].image,props[nuc_of_interest[3]].intensity_image)])

1 frames
/usr/local/lib/python3.10/dist-packages/nmco/nuclear_features/int_dist_features.py in intensity_histogram_measures(regionmask, intensity)
63 "int_max": np.percentile(intensity[regionmask], 100),
64 "int_mean": np.mean(intensity[regionmask]),
---> 65 "int_mode": stats.mode(intensity[regionmask], axis=None)[0][0],
66 "int_sd": np.std(intensity[regionmask]),
67 "kurtosis": float(kurtosis(intensity[regionmask].ravel())),

IndexError: invalid index to scalar variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions