Skip to content

Add IntensityStats transform #2679

Description

@Nic-Ma

Is your feature request related to a problem? Please describe.
Currently, we have original_shape, original_affine, etc. in the meta_dict, I suggest to also store the max, mean, std, etc. of the intensity of input image in the meta dict, then the following transforms can dynamically use it as parameters to scale/shift/clip values instead of fixed value for all the images.
For example:

[
    LoadImaged("image")
    EnsureChannelFirstd("image"),
    IntensityStatsd("image", key_prefix="orig", ops=["max", "std"]),
    RandScaleIntensityd("image"),
    RandShiftIntensityd("image", offset=0.1, src="orig_std"),
    ThresholdIntensityd("image", threshold="orig_max", above=True, cval="orig_max"),
]

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions