Mercurial > hg > orthanc
diff OrthancFramework/Resources/CodeGeneration/GenerateTransferSyntaxes.py @ 4468:9c070a34de18
IApplicationEntityFilter::GetAcceptedTransferSyntaxes()
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 25 Jan 2021 15:18:34 +0100 |
parents | d9473bd5ed43 |
children | 7053502fbf97 |
line wrap: on
line diff
--- a/OrthancFramework/Resources/CodeGeneration/GenerateTransferSyntaxes.py Thu Jan 21 19:06:00 2021 +0100 +++ b/OrthancFramework/Resources/CodeGeneration/GenerateTransferSyntaxes.py Mon Jan 25 15:18:34 2021 +0100 @@ -26,7 +26,7 @@ import sys import pystache -BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) +BASE = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) @@ -34,7 +34,7 @@ ## https://cedocs.intersystems.com/latest/csp/docbook/DocBook.UI.Page.cls?KEY=EDICOM_transfer_syntax -with open(os.path.join(BASE, 'Resources', 'DicomTransferSyntaxes.json'), 'r') as f: +with open(os.path.join(BASE, 'Resources', 'CodeGeneration', 'DicomTransferSyntaxes.json'), 'r') as f: SYNTAXES = json.loads(f.read()) @@ -43,7 +43,7 @@ ## Generate the "DicomTransferSyntax" enumeration in "Enumerations.h" ## -path = os.path.join(BASE, 'Core', 'Enumerations.h') +path = os.path.join(BASE, 'Sources', 'Enumerations.h') with open(path, 'r') as f: a = f.read() @@ -60,14 +60,14 @@ ## Generate the implementations ## -with open(os.path.join(BASE, 'Core', 'Enumerations_TransferSyntaxes.impl.h'), 'w') as b: - with open(os.path.join(BASE, 'Resources', 'GenerateTransferSyntaxesEnumerations.mustache'), 'r') as a: +with open(os.path.join(BASE, 'Sources', 'Enumerations_TransferSyntaxes.impl.h'), 'w') as b: + with open(os.path.join(BASE, 'Resources', 'CodeGeneration', 'GenerateTransferSyntaxesEnumerations.mustache'), 'r') as a: b.write(pystache.render(a.read(), { 'Syntaxes' : SYNTAXES })) -with open(os.path.join(BASE, 'Core', 'DicomParsing', 'FromDcmtkBridge_TransferSyntaxes.impl.h'), 'w') as b: - with open(os.path.join(BASE, 'Resources', 'GenerateTransferSyntaxesDcmtk.mustache'), 'r') as a: +with open(os.path.join(BASE, 'Sources', 'DicomParsing', 'FromDcmtkBridge_TransferSyntaxes.impl.h'), 'w') as b: + with open(os.path.join(BASE, 'Resources', 'CodeGeneration', 'GenerateTransferSyntaxesDcmtk.mustache'), 'r') as a: b.write(pystache.render(a.read(), { 'Syntaxes' : SYNTAXES }))