structure into the private tags - DICOM

This is a discussion on structure into the private tags - DICOM ; Hi, I need to store a custom structure I made into the private fields of a DICOM file. I want to be able to recover the structure at a later time. Right now I'm using the dcmtk toolkit. I was ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: structure into the private tags

  1. structure into the private tags

    Hi,

    I need to store a custom structure I made into the private fields of a
    DICOM file. I want to be able to recover the structure at a later time.
    Right now I'm using the dcmtk toolkit. I was hoping to do something
    like:

    struct SOMETHING {
    int x;
    int y;
    string strData1;
    string strData2;
    };

    SOMETHING test;

    DcmFileFormat dcm;
    dcm.getDataset()->putAndInsert(0x3333, 0x0001, test);
    dcm.save(...);



    // Later on, recover the saved structure.
    SOMETHING test;

    DcmFileFormat dcm;
    dcm.getDataset()->findAndGet(0x3333, 0x0001, test);

    Is this possible in the DICOM standard? The length of the structure
    could be large, can we store any size data in the private tags? Thanks
    for any ideas,

    Mark


  2. Re: structure into the private tags

    Mark,
    private attributes work just a little bit different.
    It is a flexible concept where you reserve a block of data.

    1. Select an odd group number which is not occupied.
    1a new object select group number whatever you like
    1b existing object make sure the group number does not contain values
    from other vendors
    2. Write your identifier e.g. MARKS_STRUCT
    in one of the Elements 0010 - 00ff
    3 By doing so each entry will reserve a block of private attributes
    where the last two digits are used to adress the first two digits of
    tag element number
    e.g. 0010 MARKS_STRUCT1 will reserve 1000 to 10ff
    0020 MARKS_STRUCT2 will reserve 2000 to 20ff
    4 Now you can use this block of tags to store your values.
    Your sample might look like:
    3333,0010 MARKS_STRUCT1
    3333,1001 x
    3333,1002 y
    3333,1003 strData1
    3333,1004 strData2

    If it is a large structure you may want to use sequences.

    If you READ an object and want to load your structure from there you
    would:
    - locate the identifier MARKS_STRUCT1 in that file.
    - get the group number and first two digits of the element number
    - read the values as you know 00 = x 01 = y 02 = strData1 ....
    It is a flexible concept so do not just hardcode the group number as it
    might be used by another vendor.
    Make sure you defined the usage of your private tags in the DICOM
    conformance statement.
    This is just an easy description please find the details in Part 5
    chapt 7.8.1


  3. Re: structure into the private tags

    Of course the DCMTK will support you by doing this. Maybe Joerg can
    tell you more about that.
    For specific questions about DCMTK please also ask in the DCMT group.


  4. Re: structure into the private tags

    > Of course the DCMTK will support you by doing this. Maybe Joerg can
    > tell you more about that.
    > For specific questions about DCMTK please also ask in the DCMT group.


    See http://forum.dcmtk.org/viewtopic.php?t=935 :-)

    Best regards,
    Joerg Riesmeier

+ Reply to Thread