ArcanaFramework / arcana

Abstraction of Repository Centric ANAlysis
Other
4 stars 5 forks source link

[STORY] Add converter arg to dcm2niix to enable 3D -> 4D conversion #128

Closed tclose closed 2 years ago

tclose commented 2 years ago

Metadata

Epic: Australian-Imaging-Service/pipelines#17 Feature: Australian-Imaging-Service/pipelines#39 Feature Release:

Description

In order to support the implementation of QSIPrep as a BIDS app we need to be able to convert a 3D reverse-phase-encoded reference image into a 4D DWI image so it can be concatenated with the forward-phase dataset. Probably the best place to do this is in the dcm2niix converter via a converter arg

Acceptance Criteria

Notes

The dcm2niix converter is implemented here

https://github.com/Australian-Imaging-Service/arcana/blob/436156180c19c0b7623cbc18057f2853ef097f79/arcana/data/formats/medimage.py#L254-L311

To add a new converter arg, simply add a new argument to the function signature (e.g. as_4d or something better).

MRConvert is able to convert 3D images to 4D, so it could be implemented in a very similar way to the extract_volume converter arg, even using most of the same code (these arguments should be mutually exclusive so a check should be added for them both being not None)

tclose commented 2 years ago

This just needs #173 I believe