Mercurial > hg > orthanc
annotate OrthancServer/Resources/Samples/Lua/AutoroutingConditional.lua @ 4443:fd958175c5b9
ImageProcessing::ConvertJpegYCbCrToRgb()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 12 Jan 2021 13:07:15 +0100 |
parents | d25f4c0fa160 |
children |
rev | line source |
---|---|
1572
904096e7367e
More information about the origin request in OnStoredInstance() callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1285
diff
changeset
|
1 function OnStoredInstance(instanceId, tags, metadata, origin) |
904096e7367e
More information about the origin request in OnStoredInstance() callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1285
diff
changeset
|
2 -- The "origin" is only available since Orthanc 0.9.4 |
904096e7367e
More information about the origin request in OnStoredInstance() callbacks
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1285
diff
changeset
|
3 PrintRecursive(origin) |
1285
5730f374e4e6
Access to called AET and remote AET from Lua scripts
Sebastien Jodogne <s.jodogne@gmail.com>
parents:
1011
diff
changeset
|
4 |
1011 | 5 -- Extract the value of the "PatientName" DICOM tag |
6 local patientName = string.lower(tags['PatientName']) | |
7 | |
8 if string.find(patientName, 'david') ~= nil then | |
9 -- Only send patients whose name contains "David" | |
10 Delete(SendToModality(instanceId, 'sample')) | |
11 | |
12 else | |
13 -- Delete the patients that are not called "David" | |
14 Delete(instanceId) | |
15 end | |
16 end |