[ITK] Writing a 3D image into DICOM series with correct geometry

Matt McCormick matt.mccormick at kitware.com
Tue Jul 18 16:32:25 EDT 2017


Hi Fijoy,

One of the goals of this project is to improve writing DICOM series:

  https://github.com/KitwareMedical/ITKDICOM

Can we use your dataset for a testing example?

Thanks,
Matt

On Mon, Jul 10, 2017 at 11:54 AM, Fijoy Vadakkumpadan <tofijoy at gmail.com> wrote:
> Hi Francois,
>
> Even after explicitly setting the geometry metadata before saving the DICOM
> series, the metadata is not loaded back when I read the saved image in ITK.
> I believe ITK saves the metadata (I can see it when I load the saved series
> in ImageJ), but it's just not loaded back.
>
> It seems to me that ITK/GDCM saves the DICOM series under Secondary Capture
> SOP class by default, and since the geometry metadata are not mandatory for
> this class, ITK just doesn't load it back. When I change the SOP class (see
> Stackoverflow post below), the geometry metadata are indeed loaded back.
>
> Do you or anyone else here know if there is another appropriate SOP class
> that we can save images coming from non-DICOM sources such that the geometry
> metadata are saved & loaded by ITK/GDCM?
>
> https://stackoverflow.com/questions/40462879/image-position-orientation-not-written-when-saving-itkimage-as-dicom
>
> Thanks,
> --Fijoy
>
>
> On Fri, Jul 7, 2017 at 12:43 PM, Francois Budin <francois.budin at kitware.com>
> wrote:
>>
>> Hello Fijoy,
>>
>> As far as I know this example is the best way to do what you are trying to
>> do. ITK does not currently have an easy way to save an itk::Image as a DICOM
>> series.
>> Thanks,
>>
>> Francois
>>
>> On Fri, Jul 7, 2017 at 11:04 AM, Fijoy Vadakkumpadan <tofijoy at gmail.com>
>> wrote:
>>>
>>> Hello,
>>>
>>> What is the best way to write a 3D itk::Image to DICOM series in a way
>>> that preserves geometry metadata (slice positions, orientation, and
>>> spacing)?
>>>
>>> The itk::Image I'm referring to is coming from a non-DICOM source. I
>>> tried to use itk::ImageSeriesWriter with itk::GDCMImageIO as the IO type to
>>> do the above writing. But that does not seem to automatically pick up the
>>> metadata from the image object - when I read the written series back (using
>>> itk::ImageSeriesReader), only the in-plane spacing is correctly set. After
>>> some research, I found this example
>>>
>>> https://itk.org/Wiki/ITK/Examples/DICOM/ResampleDICOM
>>>
>>> which explicitly sets the metadata dictionary for each slice before
>>> writing. Is this the best way?
>>>
>>> Thanks,
>>> --Fijoy
>>>
>>> _______________________________________________
>>> Community mailing list
>>> Community at itk.org
>>> http://public.kitware.com/mailman/listinfo/community
>>>
>>
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>


More information about the Community mailing list