How to generate various UID's?? - DICOM

This is a discussion on How to generate various UID's?? - DICOM ; Hi all I am working on a DICOM converter for converting images from jpeg format to DICOM format. I am using SC Image IOD , please clarify the following : a) "Series Instance UID" identifies a series of images within ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: How to generate various UID's??

  1. How to generate various UID's??

    Hi all I am working on a DICOM converter for converting images from
    jpeg

    format to DICOM format. I am using SC Image IOD , please clarify the

    following :
    a) "Series Instance UID" identifies a series of images within the
    examination (here series mean X-Ray MRI etc image??)

    b) "Study Instance UID" identifies whole examination, in time and
    place(what exactly does it means??)

    c) What is SOP instance (studied from d standard but not clear with
    it,
    so plz explain it in simple words)

    **d) How to generate the UID's i.e SOP Instance UID, Study Instance
    UID
    and Series Instance UID etc?? I studied from Part-5 Section-9 of
    standard, and all that i understood from it was that every country
    has
    its own format for generation of and generation
    has
    to be taken care by ourself.

    So first thing, If i belong to xyz place is it mandatory that i have
    to
    use the (which identifies organization) of that particular
    country only or i can use part provided by some third
    person
    from different country ??if yes is there any source from where i can
    ask
    for
    Now after getting the part of
    UID
    has to be generated by myself?? and I can form suffix by
    concatenating
    any of numeric digits(maintaining the uniqueness and keeping in mind
    the
    UID encoding rules in section-9 Part-5)??
    Once I am able to generate one UID say for instance
    i
    have generated a Series Instance UID and it is 1.2.840.xxxx.
    23.1212.1212
    then hope can i generate the other UID's(i.e SOP instance UID etc)
    from
    this ??

    I guess i asked too many queries but i have to be clear about them.
    Thanks in advance
    Navdeep

  2. Re: How to generate various UID's??

    > I have just used dummy id's to ask my queries that i still have
    > regarding UID's
    > --- For every image of same series say MRI etc (for two
    > different patients) "Series instance UID" will be
    > same always(since those images belong to same
    > series)?? (i have taken "3.1"in above case for all the MRI
    > images of both the patients)
    > -- Study Instance UID and SOP instance UID for two images
    > can NEVER be same irrespective of fact if those
    > images are of same series or different and are images
    > of pat1 or pat2 ??


    You can find the same UID in different place only when it identifies
    the very same thing. Images that belong to different patients cannot
    have the same Series Instance UID (or Study Instance UID). Images that
    belong to the same patient can have the same Series Instanc UID ONLY
    if they belong to the same series (and Study, of course). Two DICOM
    images, either dataset of a C-STORE-RQ or DICOM file, can have the
    same SOP Instance UID only if they belong to the same patient, to the
    some study, to the same series, and ARE in fact the very same image
    (even if in different files). If you change anything that can
    potentially affect the interpretation of the image, you should change
    the SOP Instance UID (for example, if you apply a lossy compression).

    Just another thing: you must use different UIDs, even if they
    represent different things: that is, for instance, you cannot use the
    same UID for the Study Instance UID and the Series Instance UID, even
    if this would not be ambiguous.

    > d) Once I am done with the generation of UID , is there any source
    > from where i can validate the generated UID just to check if it is
    > syntactically valid or not(though i can understand that i am the one
    > responsible for syntactic correctness)??


    As far as the syntax is involved, the rules are very simple and any
    DICOM checker will validate them: never put leading zeroes in any
    ".nnn." group (except ".0."), and do not exceed 64 characters (using
    the correct padding rule according to the circumstances).

    As far as the way the UID is generated is concerned, there should not
    be any way, for the simple reason that the UID should never be
    "parsed" by anybody, their only task is to be unique, not to carry any
    other information.

    As far as I remember, there is some product that checks the root
    against invalid values (not issued by an organization enabled by ISO),
    probably to avoid problems with "homemade" DICOM applications. In my
    opinion this is not correct, as I repeat, as far as you guarantee your
    UIDs are really unique, nobody should complain. Anyway, to be sure
    they are unique, the only way is to get your own root from a valid
    issuer.

    Regards.

    Luigi Pampana-Biancheri
    mailto:luigi.pampana@removethis.esaote.com

  3. Re: How to generate various UID's??

    On Jan 18, 3:16 pm, luigipb wrote:
    > > I have just used dummy id's to ask my queries that i still have
    > > regarding UID's
    > > --- For every image of same series say MRI etc (for two
    > > different patients) "Series instance UID" will be
    > > same always(since those images belong to same
    > > series)?? (i have taken "3.1"in above case for all the MRI
    > > images of both the patients)
    > > -- Study Instance UID and SOP instance UID for two images
    > > can NEVER be same irrespective of fact if those
    > > images are of same series or different and are images
    > > of pat1 or pat2 ??

    >
    > You can find the same UID in different place only when it identifies
    > the very same thing. Images that belong to different patients cannot
    > have the same Series Instance UID (or Study Instance UID). Images that
    > belong to the same patient can have the same Series Instanc UID ONLY
    > if they belong to the same series (and Study, of course). Two DICOM
    > images, either dataset of a C-STORE-RQ or DICOM file, can have the
    > same SOP Instance UID only if they belong to the same patient, to the
    > some study, to the same series, and ARE in fact the very same image
    > (even if in different files). If you change anything that can
    > potentially affect the interpretation of the image, you should change
    > the SOP Instance UID (for example, if you apply a lossy compression).
    >
    > Just another thing: you must use different UIDs, even if they
    > represent different things: that is, for instance, you cannot use the
    > same UID for the Study Instance UID and the Series Instance UID, even
    > if this would not be ambiguous.
    >
    > > d) Once I am done with the generation of UID , is there any source
    > > from where i can validate the generated UID just to check if it is
    > > syntactically valid or not(though i can understand that i am the one
    > > responsible for syntactic correctness)??

    >
    > As far as the syntax is involved, the rules are very simple and any
    > DICOM checker will validate them: never put leading zeroes in any
    > ".nnn." group (except ".0."), and do not exceed 64 characters (using
    > the correct padding rule according to the circumstances).
    >
    > As far as the way the UID is generated is concerned, there should not
    > be any way, for the simple reason that the UID should never be
    > "parsed" by anybody, their only task is to be unique, not to carry any
    > other information.
    >
    > As far as I remember, there is some product that checks the root
    > against invalid values (not issued by an organization enabled by ISO),
    > probably to avoid problems with "homemade" DICOM applications. In my
    > opinion this is not correct, as I repeat, as far as you guarantee your
    > UIDs are really unique, nobody should complain. Anyway, to be sure
    > they are unique, the only way is to get your own root from a valid
    > issuer.
    >
    > Regards.
    >
    > Luigi Pampana-Biancheri
    > mailto:luigi.pamp...@removethis.esaote.com


    Thanks a lot for clarifications
    cheers.ssssssss
    Navdeep

+ Reply to Thread