Mercurial > hg > orthanc
annotate Resources/Samples/Lua/CallDcm2Xml.lua @ 3033:5da6d1063d8f db-changes
effectively replacing LookupResource by DatabaseLookup in searches
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Dec 2018 13:58:28 +0100 |
parents | 921532f67770 |
children |
rev | line source |
---|---|
1065
921532f67770
Lua scripts can invoke system commands, with CallSystem()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
1 function OnStoredInstance(instanceId, tags, metadata) |
921532f67770
Lua scripts can invoke system commands, with CallSystem()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
2 -- Assume Latin1 encoding in dcm2xml |
921532f67770
Lua scripts can invoke system commands, with CallSystem()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
3 local args = {} |
921532f67770
Lua scripts can invoke system commands, with CallSystem()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
4 table.insert(args, '+Ca') |
921532f67770
Lua scripts can invoke system commands, with CallSystem()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
5 table.insert(args, 'latin-1') |
921532f67770
Lua scripts can invoke system commands, with CallSystem()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
6 |
921532f67770
Lua scripts can invoke system commands, with CallSystem()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
7 Delete(CallSystem(instanceId, 'dcm2xml', args)) |
921532f67770
Lua scripts can invoke system commands, with CallSystem()
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
diff
changeset
|
8 end |