Java class to generate MWL Files

Hi everyone, previously I see that sdscotty share a python script to generate a *.wl file to use with the MWL Plugin, and today also I would like to share with you this Java class to generate a “dicom.wl” file without the dcmtk tools. The comments are in spanish, but I think that anyone who use Java to develop software can understand how this works.
The class uses the Pixelmed library to create the attributes and sequence of the same *.wl example file showed in the official documentation of MWL Plugin from Orthanc.
There are some DICOM tags that Pixelmed does not have like:
(0040,0009) ScheduledProcedureStepID
(0040,0400) CommentsOnTheScheduledProcedureStep
(0040,1003) RequestedProcedurePriority
and that are included in the *.wl original file, but they can be generated with the class AttributeFactory from Pixelmed.
The same for the sequence tag
(0040, 0100) ScheduledProcedureStepSequence
that can be generated with the SequenceAttribute class from pixelmed.

Here you can find the list of the tag attributes included in Pixelmed and here you can find how to generate new attributes to add in the file.

I attached the code in a txt file since discourse does not allow me to upload *.java files for security reasons.
CreateMWLFile2.txt (10.2 KB)

Regards, Ricardo Martínez.

4 Likes