[Insight-users] Problem with writing DICOM using KeepOriginalUID

Mathieu Malaterre mathieu.malaterre at gmail.com
Thu Apr 23 08:37:00 EDT 2009


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.

I am pretty sure you are using the old implementation of the unique
UID generator. I have tried to make it as robust as possible. Switch
to ITK CVS HEAD if you can.

$ cvs ci -m"ENH: lets try to use all possible bytes to generate unique
UID, to avoid mistake as much as possible. Also warn user when using
the internal implementation."
/cvsroot/Insight/Insight/Testing/Code/IO/itkGDCMSeriesReadImageWrite.cxx,v
 <--  Testing/Code/IO/itkGDCMSeriesReadImageWrite.cxx
new revision: 1.12; previous revision: 1.11
/cvsroot/Insight/Insight/Utilities/gdcm/CMakeLists.txt,v  <--
Utilities/gdcm/CMakeLists.txt
new revision: 1.25; previous revision: 1.24
/cvsroot/Insight/Insight/Utilities/gdcm/src/gdcmGlobal.cxx,v  <--
Utilities/gdcm/src/gdcmGlobal.cxx
new revision: 1.7; previous revision: 1.6
/cvsroot/Insight/Insight/Utilities/gdcm/src/gdcmUtil.cxx,v  <--
Utilities/gdcm/src/gdcmUtil.cxx
new revision: 1.45; previous revision: 1.44


-- 
Mathieu


More information about the Insight-users mailing list