Sitk.ReadImage Supported Types

Hello everyone,

I am using SimpleITK library for reading MRA images. For example we are work on dcm and nii file and this can be work with Sitk.ReadImage but I dont know in the future that What file types can we encounter ?

Which file types generally supported for Sitk.ReadImage function? I examine Reading and Writing for Images and Transforms β€” SimpleITK 2.0rc2 documentation and Advanced Image Reading β€” SimpleITK 2.0rc2 documentation web pages and I understand that Sitk.ReadImage support TIFFImageIO, MetaImageIO , NrrdImageIO ,NrrdImageIO, MRCImageIO, VTKImageIO and subtypes of them.

I dont know above many of them. Can you explain simply or send link about information them?

Which one does Dicom fall into? I find that [GDCMImageIO] and I am thinking that dcm enter this group. In addition .Ima files supported sitk.ReadImage but Δ°t doesnt write web patch part. Can someone help me about these?

Best Regards.

Hello @Furkan_Gokhan,

To see which image IO components are supported by the specific version of SimpleITK:

import SimpleITK as sitk

File extensions are often used to denote a specific file type but this is only a convention. That is, a file called image.png can be in jpg format or any other format. There is no required file naming associated with the file format. Files in DICOM format often have a .dcm or .ima extension. Sometimes they have no extension.

ITK/SimpleITK attempt to read a given file using the various IOs irrespective of the file name. The first IO that can read the file is used to do so. This means that if there are multiple IO components that can read a file, e.g. LSMImageIO and TIFFImageIO can both read tif, the first reader will be used if the developer doesn’t explicitly specify one. If the developer sets a specific ImageIO that is what will be used.

With respect to the details of the different file formats, that is outside the scope of ITK/SimpleITK (see wikipedia or search online).

1 Like