-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
image data reader and LoadImage transform refactoring #909
Comments
thanks for the discussion @Nic-Ma let's use this ticket to raise any detailed technical issues |
Mark: completed 2 tasks in the list, will work on |
before deprecating the previous loaders, would be very helpful to have a new tutorial to demonstrate the new interfaces, what do you think @Nic-Ma? |
Hi @wyli , Sounds good a plan. Thanks. |
this ticket is currently blocked at InsightSoftwareConsortium/ITK#2003 because the default is MONAI/monai/transforms/io/array.py Lines 62 to 63 in 99f7a43
|
Here is the plan for this ticket in v0.4 development:
Thanks. |
Will deprecate |
This is a follow-up of #856 to track the progress of a preliminary IO refactoring.
Goal
The main goal of this ticket is to create a file format agnostic wrapper for the image inputs (
LoadImage
andLoadImaged
).A typical use case (enhancing the current
NiftiDataset
) is:where
images
andsegs
are filenames,ImageDataset
internally invokesLoadImage
.Or using a generic monai Dataset API, specify the first component of
train_imtrans
as aLoadImage
transform that extracts data array and meta data from the file.More specifically:
Reader (file format-specific component)
[format]reader
are themselves monai data components (users can use the readers without going through theLoadImage
logic), they call external package APIs[format]reader
share the same superclassImageReader
interface (for handling physical/voxel resolution, orientation...)MyReader
by implementing theImageReader
interfaceMyReader
could be registered with theLoadImage
factoryLoadImage(file format agnostic component)
LoadImage
is a monai transformLoadImaged
should return the same underlying data representation dictionary regardless of the image format.LoadImage
may choose a suitable[format]reader
dynamically at runtime based on the following rules (ordered from high to low priority):LoadImage(reader='ITkReader')
additional requirements
tasks
ImageReader
, factory (transforms)LoadImage
LoadImaged
LoadImage
selecting readers according to the preference listNiftiDataset
, addImageDataset
LoadNifti
,LoadPNG
,LoadNumpy
,LoadDatad
The text was updated successfully, but these errors were encountered: