Skip to content

refactoring the image writer modules #3595

@wyli

Description

@wyli

This is a follow-up on the image writer of the previous I/O module proposals.

Goal and anticipated benefits

The current image writing module has been primarily built around the NIfTI specifications using the nibabel package as the backend.
The goal is to redesign the module in order to decouple the universal and the backend-specific implementations.

This will make it easier to bring in various writer backends such as ITK-Python, therefore supporting different image formats and more powerful writer module customisations.

related tickets: #2620 #2613 Project-MONAI/MONAILabel#211
proof of concept #3443

Details

The writer module should have (1) universal logic (2) backend-specific logic (3) mechanism for defaulting/selecting backends. Specifically:

(1) In the context of image writing, the universal logic handles the image-related outputs from the deep learning workflows, such as:

  • fetching data array and metadata
  • arrangements/resampling of spatial/channel dimensions
  • preparing target data types
  • preparing output folder structures, potentially compatible with BIDS (brain imaging data structure) and NDWB (neurodata without boarders)

(2) The backend-specific logic includes

  • creating data representations according to the backend APIs
  • calling the backend APIs to finish the data writing

(3) The backend selection logic operates based on the user-specified parameters, backend system availability, and current system default configurations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Feature requestModule: datadatasets, readers/writers, synthetic dataModule: transformdata transforms for preprocessing and postprocessing.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions