DCMTK -> storescu -> DIMSE Warning: CStoreRQ: AffectedSOPInstanceUID: bad size - DICOM

This is a discussion on DCMTK -> storescu -> DIMSE Warning: CStoreRQ: AffectedSOPInstanceUID: bad size - DICOM ; The value for tag (0008,0018) for a DICOM image is 1.3.12.2.1107.5.2.13.20507.30000004100512425468700 001708.000.11 and I can use DCMTK's storescu to store this image into PACS without problem. Now I use dcmodify to append ".11" to the above value so that the ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: DCMTK -> storescu -> DIMSE Warning: CStoreRQ: AffectedSOPInstanceUID: bad size

  1. DCMTK -> storescu -> DIMSE Warning: CStoreRQ: AffectedSOPInstanceUID: bad size

    The value for tag (0008,0018) for a DICOM image is
    1.3.12.2.1107.5.2.13.20507.30000004100512425468700 001708.000.11
    and I can use DCMTK's storescu to store this image into PACS without
    problem.


    Now I use dcmodify to append ".11" to the above value so that the new
    value for tag (0008,0018) is
    1.3.12.2.1107.5.2.13.20507.30000004100512425468700 001708.000.11.11

    However, after this modification, i can't use storescu any more on
    this image, and below is the error message.


    DIMSE Warning: (DIALPIPE,ANY-SCP): CStoreRQ: AffectedSOPInstanceUID:
    bad size
    storescu: Store Failed, file: m000-batch_save_001.ROI-1.ps.dcm:
    0006:0203 DIMSE Badly formed message
    storescu: SCU Failed:
    0006:0203 DIMSE Badly formed message

  2. Re: DCMTK -> storescu -> DIMSE Warning: CStoreRQ: AffectedSOPInstanceUID: bad size

    Jie Huang wrote:

    > 1.3.12.2.1107.5.2.13.20507.30000004100512425468700 001708.000.11.11


    1. The new UID is too long (64 characters maximum, see Part 5).
    2. Both UIDs the new and the old one are invalid (leading 0s not allowed).
    3. You cannot guarantee that the new UID is unique by appending '.11'
    (prefix is from Siemens:
    http://www.alvestrand.no/objectid/1.3.12.2.1107.html )

    You could e.g. use dcmGenerateUniqueIdentifier() from the DCMTK to
    generate a new UID.

    Regards,
    Joerg Riesmeier
    OFFIS

  3. Re: DCMTK -> storescu -> DIMSE Warning: CStoreRQ: AffectedSOPInstanceUID: bad size

    Dear Mr. Riesmeier:

    Thanks for your reply. the Original UID should be
    1.3.12.2.1107.5.2.13.20507.30000004100512425468700 001708. What I am
    trying to do is this, for a series with 32 images, after some
    processing, let's say some 20 new images are generated, I grab one
    image from the original image, and copy the header to the 20 new
    images, but the UID must be unique for the new images. That is how I
    try to append some additional number such as ".000.11" to one of the
    new image, it might be "000.12" for the next image. One problem I just
    found is that I appended "11" twice. After I removed it, I can use
    storescu on it now!

    Can you tell me how to use dcmGenerateUniqueIdentifier() to generate a
    unique new UID?

    Thanks very much again.


    Jie


    "Joerg Riesmeier" wrote in message news:...
    > Jie Huang wrote:
    >
    > > 1.3.12.2.1107.5.2.13.20507.30000004100512425468700 001708.000.11.11

    >
    > 1. The new UID is too long (64 characters maximum, see Part 5).
    > 2. Both UIDs the new and the old one are invalid (leading 0s not allowed).
    > 3. You cannot guarantee that the new UID is unique by appending '.11'
    > (prefix is from Siemens:
    > http://www.alvestrand.no/objectid/1.3.12.2.1107.html )
    >
    > You could e.g. use dcmGenerateUniqueIdentifier() from the DCMTK to
    > generate a new UID.
    >
    > Regards,
    > Joerg Riesmeier
    > OFFIS


  4. Re: DCMTK -> storescu -> DIMSE Warning: CStoreRQ: AffectedSOPInstanceUID: bad size

    Jie Huang wrote:

    > One problem I just found is that I appended "11" twice.
    > After I removed it, I can use storescu on it now!


    But this only solves the first problem from the list (UID
    too long). Your approach is still "illegal". See my last
    posting.

    > Can you tell me how to use dcmGenerateUniqueIdentifier()
    > to generate a unique new UID?


    This is quite easy:

    char uid[100];
    dcmGenerateUniqueIdentifier(uid);

    See "dcmdata/include/dcuid.h" for details.

    Btw, the next release of DCMTK will probably contain an
    enhanced version of "dcmodify" that allows to assign new
    UIDs on request.

    Regards,
    Joerg Riesmeier
    OFFIS


  5. Illegal UID strategy for derived images, was Re: DCMTK -> storescu

    Joerg Riesmeier wrote:

    > Jie Huang wrote:
    >
    >> One problem I just found is that I appended "11" twice.
    >> After I removed it, I can use storescu on it now!

    >
    > But this only solves the first problem from the list (UID
    > too long). Your approach is still "illegal". See my last
    > posting.


    Just in case you are not 100% clear on what Joerg is saying
    here ...

    You can NEVER create a UID based on another UID ... the root
    from which the original UIDs are generated is owned by some
    organization or device, and that includes the entire space
    that can be created using that root.

    So if you "add" anything to someone else's existing UID you
    are using their space and possibly generating a conflict
    with a UID that they have created for a different image or
    whatever.

    It is analogous to stealing someone else's domain name,
    for example saying it is OK for you to use 11.www.ibm.com
    because IBM doesn't have a host of that name so you will
    just prepend an 11.

    Even if a conflict seems improbable to you, since it is possible
    you must avoid it. Duplicate UIDs for different objects are
    disastrous in some systems.

    You MUST create your own completely new UIDs using your OWN
    root (or one that a toolkit provides for you that is unique
    across instances of that toolkit).

    Not also that all UIDs have to be is unique, so it matters
    not that your UIDs for derived images will "look" completely
    different from the original ones.

    David


+ Reply to Thread