Output MWL response to XML file

165 views
Skip to first unread message

John Avitable

unread,
Feb 5, 2018, 3:08:49 PM2/5/18
to dcm4che
Hi All,
     I am having some issues with outputting my data to an XML file for further analysis. I am able to get data back, however, I can't get it into a file. I originally received a message stating the file doesn't exist, so I created the file. Then I received a message that there was a premature ending or something to that effect. I then added the -x operator as well as --out-cat and now I don't receive any error messages, however, there's still no output in the file. Any advice? Below is the command that I'm executing:

.\findscu.bat -c #MWLSERVERAE#@#MWLSERVERDNS# -b #MODALITYAE# -M MWL C:\WorkingFolder\dcm4che\etc\findscu\mwl.xml --out-cat -x C:\WorkingFolder\output.xml

Thanks!

Jon Ander Zuccaro

unread,
Feb 5, 2018, 4:33:44 PM2/5/18
to dcm4che
lowercase -x is not the same as -X.

Try with uppercase X, -x is for applying a XSLT stylesheet

Jon Ander Zuccaro

unread,
Feb 5, 2018, 5:00:09 PM2/5/18
to dcm...@googlegroups.com
This worked for me:

./findscu -c aet@host:port -M MWL mwl.xml --out-cat -X -I --out-dir .

(specify the full path for the mwl.xml file in your case)

In windows, change the final dot to a folder path.

A file was created called 001.dcm It is an XLM file though. You can change this by using --out-file:

./findscu -c aet@host:port -M MWL mwl.xml  -X -I --out-dir . --out-file 0000.xml

If you remove "--out-cat" you will get a file for each returned item, the above example will generate files like 0001.xml, 0002.xml and so on.


On Monday, February 5, 2018 at 4:08:49 PM UTC-4, John Avitable wrote:

John Avitable

unread,
Feb 5, 2018, 5:26:38 PM2/5/18
to dcm4che
That worked for me as well... sort of. Will either of those operators (--xsl or --xmlns) allow me to open the outputted file with Excel? I'm thinking that I'll probably have to do something like use pydicom to output this as an Excel-readable XML file.

Jon Ander Zuccaro

unread,
Feb 5, 2018, 7:10:03 PM2/5/18
to dcm4che
Yes, but not without some coding. You could create a XSLT sheet that grabs the XML and converts it to Microsoft Office Open XML.

You need to produce this: https://technet.microsoft.com/en-us/library/2006.01.blogtales.aspx
Reply all
Reply to author
Forward
0 new messages