Announcement

Collapse
No announcement yet.

How do I transform a Dicom Message?

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

  • How do I transform a Dicom Message?

    I created a channel Dicom Listener to FileWriter as a test?
    in the source transformer I mapped and created an accession number variable
    In the Destination transformer I set the Accession number to the new varaible +"test123"
    in the template I use ${message.transformedData}

    If I set the filewrite to ascii I see the the transformed data. If I leave it to binary then it is no longer a dicom file (will not open in a dicom viewer)

    If I change ${message.transformedData} to ${DICOMMESSAGE} and leave the filewriter to binary all I can open the file in a dicom viewer but no changes are made.

    How can I accomplish this task?

    In a nutshell I need to be able to change some tags in a dicom file.

    Thanks

  • #2
    I thin I figured it out

    This worked for me
    do not create a template for output only for input

    in the source transformer step 1 (type javascript) I do


    // if patientis does not contain -Suffix then add it
    if (msg['tag00100020'].search("-Suffix") == -1){
    tstr = msg['tag00100020'].toString() + "-Suffix";
    msg['tag00100020'] = tstr.toString();
    msg['tag00100020']['@len']=tstr.toString().length;
    msg['tag00100020']['@tag']="00100020";
    msg['tag00100020']['@vr']="LO";
    }



    then I use ${DICOMMESSAGE} for the template in the filewriter



    Anyone see a problem with this?

    Comment


    • #3
      Thanks jasimons1. It worked to me.

      Comment

      Working...
      X