Announcement

Collapse
No announcement yet.

how to get the study number from dicom file using open inventor

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to get the study number from dicom file using open inventor

    how to use the open inventor to get the study UID
    i succeeded to get the series number, the image number and the slice location
    using the soVRDicomData but i failed to get the study UID

  • #2
    How to get Dicom study UID

    Originally posted by Ahmedkhaled View Post
    how to use the open inventor to get the study UID?
    SoVRDicomData::readDicomHeader reads all the Dicom group/element data values from the file. If you know the group and element id numbers, you can get the value using the getDicomInfo() method. If the data value exists, it returns a pointer to an internal string, else it returns NULL. (Currently there is no way to "browse" through the data values or get the number of data values, but normally this isn't a problem.)

    I'm not sure exactly which data value you need, but something like this should work:
    Code:
    #define DG_IDENTIFY           0x0008
    #define DE_ID_INST_CREATOR_UID       0x0014
    #define DE_ID_SOP_CLASS_UID          0x0016
    #define DE_ID_SOP_INSTANCE_UID       0x0018
    Then:
    Code:
      SoVRDicomData dicomData;
      SbBool success = dicomData.readDicomHeader( FILENAME );
      const char *info1 = dicomData.getDicomInfo( DG_IDENTIFY, DE_ID_INST_CREATOR_UID );
      const char *info2 = dicomData.getDicomInfo( DG_IDENTIFY, DE_ID_SOP_CLASS_UID );
      const char *info3 = dicomData.getDicomInfo( DG_IDENTIFY, DE_ID_SOP_INSTANCE_UID );
    For my test data file, this results in:
    DE_ID_INST_CREATOR_UID: 1.3.6.1.4.1.11884
    DE_ID_SOP_CLASS_UID : 1.2.840.10008.5.1.4.1.1.7
    DE_ID_SOP_INSTANCE_UID: 1.3.6.1.4.1.11884.7590.0.20041214.163233.125.28188 75296.571

    -Mike

    Comment


    • #3
      thanks mike this was great but i also need to know how to chage this tags

      Comment


      • #4
        Writing Dicom files is not supported

        Originally posted by Ahmedkhaled View Post
        i also need to know how to chage this tags
        Sorry, we don't support writing Dicom files (only reading).

        You should probably look for a Dicom specific library on the web.

        -Mike

        Comment


        • #5
          thanks alot

          Comment

          Working...
          X