Skip to content

Add intensity_median to regionprops #7742

@imagejan

Description

@imagejan

Description:

We have intensity_min, intensity_mean and intensity_max in regionprops already:

@property
def intensity_max(self):
vals = self.image_intensity[self.image]
return np.max(vals, axis=0).astype(np.float64, copy=False)
@property
def intensity_mean(self):
return np.mean(self.image_intensity[self.image], axis=0)
@property
def intensity_min(self):
vals = self.image_intensity[self.image]
return np.min(vals, axis=0).astype(np.float64, copy=False)

What about adding intensity_median as well, backed by np.median in a similar way as the other props?

I can open a pull request if there are no general objections against this idea.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions