Skip to content

Transforms not updating meta data #2424

@Spenhouet

Description

@Spenhouet

Is your feature request related to a problem? Please describe.

I would have expected that every transform has as input the image and the meta_data dict.
This is not the case for many transforms. They do not update the meta_data.
This leads to inconsistencies and errors since after the transforms the meta_data is no longer valid.

For example:

  • AddChannel adds a new channel but does not update the dim, spatial_shape or original_channel_dim in meta_data.
  • Spacing returns the new affine but does not update the dim, pixdim, affine or spatial_shape in meta_data.

This is really frustrating. Some transforms are written very well while others are not that great.

Describe the solution you'd like

Please update the meta_data in all transformations. This would also add consistency if every transform expects and returns the meta_data dict.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions