[Insight-users] Problem with writing DICOM using KeepOriginalUID

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Apr 24 02:55:35 EDT 2009


[for reference]

The problem will be gone on your machine for now. But it rely on the
fact that the encoding for your hardware mac address in base 10 takes
fewer bytes than some other mac address, so you might bump into this
problem on another machine :(

I am working with some Mac guru to access the uuid_generate API on the Mac.

2cts

On Thu, Apr 23, 2009 at 11:56 PM, Martin Kavec <martin.kavec at gmail.com> wrote:
> Hi Mathieu,
>
> I went for the cvs of ITK and the problem is gone. It seems that the UID is
> now generated robustly.
>
> Many thanks for solving this,
>
> Martin
>
> On Thu, Apr 23, 2009 at 10:20 PM, Mathieu Malaterre
> <mathieu.malaterre at gmail.com> wrote:
>>
>> On Thu, Apr 23, 2009 at 9:57 PM, Martin Kavec <martin.kavec at gmail.com>
>> wrote:
>> >
>> >
>> > On Thu, Apr 23, 2009 at 12:50 PM, Mathieu Malaterre
>> > <mathieu.malaterre at gmail.com> wrote:
>> >>
>> >> On Wed, Apr 22, 2009 at 10:03 PM, Martin Kavec <martin.kavec at gmail.com>
>> >> wrote:
>> >> > I have 182 files (slices) in the output directories for the both
>> >> > situations,
>> >> > KeppOriginalUID On and commeted out. Please note that the number of
>> >> > slices
>> >> > (files) omitted by Osirix varies. If I run my code multiple times
>> >> > slices
>> >> > at
>> >> > different positions and different number of slices is omitted. So
>> >> > this
>> >> > problem is a bit intermittent. For this particular run there were 180
>> >> > slices
>> >> > recognized.
>> >>
>> >> ok
>> >>
>> >> >> 4. The the number of SOP Instance UID in one dir is equal to the one
>> >> >> in the other one.
>> >> >
>> >> > Not OK. The number of unique SOPInstanceUID and
>> >> > MediaStorageSOPInstanceUID is
>> >> > correct (182) for the series with KeepOriginalOn commented out, and
>> >> > 181
>> >> > WITH
>> >> > KeepOriginalOn.
>> >> >
>> >> > After a while I identified the two files having the same
>> >> > SOPInstanceUID
>> >> > and
>> >> > MediaStorageSOPInstanceUID, I changed them to a unique ones (checked
>> >> > that)
>> >> > and now Osirix reads in 181 slices, that is one more. But still one
>> >> > slice is
>> >> > missing.
>> >>
>> >> Can you send me a couple of those SOP Instance UID. I vaguely recall
>> >> an issue in gdcm 1.2.4 where the generation of unique UIDs was not
>> >> robust.
>> >
>> > Here they go:
>> >
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380994675]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380994951]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380998846]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380998828]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380998817]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380998915]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380998957]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380999080]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380999003]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380999053]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380999149]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380999195]
>> > #
>> > 62,1 SOP Instance UID
>> > (0008,0018) UI
>> > [1.2.826.0.1.3680043.2.1125.1.102857387392.2009042219380994983]
>> > #
>> > 62,1 SOP Instance UID
>>
>> Ok, so this is the old (buggy) implementation. On Linux system in
>> order to use a better uuid generator, you need to install the
>> developmement file for libuuid. Typically on debian you would do:
>>
>>  sudo apt-get install uuid-dev
>>
>> Anyway ITK CVS HEAD should have something a little more robust
>> -hopefully-.
>>
>> Thanks,
>> --
>> Mathieu
>
>



-- 
Mathieu


More information about the Insight-users mailing list