[ITK] Can python sitk.ReadImage read a list of images?

Dženan Zukić dzenanz at gmail.com
Fri Jul 14 08:49:42 EDT 2017


Hi Oren,

does ImageSeriesReader
<https://itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ImageSeriesReader.html>
work for you?

Regards,
Dženan Zukić, PhD, Senior R&D Engineer, Kitware (Carrboro, N.C.)

On Fri, Jul 14, 2017 at 3:11 AM, Oren <oren.a4 at gmail.com> wrote:

> Hello,
> I do not understand if sitk.ReadImage can read a list of images or not? I
> did not manage to find an example showing how to list of images should be
> imputed to the function.
> But in the function documentations it say:
>
> ReadImage(*VectorString fileNames*, itk::simple::PixelIDValueEnum outputPixelType) -> Image
> ReadImage(std::string const & filename, itk::simple::PixelIDValueEnum outputPixelType) -> Image
>
>
>
> ReadImage is a procedural interface to the ImageSeriesReader class which is convenient for most image reading tasks.
>
>
> Note that when *reading a series of images* that have meta-data
> associated with them (e.g. a DICOM series) the resulting image will
> have an empty meta-data dictionary. It is possible to programmatically
> add a meta-data dictionary to the compounded image by reading in one
> or more images from the series using the ImageFileReader class,
> analyzing the meta-dictionary associated with each of those images and
> creating one that is relevant for the compounded image.
>
>
>
> So it seems from the documentations that it is possible. Can someone show
> me a simple example.
>
> I also posted the question in stackoverflow in case anyone else will ask
> it in the future:
>
> https://stackoverflow.com/questions/45096861/can-python-
> sitk-readimage-read-a-list-series-of-images
>
> Thanks.
>
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20170714/4c4d14c6/attachment.html>


More information about the Community mailing list