You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ITK MetaImage (.mha/.raw, .mhd)
Neuroimaging Informatics Technology Initiative (NIfTI) (.nia, .nii, .nii.gz, .hdr, .img, .img.gz)
Analyze (plain, SPM99, SPM2) (.hdr/.img, .img.gz)
Digital Imaging and Communications in Medicine (DICOM) (.dcm, .dicom)
Digital Imaging and Communications in Medicine (DICOM) series (/)
Nearly Raw Raster Data (Nrrd) (.nrrd, .nhdr)
Medical Imaging NetCDF (MINC) (.mnc, .MNC)
Guys Image Processing Lab (GIPL) (.gipl, .gipl.gz)
Microscopy formats:
Medical Research Council (MRC) (.mrc, .rec)
Bio-Rad (.pic, .PIC)
LSM (Zeiss) microscopy images (.tif, .TIF, .tiff, .TIFF, .lsm, .LSM)
Stimulate / Signal Data (SDT) (.sdt)
Visualization formats:
VTK images (.vtk)
Other formats:
Portable Network Graphics (PNG) (.png, .PNG)
Joint Photographic Experts Group (JPEG) (.jpg, .JPG, .jpeg, .JPEG)
Tagged Image File Format (TIFF) (.tif, .TIF, .tiff, .TIFF)
Windows bitmap (.bmp, .BMP)
Hierarchical Data Format (HDF5) (.h5 , .hdf5 , .he5)
MSX-DOS Screen-x (.ge4, .ge5)
Therefore, I think we do not need NibabelReader and PILReader. If I am wrong, please let me know.
The structure of code need to be improved.
We have image_reader.py which includes several different ImageReaders(ITKReader, NibabelReader, PILReader and NumpyReader). It loos good. And I expected that we should also have a corresponding image_writer.py and/or image_saver.py. However I can not find them in the same directory. I only find nifty_writer.py, nifti_saver.py, png_writer.py and png_saver.py. I think nowthat we put all kinds of ImageReader into one image_reader.py file, why not put all corresponding ImageSavers into one image_saver.py file?
As described in the above paragraph, we have 4 Readers: ITKReader, NibabelReader, PILReader and NumpyReader yet. And we only have 2 ImageSavers: NiftiSaver and PNGSaver. I feel confused on it. Which Reader corresponds to which Saver? It seems that NiftiSaver used Nibabel internally. So maybe we should replace NiftiSaver with NibabelSaver? Similly, the PNGSaver calls PIL internally, so maybe the PNGSaver should be called "PILSaver"? Then where is other Savers like ITKSaver and NumpySaver? Anyway we should have a more consistent names for these Reader/Savers.
As described in the above paragraph, we have NiftiSaver. And from the name of this Saver I thought it could used to save images with extension of only '.nii' or '.nii.gz'. But actually, it can also be used to save non-nifti files like ".mha", right? If yes, then we need to change the name of this Saver.
The text was updated successfully, but these errors were encountered:
Jingnan-Jia
changed the title
The name of different Savers/Writer are not consistent
The name of different Savers/Writers are not consistent
Feb 7, 2021
Jingnan-Jia
changed the title
The name of different Savers/Writers are not consistent
The names of different Savers/Writers are not consistent
Feb 8, 2021
Great point! The plan (#856) is to have Image_Reader use ITK by default, and allow other readers to be used on demand.
The challenge is that until ITK 5.2, there were issues with supporting how some of the deep learning data was being stored (e.g., as 4D images instead of as 3D images with multiple channels) which was not well handled by ITK.
That has now been fixed in ITK, so hopefully we can re-start the refactoring of the I/O to provide a single, simple interface. I agree that right now it is hampering code portability and causing confusion.
I have the following questions:
ITKReader
, why do we still needNibabelReader
andPILReader
?ITKReader
can read nearly all kinds of images:Therefore, I think we do not need
NibabelReader
andPILReader
. If I am wrong, please let me know.The structure of code need to be improved.
We have
image_reader.py
which includes several differentImageReaders
(ITKReader
,NibabelReader
,PILReader
andNumpyReader
). It loos good. And I expected that we should also have a correspondingimage_writer.py
and/orimage_saver.py
. However I can not find them in the same directory. I only findnifty_writer.py
,nifti_saver.py
,png_writer.py
andpng_saver.py
. I think nowthat we put all kinds ofImageReader
into oneimage_reader.py
file, why not put all correspondingImageSavers
into oneimage_saver.py
file?As described in the above paragraph, we have 4
Readers
:ITKReader
,NibabelReader
,PILReader
andNumpyReader
yet. And we only have 2ImageSavers
:NiftiSaver
andPNGSaver
. I feel confused on it. WhichReader
corresponds to whichSaver
? It seems thatNiftiSaver
usedNibabel
internally. So maybe we should replaceNiftiSaver
withNibabelSaver
? Similly, thePNGSaver
callsPIL
internally, so maybe thePNGSaver
should be called "PILSaver"? Then where is otherSavers
likeITKSaver
andNumpySaver
? Anyway we should have a more consistent names for these Reader/Savers.As described in the above paragraph, we have
NiftiSaver
. And from the name of thisSaver
I thought it could used to save images with extension of only '.nii' or '.nii.gz'. But actually, it can also be used to savenon-nifti
files like ".mha", right? If yes, then we need to change the name of thisSaver
.The text was updated successfully, but these errors were encountered: