# HG changeset patch # User Sebastien Jodogne # Date 1719938832 -7200 # Node ID 0c5da632f34d77139bef7007c5c5f3e5fb3e48c8 # Parent 66cd20e970d841ca3b16e4053d68a521a24e8374 added description of classes diff -r 66cd20e970d8 -r 0c5da632f34d CodeAnalysis/GenerateOrthancSDK.py --- a/CodeAnalysis/GenerateOrthancSDK.py Tue Jul 02 18:37:04 2024 +0200 +++ b/CodeAnalysis/GenerateOrthancSDK.py Tue Jul 02 18:47:12 2024 +0200 @@ -39,6 +39,10 @@ default = os.path.join(os.path.dirname(__file__), '../Resources/Orthanc/Sdk-1.10.0/CodeModel.json'), help = 'Input code model, as generated by the orthanc-java project') +parser.add_argument('--classes', + default = os.path.join(os.path.dirname(__file__), + '../Resources/Orthanc/Sdk-1.10.0/ClassDocumentation.json'), + help = 'Input description of classes, as defined in the orthanc-java project') parser.add_argument('--target', default = os.path.join(os.path.dirname(__file__), '../Sources/Autogenerated'), @@ -81,6 +85,9 @@ with open(args.model, 'r') as f: model = json.loads(f.read()) +with open(args.classes, 'r') as f: + classes_description = json.loads(f.read()) + def ToUpperCase(name): s = '' @@ -391,6 +398,7 @@ custom_methods.append(custom_method) classes.append({ + 'description' : classes_description[c['name']], 'class_name' : c['name'], 'short_name' : GetShortName(c['name']), 'methods' : methods, diff -r 66cd20e970d8 -r 0c5da632f34d CodeAnalysis/PythonDocumentation.mustache --- a/CodeAnalysis/PythonDocumentation.mustache Tue Jul 02 18:37:04 2024 +0200 +++ b/CodeAnalysis/PythonDocumentation.mustache Tue Jul 02 18:47:12 2024 +0200 @@ -52,6 +52,9 @@ {{#classes}} class {{short_name}}: + """ + {{description}} + """ ... {{#methods}} diff -r 66cd20e970d8 -r 0c5da632f34d Resources/Orthanc/Sdk-1.10.0/ClassDocumentation.json --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Resources/Orthanc/Sdk-1.10.0/ClassDocumentation.json Tue Jul 02 18:47:12 2024 +0200 @@ -0,0 +1,15 @@ +{ + "OrthancPluginDicomInstance" : "DICOM instance managed by the Orthanc core", + "OrthancPluginDicomWebNode" : "Node visited by DICOMweb conversion", + "OrthancPluginFindAnswers" : "Answers to a DICOM C-FIND query", + "OrthancPluginFindMatcher" : "Matcher for DICOM C-FIND query", + "OrthancPluginFindQuery" : "DICOM C-FIND query", + "OrthancPluginImage" : "2D image managed by the Orthanc core", + "OrthancPluginJob" : "Orthanc job", + "OrthancPluginPeers" : "Orthanc peer", + "OrthancPluginRestOutput" : "Output for a call to the REST API of Orthanc", + "OrthancPluginServerChunkedRequestReader" : "Read for a chunked HTTP request", + "OrthancPluginStorageArea" : "Storage area plugin", + "OrthancPluginWorklistAnswers" : "Answers to a DICOM C-FIND worklist query", + "OrthancPluginWorklistQuery" : "DICOM C-FIND worklist query" +} diff -r 66cd20e970d8 -r 0c5da632f34d Resources/Orthanc/Sdk-1.10.0/ClassDocumentation.json.license --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Resources/Orthanc/Sdk-1.10.0/ClassDocumentation.json.license Tue Jul 02 18:47:12 2024 +0200 @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: 2023-2024 Sebastien Jodogne, UCLouvain, Belgium +# SPDX-License-Identifier: GPL-3.0-or-later diff -r 66cd20e970d8 -r 0c5da632f34d Resources/SyncOrthancFolder.py --- a/Resources/SyncOrthancFolder.py Tue Jul 02 18:37:04 2024 +0200 +++ b/Resources/SyncOrthancFolder.py Tue Jul 02 18:47:12 2024 +0200 @@ -78,20 +78,18 @@ ]) -commands.append([ - ORTHANC_JAVA_REPOSITORY, - 'OrthancJava-%s' % ORTHANC_JAVA_VERSION, - 'CodeGeneration/CodeModel.json', - 'Sdk-%s/CodeModel.json' % PLUGIN_SDK_VERSION, -]) - - -commands.append([ - ORTHANC_JAVA_REPOSITORY, - 'OrthancJava-%s' % ORTHANC_JAVA_VERSION, - 'CodeGeneration/CodeModel.json.license', - 'Sdk-%s/CodeModel.json.license' % PLUGIN_SDK_VERSION, -]) +for f in [ + 'CodeModel.json', + 'CodeModel.json.license', + 'ClassDocumentation.json', + 'ClassDocumentation.json.license', + ]: + commands.append([ + ORTHANC_JAVA_REPOSITORY, + 'OrthancJava-%s' % ORTHANC_JAVA_VERSION, + 'CodeGeneration/%s' % f, + 'Sdk-%s/%s' % (PLUGIN_SDK_VERSION, f), + ]) pool = multiprocessing.Pool(10) # simultaneous downloads diff -r 66cd20e970d8 -r 0c5da632f34d Sources/Autogenerated/orthanc.pyi --- a/Sources/Autogenerated/orthanc.pyi Tue Jul 02 18:37:04 2024 +0200 +++ b/Sources/Autogenerated/orthanc.pyi Tue Jul 02 18:47:12 2024 +0200 @@ -2103,6 +2103,9 @@ class DicomInstance: + """ + DICOM instance managed by the Orthanc core + """ ... # This function returns the Application Entity Title (AET) of the DICOM modality from which a DICOM instance originates @@ -2259,10 +2262,16 @@ """ ... class DicomWebNode: + """ + Node visited by DICOMweb conversion + """ ... class FindAnswers: + """ + Answers to a DICOM C-FIND query + """ ... # This function adds one answer (encoded as a DICOM file) to the set of answers corresponding to some C-Find SCP request that is not related to modality worklists @@ -2282,6 +2291,9 @@ ... class FindMatcher: + """ + Matcher for DICOM C-FIND query + """ ... # This function checks whether one DICOM instance matches C-Find matcher that was previously allocated using OrthancPluginCreateFindMatcher() @@ -2298,6 +2310,9 @@ ... class FindQuery: + """ + DICOM C-FIND query + """ ... # This function returns the number of tags that are contained in the given C-Find query @@ -2359,6 +2374,9 @@ """ ... class Image: + """ + 2D image managed by the Orthanc core + """ ... # This function returns the type of memory layout for the pixels of the given image @@ -2435,6 +2453,9 @@ """ ... class Job: + """ + Orthanc job + """ ... # This function adds the given job to the pending jobs of Orthanc @@ -2451,6 +2472,9 @@ ... class Peers: + """ + Orthanc peer + """ ... # This function returns the number of Orthanc peers @@ -2505,6 +2529,9 @@ ... class RestOutput: + """ + Output for a call to the REST API of Orthanc + """ ... # This function answers to a REST request with the content of a memory buffer @@ -2642,10 +2669,16 @@ ... class ServerChunkedRequestReader: + """ + Read for a chunked HTTP request + """ ... class StorageArea: + """ + Storage area plugin + """ ... # This function creates a new file inside the storage area that is currently used by Orthanc @@ -2694,6 +2727,9 @@ ... class WorklistAnswers: + """ + Answers to a DICOM C-FIND worklist query + """ ... # This function adds one worklist (encoded as a DICOM file) to the set of answers corresponding to some C-Find SCP request against modality worklists @@ -2714,6 +2750,9 @@ ... class WorklistQuery: + """ + DICOM C-FIND worklist query + """ ... # This function checks whether one worklist (encoded as a DICOM file) matches the C-Find SCP query against modality worklists