VR of AE encoding (little DICOM nonconformance)

  • Hi guys,


    K-PACS version: 1.6.0
    Our side: Coala System (server under development)


    K-PACS pads DICOM value representation AE with NULL instead of space.


    This is specified in DICOM PS 3.5-2011 6.2


    Our server handles such case properly but this might induce problems with some applications.


    Scenario where it might be problem:


    1. K-PACS sends C-MOVE request to server X.
    2. X replies with C-STORE to application entity entity encoded in C-MOVE-RQ using vr AE


    Now, X received vr of AE with, let's assume that it was "KPA\0" (KPA followed by NULL), value length is 4


    3. X strips padding according to DICOM, the NULL character is not stripped.
    4. X stores AE value in c++ using command like:


    std::string ae_with_null("KPA\0",4) //those are naturally some variables


    5. X has some dictionary with known ae titles, filled with strings
    The entry for KPA was created using:


    ae_without_null("KPA");


    6. X searches for received AE in it's dictionary
    *****************************************************
    now, ae_with_null==ae_without_null is false //gcc, msvc
    ****************************************************
    7. X doesn't match received AE to anything and C-STORE fails.


    *** This is only one of the scenarios where it may be problem. ***
    I can think of other as well.


    K-PACS is working with a lot of DICOM applications correctly because most can handle incorrect padding correctly (same with our server)
    That is not guaranteed though.


    Kind regards,


    Bartosz Meglicki

    National Centre for Nuclear Research
    Department of Nuclear Equipment
    ul. Andrzeja Sołtana 7
    05-400 Otwock, Poland

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!