Mercurial > hg > orthanc
annotate Resources/Samples/Lua/AutoroutingModification.lua @ 1398:aa9b8fa97576
fix for msvc
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 01 Jun 2015 12:47:49 +0200 |
parents | f796207e3df1 |
children | bfdf24883ff3 |
rev | line source |
---|---|
1011 | 1 function OnStoredInstance(instanceId, tags, metadata) |
2 -- Ignore the instances that result from a modification to avoid | |
3 -- infinite loops | |
4 if (metadata['ModifiedFrom'] == nil and | |
5 metadata['AnonymizedFrom'] == nil) then | |
6 | |
7 -- The tags to be replaced | |
8 local replace = {} | |
9 replace['StationName'] = 'My Medical Device' | |
1307
f796207e3df1
Fix replacement and insertion of private DICOM tags
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1011
diff
changeset
|
10 replace['0031-1020'] = 'Some private tag' |
1011 | 11 |
12 -- The tags to be removed | |
13 local remove = { 'MilitaryRank' } | |
14 | |
15 -- Modify the instance, send it, then delete the modified instance | |
16 Delete(SendToModality(ModifyInstance(instanceId, replace, remove, true), 'sample')) | |
17 | |
18 -- Delete the original instance | |
19 Delete(instanceId) | |
20 end | |
21 end |