Skip to content

aggregate-images: Unexpected results #691

@soundray

Description

@soundray

When processing images with only natural numbers in mode/majority mode, aggregate-images generates images containing non-natural numbers. Expected result is for all voxel values in the output to be members of the set of voxel values in the input images. Sample session (where the result agg.nii.gz is expected to be identical to the input seg95.nii.gz):

$ info seg95.nii.gz | grep type
Voxel type is unsigned char
$ calculate-element-wise seg95.nii.gz
Mean = 9.9747
Standard deviation = 20.819
Extrema = [0, 95]
Range = 95
$ aggregate-images mode seg95.nii.gz seg95.nii.gz seg95.nii.gz -output agg.nii.gz
$ info agg.nii.gz | grep type
Voxel type is float
$ calculate-element-wise agg.nii.gz
Mean = 10.542
Standard deviation = 20.553
Extrema = [0.74219, 94.258]
Range = 93.516
$

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