File: orthanc.pyi

package info (click to toggle)
orthanc-python 5.0%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 1,452 kB
  • sloc: cpp: 14,199; python: 740; sh: 62; makefile: 31
file content (3338 lines) | stat: -rw-r--r-- 107,386 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
# SPDX-FileCopyrightText: 2020-2023 Osimis S.A., 2024-2025 Orthanc Team SRL, 2021-2025 Sebastien Jodogne, ICTEAM UCLouvain
# SPDX-License-Identifier: AGPL-3.0-or-later

##
## Python plugin for Orthanc
## Copyright (C) 2020-2023 Osimis S.A., Belgium
## Copyright (C) 2024-2025 Orthanc Team SRL, Belgium
## Copyright (C) 2021-2025 Sebastien Jodogne, ICTEAM UCLouvain, Belgium
##
## This program is free software: you can redistribute it and/or
## modify it under the terms of the GNU Affero General Public License
## as published by the Free Software Foundation, either version 3 of
## the License, or (at your option) any later version.
##
## This program is distributed in the hope that it will be useful, but
## WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
## Affero General Public License for more details.
##
## You should have received a copy of the GNU Affero General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
##


# WARNING: Auto-generated file. Do not modify it by hand.


import typing



class ChangeType():
    """
    The supported types of changes that can be signaled to the change callback. Note: this enum is not used to store changes in the DB !
    """

    """
    Series is now complete
    """
    COMPLETED_SERIES: int = 0,

    """
    Deleted resource
    """
    DELETED: int = 1,

    """
    A new instance was added to this resource
    """
    NEW_CHILD_INSTANCE: int = 2,

    """
    New instance received
    """
    NEW_INSTANCE: int = 3,

    """
    New patient created
    """
    NEW_PATIENT: int = 4,

    """
    New series created
    """
    NEW_SERIES: int = 5,

    """
    New study created
    """
    NEW_STUDY: int = 6,

    """
    Timeout: No new instance in this patient
    """
    STABLE_PATIENT: int = 7,

    """
    Timeout: No new instance in this series
    """
    STABLE_SERIES: int = 8,

    """
    Timeout: No new instance in this study
    """
    STABLE_STUDY: int = 9,

    """
    Orthanc has started
    """
    ORTHANC_STARTED: int = 10,

    """
    Orthanc is stopping
    """
    ORTHANC_STOPPED: int = 11,

    """
    Some user-defined attachment has changed for this resource
    """
    UPDATED_ATTACHMENT: int = 12,

    """
    Some user-defined metadata has changed for this resource
    """
    UPDATED_METADATA: int = 13,

    """
    The list of Orthanc peers has changed
    """
    UPDATED_PEERS: int = 14,

    """
    The list of DICOM modalities has changed
    """
    UPDATED_MODALITIES: int = 15,

    """
    New Job submitted
    """
    JOB_SUBMITTED: int = 16,

    """
    A Job has completed successfully
    """
    JOB_SUCCESS: int = 17,

    """
    A Job has failed
    """
    JOB_FAILURE: int = 18,

class CompressionType():
    """
    The compression algorithms that are supported by the Orthanc core.
    """

    """
    Standard zlib compression
    """
    ZLIB: int = 0,

    """
    zlib, prefixed with uncompressed size (uint64_t)
    """
    ZLIB_WITH_SIZE: int = 1,

    """
    Standard gzip compression
    """
    GZIP: int = 2,

    """
    gzip, prefixed with uncompressed size (uint64_t)
    """
    GZIP_WITH_SIZE: int = 3,

class ConstraintType():
    """
    The constraints on the tags (main DICOM tags and identifier tags) that must be supported by the database plugins.
    """

    """
    Equal
    """
    EQUAL: int = 1,

    """
    Less or equal
    """
    SMALLER_OR_EQUAL: int = 2,

    """
    More or equal
    """
    GREATER_OR_EQUAL: int = 3,

    """
    Wildcard matching
    """
    WILDCARD: int = 4,

    """
    List of values
    """
    LIST: int = 5,

class ContentType():
    """
    The content types that are supported by Orthanc plugins.
    """

    """
    Unknown content type
    """
    UNKNOWN: int = 0,

    """
    DICOM
    """
    DICOM: int = 1,

    """
    JSON summary of a DICOM file
    """
    DICOM_AS_JSON: int = 2,

    """
    DICOM Header till pixel data
    """
    DICOM_UNTIL_PIXEL_DATA: int = 3,

class CreateDicomFlags():
    """
    Flags for the creation of a DICOM file.
    """

    """
    Default mode
    """
    NONE: int = 0,

    """
    Decode fields encoded using data URI scheme
    """
    DECODE_DATA_URI_SCHEME: int = 1,

    """
    Automatically generate DICOM identifiers
    """
    GENERATE_IDENTIFIERS: int = 2,

class DicomToJsonFlags():
    """
    Flags to customize a DICOM-to-JSON conversion. By default, binary tags are formatted using Data URI scheme.
    """

    """
    Default formatting
    """
    NONE: int = 0,

    """
    Include the binary tags
    """
    INCLUDE_BINARY: int = 1,

    """
    Include the private tags
    """
    INCLUDE_PRIVATE_TAGS: int = 2,

    """
    Include the tags unknown by the dictionary
    """
    INCLUDE_UNKNOWN_TAGS: int = 4,

    """
    Include the pixel data
    """
    INCLUDE_PIXEL_DATA: int = 8,

    """
    Output binary tags as-is, dropping non-ASCII
    """
    CONVERT_BINARY_TO_ASCII: int = 16,

    """
    Signal binary tags as null values
    """
    CONVERT_BINARY_TO_NULL: int = 32,

    """
    Stop processing after pixel data (new in 1.9.1)
    """
    STOP_AFTER_PIXEL_DATA: int = 64,

    """
    Skip tags whose element is zero (new in 1.9.1)
    """
    SKIP_GROUP_LENGTHS: int = 128,

class DicomToJsonFormat():
    """
    The possible output formats for a DICOM-to-JSON conversion.
    """

    """
    Full output, with most details
    """
    FULL: int = 1,

    """
    Tags output as hexadecimal numbers
    """
    SHORT: int = 2,

    """
    Human-readable JSON
    """
    HUMAN: int = 3,

class DicomWebBinaryMode():
    """
    The available modes to export a binary DICOM tag into a DICOMweb JSON or XML document.
    """

    """
    Don't include binary tags
    """
    IGNORE: int = 0,

    """
    Inline encoding using Base64
    """
    INLINE_BINARY: int = 1,

    """
    Use a bulk data URI field
    """
    BULK_DATA_URI: int = 2,

class ErrorCode():
    """
    The various error codes that can be returned by the Orthanc core.
    """

    """
    Internal error
    """
    INTERNAL_ERROR: int = -1,

    """
    Success
    """
    SUCCESS: int = 0,

    """
    Error encountered within the plugin engine
    """
    PLUGIN: int = 1,

    """
    Not implemented yet
    """
    NOT_IMPLEMENTED: int = 2,

    """
    Parameter out of range
    """
    PARAMETER_OUT_OF_RANGE: int = 3,

    """
    The server hosting Orthanc is running out of memory
    """
    NOT_ENOUGH_MEMORY: int = 4,

    """
    Bad type for a parameter
    """
    BAD_PARAMETER_TYPE: int = 5,

    """
    Bad sequence of calls
    """
    BAD_SEQUENCE_OF_CALLS: int = 6,

    """
    Accessing an inexistent item
    """
    INEXISTENT_ITEM: int = 7,

    """
    Bad request
    """
    BAD_REQUEST: int = 8,

    """
    Error in the network protocol
    """
    NETWORK_PROTOCOL: int = 9,

    """
    Error while calling a system command
    """
    SYSTEM_COMMAND: int = 10,

    """
    Error with the database engine
    """
    DATABASE: int = 11,

    """
    Badly formatted URI
    """
    URI_SYNTAX: int = 12,

    """
    Inexistent file
    """
    INEXISTENT_FILE: int = 13,

    """
    Cannot write to file
    """
    CANNOT_WRITE_FILE: int = 14,

    """
    Bad file format
    """
    BAD_FILE_FORMAT: int = 15,

    """
    Timeout
    """
    TIMEOUT: int = 16,

    """
    Unknown resource
    """
    UNKNOWN_RESOURCE: int = 17,

    """
    Incompatible version of the database
    """
    INCOMPATIBLE_DATABASE_VERSION: int = 18,

    """
    The file storage is full
    """
    FULL_STORAGE: int = 19,

    """
    Corrupted file (e.g. inconsistent MD5 hash)
    """
    CORRUPTED_FILE: int = 20,

    """
    Inexistent tag
    """
    INEXISTENT_TAG: int = 21,

    """
    Cannot modify a read-only data structure
    """
    READ_ONLY: int = 22,

    """
    Incompatible format of the images
    """
    INCOMPATIBLE_IMAGE_FORMAT: int = 23,

    """
    Incompatible size of the images
    """
    INCOMPATIBLE_IMAGE_SIZE: int = 24,

    """
    Error while using a shared library (plugin)
    """
    SHARED_LIBRARY: int = 25,

    """
    Plugin invoking an unknown service
    """
    UNKNOWN_PLUGIN_SERVICE: int = 26,

    """
    Unknown DICOM tag
    """
    UNKNOWN_DICOM_TAG: int = 27,

    """
    Cannot parse a JSON document
    """
    BAD_JSON: int = 28,

    """
    Bad credentials were provided to an HTTP request
    """
    UNAUTHORIZED: int = 29,

    """
    Badly formatted font file
    """
    BAD_FONT: int = 30,

    """
    The plugin implementing a custom database back-end does not fulfill the proper interface
    """
    DATABASE_PLUGIN: int = 31,

    """
    Error in the plugin implementing a custom storage area
    """
    STORAGE_AREA_PLUGIN: int = 32,

    """
    The request is empty
    """
    EMPTY_REQUEST: int = 33,

    """
    Cannot send a response which is acceptable according to the Accept HTTP header
    """
    NOT_ACCEPTABLE: int = 34,

    """
    Cannot handle a NULL pointer
    """
    NULL_POINTER: int = 35,

    """
    The database is currently not available (probably a transient situation)
    """
    DATABASE_UNAVAILABLE: int = 36,

    """
    This job was canceled
    """
    CANCELED_JOB: int = 37,

    """
    Geometry error encountered in Stone
    """
    BAD_GEOMETRY: int = 38,

    """
    Cannot initialize SSL encryption, check out your certificates
    """
    SSL_INITIALIZATION: int = 39,

    """
    Calling a function that has been removed from the Orthanc Framework
    """
    DISCONTINUED_ABI: int = 40,

    """
    Incorrect range request
    """
    BAD_RANGE: int = 41,

    """
    Database could not serialize access due to concurrent update, the transaction should be retried
    """
    DATABASE_CANNOT_SERIALIZE: int = 42,

    """
    A bad revision number was provided, which might indicate conflict between multiple writers
    """
    REVISION: int = 43,

    """
    A main DICOM Tag has been defined multiple times for the same resource level
    """
    MAIN_DICOM_TAGS_MULTIPLY_DEFINED: int = 44,

    """
    Access to a resource is forbidden
    """
    FORBIDDEN_ACCESS: int = 45,

    """
    Duplicate resource
    """
    DUPLICATE_RESOURCE: int = 46,

    """
    Your configuration file contains configuration that are mutually incompatible
    """
    INCOMPATIBLE_CONFIGURATIONS: int = 47,

    """
    SQLite: The database is not opened
    """
    SQLITE_NOT_OPENED: int = 1000,

    """
    SQLite: Connection is already open
    """
    SQLITE_ALREADY_OPENED: int = 1001,

    """
    SQLite: Unable to open the database
    """
    SQLITE_CANNOT_OPEN: int = 1002,

    """
    SQLite: This cached statement is already being referred to
    """
    SQLITE_STATEMENT_ALREADY_USED: int = 1003,

    """
    SQLite: Cannot execute a command
    """
    SQLITE_EXECUTE: int = 1004,

    """
    SQLite: Rolling back a nonexistent transaction (have you called Begin()?)
    """
    SQLITE_ROLLBACK_WITHOUT_TRANSACTION: int = 1005,

    """
    SQLite: Committing a nonexistent transaction
    """
    SQLITE_COMMIT_WITHOUT_TRANSACTION: int = 1006,

    """
    SQLite: Unable to register a function
    """
    SQLITE_REGISTER_FUNCTION: int = 1007,

    """
    SQLite: Unable to flush the database
    """
    SQLITE_FLUSH: int = 1008,

    """
    SQLite: Cannot run a cached statement
    """
    SQLITE_CANNOT_RUN: int = 1009,

    """
    SQLite: Cannot step over a cached statement
    """
    SQLITE_CANNOT_STEP: int = 1010,

    """
    SQLite: Bind a value while out of range (serious error)
    """
    SQLITE_BIND_OUT_OF_RANGE: int = 1011,

    """
    SQLite: Cannot prepare a cached statement
    """
    SQLITE_PREPARE_STATEMENT: int = 1012,

    """
    SQLite: Beginning the same transaction twice
    """
    SQLITE_TRANSACTION_ALREADY_STARTED: int = 1013,

    """
    SQLite: Failure when committing the transaction
    """
    SQLITE_TRANSACTION_COMMIT: int = 1014,

    """
    SQLite: Cannot start a transaction
    """
    SQLITE_TRANSACTION_BEGIN: int = 1015,

    """
    The directory to be created is already occupied by a regular file
    """
    DIRECTORY_OVER_FILE: int = 2000,

    """
    Unable to create a subdirectory or a file in the file storage
    """
    FILE_STORAGE_CANNOT_WRITE: int = 2001,

    """
    The specified path does not point to a directory
    """
    DIRECTORY_EXPECTED: int = 2002,

    """
    The TCP port of the HTTP server is privileged or already in use
    """
    HTTP_PORT_IN_USE: int = 2003,

    """
    The TCP port of the DICOM server is privileged or already in use
    """
    DICOM_PORT_IN_USE: int = 2004,

    """
    This HTTP status is not allowed in a REST API
    """
    BAD_HTTP_STATUS_IN_REST: int = 2005,

    """
    The specified path does not point to a regular file
    """
    REGULAR_FILE_EXPECTED: int = 2006,

    """
    Unable to get the path to the executable
    """
    PATH_TO_EXECUTABLE: int = 2007,

    """
    Cannot create a directory
    """
    MAKE_DIRECTORY: int = 2008,

    """
    An application entity title (AET) cannot be empty or be longer than 16 characters
    """
    BAD_APPLICATION_ENTITY_TITLE: int = 2009,

    """
    No request handler factory for DICOM C-FIND SCP
    """
    NO_CFIND_HANDLER: int = 2010,

    """
    No request handler factory for DICOM C-MOVE SCP
    """
    NO_CMOVE_HANDLER: int = 2011,

    """
    No request handler factory for DICOM C-STORE SCP
    """
    NO_CSTORE_HANDLER: int = 2012,

    """
    No application entity filter
    """
    NO_APPLICATION_ENTITY_FILTER: int = 2013,

    """
    DicomUserConnection: Unable to find the SOP class and instance
    """
    NO_SOP_CLASS_OR_INSTANCE: int = 2014,

    """
    DicomUserConnection: No acceptable presentation context for modality
    """
    NO_PRESENTATION_CONTEXT: int = 2015,

    """
    DicomUserConnection: The C-FIND command is not supported by the remote SCP
    """
    DICOM_FIND_UNAVAILABLE: int = 2016,

    """
    DicomUserConnection: The C-MOVE command is not supported by the remote SCP
    """
    DICOM_MOVE_UNAVAILABLE: int = 2017,

    """
    Cannot store an instance
    """
    CANNOT_STORE_INSTANCE: int = 2018,

    """
    Only string values are supported when creating DICOM instances
    """
    CREATE_DICOM_NOT_STRING: int = 2019,

    """
    Trying to override a value inherited from a parent module
    """
    CREATE_DICOM_OVERRIDE_TAG: int = 2020,

    """
    Use \"Content\" to inject an image into a new DICOM instance
    """
    CREATE_DICOM_USE_CONTENT: int = 2021,

    """
    No payload is present for one instance in the series
    """
    CREATE_DICOM_NO_PAYLOAD: int = 2022,

    """
    The payload of the DICOM instance must be specified according to Data URI scheme
    """
    CREATE_DICOM_USE_DATA_URI_SCHEME: int = 2023,

    """
    Trying to attach a new DICOM instance to an inexistent resource
    """
    CREATE_DICOM_BAD_PARENT: int = 2024,

    """
    Trying to attach a new DICOM instance to an instance (must be a series, study or patient)
    """
    CREATE_DICOM_PARENT_IS_INSTANCE: int = 2025,

    """
    Unable to get the encoding of the parent resource
    """
    CREATE_DICOM_PARENT_ENCODING: int = 2026,

    """
    Unknown modality
    """
    UNKNOWN_MODALITY: int = 2027,

    """
    Bad ordering of filters in a job
    """
    BAD_JOB_ORDERING: int = 2028,

    """
    Cannot convert the given JSON object to a Lua table
    """
    JSON_TO_LUA_TABLE: int = 2029,

    """
    Cannot create the Lua context
    """
    CANNOT_CREATE_LUA: int = 2030,

    """
    Cannot execute a Lua command
    """
    CANNOT_EXECUTE_LUA: int = 2031,

    """
    Arguments cannot be pushed after the Lua function is executed
    """
    LUA_ALREADY_EXECUTED: int = 2032,

    """
    The Lua function does not give the expected number of outputs
    """
    LUA_BAD_OUTPUT: int = 2033,

    """
    The Lua function is not a predicate (only true/false outputs allowed)
    """
    NOT_LUA_PREDICATE: int = 2034,

    """
    The Lua function does not return a string
    """
    LUA_RETURNS_NO_STRING: int = 2035,

    """
    Another plugin has already registered a custom storage area
    """
    STORAGE_AREA_ALREADY_REGISTERED: int = 2036,

    """
    Another plugin has already registered a custom database back-end
    """
    DATABASE_BACKEND_ALREADY_REGISTERED: int = 2037,

    """
    Plugin trying to call the database during its initialization
    """
    DATABASE_NOT_INITIALIZED: int = 2038,

    """
    Orthanc has been built without SSL support
    """
    SSL_DISABLED: int = 2039,

    """
    Unable to order the slices of the series
    """
    CANNOT_ORDER_SLICES: int = 2040,

    """
    No request handler factory for DICOM C-Find Modality SCP
    """
    NO_WORKLIST_HANDLER: int = 2041,

    """
    Cannot override the value of a tag that already exists
    """
    ALREADY_EXISTING_TAG: int = 2042,

    """
    No request handler factory for DICOM N-ACTION SCP (storage commitment)
    """
    NO_STORAGE_COMMITMENT_HANDLER: int = 2043,

    """
    No request handler factory for DICOM C-GET SCP
    """
    NO_CGET_HANDLER: int = 2044,

    """
    DicomUserConnection: The C-GET command is not supported by the remote SCP
    """
    DICOM_GET_UNAVAILABLE: int = 2045,

    """
    Unsupported media type
    """
    UNSUPPORTED_MEDIA_TYPE: int = 3000,

class HttpMethod():
    """
    The various HTTP methods for a REST call.
    """

    """
    GET request
    """
    GET: int = 1,

    """
    POST request
    """
    POST: int = 2,

    """
    PUT request
    """
    PUT: int = 3,

    """
    DELETE request
    """
    DELETE: int = 4,

class IdentifierConstraint():
    """
    The constraints on the DICOM identifiers that must be supported by the database plugins.
    """

    """
    Equal
    """
    EQUAL: int = 1,

    """
    Less or equal
    """
    SMALLER_OR_EQUAL: int = 2,

    """
    More or equal
    """
    GREATER_OR_EQUAL: int = 3,

    """
    Case-sensitive wildcard matching (with * and ?)
    """
    WILDCARD: int = 4,

class ImageFormat():
    """
    The image formats that are supported by the Orthanc core.
    """

    """
    Image compressed using PNG
    """
    PNG: int = 0,

    """
    Image compressed using JPEG
    """
    JPEG: int = 1,

    """
    Image compressed using DICOM
    """
    DICOM: int = 2,

class InstanceOrigin():
    """
    The origin of a DICOM instance that has been received by Orthanc.
    """

    """
    Unknown origin
    """
    UNKNOWN: int = 1,

    """
    Instance received through DICOM protocol
    """
    DICOM_PROTOCOL: int = 2,

    """
    Instance received through REST API of Orthanc
    """
    REST_API: int = 3,

    """
    Instance added to Orthanc by a plugin
    """
    PLUGIN: int = 4,

    """
    Instance added to Orthanc by a Lua script
    """
    LUA: int = 5,

    """
    Instance received through WebDAV (new in 1.8.0)
    """
    WEB_DAV: int = 6,

class JobStepStatus():
    """
    The possible status for one single step of a job.
    """

    """
    The job has successfully executed all its steps
    """
    SUCCESS: int = 1,

    """
    The job has failed while executing this step
    """
    FAILURE: int = 2,

    """
    The job has still data to process after this step
    """
    CONTINUE: int = 3,

class JobStopReason():
    """
    Explains why the job should stop and release the resources it has allocated. This is especially important to disambiguate between the "paused" condition and the "final" conditions (success, failure, or canceled).
    """

    """
    The job has succeeded
    """
    SUCCESS: int = 1,

    """
    The job was paused, and will be resumed later
    """
    PAUSED: int = 2,

    """
    The job has failed, and might be resubmitted later
    """
    FAILURE: int = 3,

    """
    The job was canceled, and might be resubmitted later
    """
    CANCELED: int = 4,

class LoadDicomInstanceMode():
    """
    Mode specifying how to load a DICOM instance.
    """

    """
    Load the whole DICOM file, including pixel data
    """
    WHOLE_DICOM: int = 1,

    """
    Load the whole DICOM file until pixel data, which speeds up the loading
    """
    UNTIL_PIXEL_DATA: int = 2,

    """
    Load the whole DICOM file until pixel data, and replace pixel data by an empty tag whose VR (value representation) is the same as those of the original DICOM file
    """
    EMPTY_PIXEL_DATA: int = 3,

class LogCategory():
    """
    The log categories supported by Orthanc. These values must match those of enumeration "LogCategory" in the Orthanc Core.
    """

    """
    Generic (default) category
    """
    GENERIC: int = 1,

    """
    Plugin engine related logs (shall not be used by plugins)
    """
    PLUGINS: int = 2,

    """
    HTTP related logs
    """
    HTTP: int = 4,

    """
    SQLite related logs (shall not be used by plugins)
    """
    SQLITE: int = 8,

    """
    DICOM related logs
    """
    DICOM: int = 16,

    """
    jobs related logs
    """
    JOBS: int = 32,

    """
    Lua related logs (shall not be used by plugins)
    """
    LUA: int = 64,

class LogLevel():
    """
    The log levels supported by Orthanc. These values must match those of enumeration "LogLevel" in the Orthanc Core.
    """

    """
    Error log level
    """
    ERROR: int = 0,

    """
    Warning log level
    """
    WARNING: int = 1,

    """
    Info log level
    """
    INFO: int = 2,

    """
    Trace log level
    """
    TRACE: int = 3,

class MetricsType():
    """
    The available types of metrics.
    """

    """
    Default metrics
    """
    DEFAULT: int = 0,

    """
    This metrics represents a time duration. Orthanc will keep the maximum value of the metrics over a sliding window of ten seconds, which is useful if the metrics is sampled frequently.
    """
    TIMER: int = 1,

class PixelFormat():
    """
    The memory layout of the pixels of an image.
    """

    """
    Graylevel 8bpp image. The image is graylevel. Each pixel is unsigned and stored in one byte.
    """
    GRAYSCALE8: int = 1,

    """
    Graylevel, unsigned 16bpp image. The image is graylevel. Each pixel is unsigned and stored in two bytes.
    """
    GRAYSCALE16: int = 2,

    """
    Graylevel, signed 16bpp image. The image is graylevel. Each pixel is signed and stored in two bytes.
    """
    SIGNED_GRAYSCALE16: int = 3,

    """
    Color image in RGB24 format. This format describes a color image. The pixels are stored in 3 consecutive bytes. The memory layout is RGB.
    """
    RGB24: int = 4,

    """
    Color image in RGBA32 format. This format describes a color image. The pixels are stored in 4 consecutive bytes. The memory layout is RGBA.
    """
    RGBA32: int = 5,

    """
    Unknown pixel format
    """
    UNKNOWN: int = 6,

    """
    Color image in RGB48 format. This format describes a color image. The pixels are stored in 6 consecutive bytes. The memory layout is RRGGBB.
    """
    RGB48: int = 7,

    """
    Graylevel, unsigned 32bpp image. The image is graylevel. Each pixel is unsigned and stored in four bytes.
    """
    GRAYSCALE32: int = 8,

    """
    Graylevel, floating-point 32bpp image. The image is graylevel. Each pixel is floating-point and stored in four bytes.
    """
    FLOAT32: int = 9,

    """
    Color image in BGRA32 format. This format describes a color image. The pixels are stored in 4 consecutive bytes. The memory layout is BGRA.
    """
    BGRA32: int = 10,

    """
    Graylevel, unsigned 64bpp image. The image is graylevel. Each pixel is unsigned and stored in eight bytes.
    """
    GRAYSCALE64: int = 11,

class ReceivedInstanceAction():
    """
    The action to be taken after ReceivedInstanceCallback is triggered
    """

    """
    Keep the instance as is
    """
    KEEP_AS_IS: int = 1,

    """
    Modify the instance
    """
    MODIFY: int = 2,

    """
    Discard the instance
    """
    DISCARD: int = 3,

class ResourceType():
    """
    The supported types of DICOM resources.
    """

    """
    Patient
    """
    PATIENT: int = 0,

    """
    Study
    """
    STUDY: int = 1,

    """
    Series
    """
    SERIES: int = 2,

    """
    Instance
    """
    INSTANCE: int = 3,

    """
    Unavailable resource type
    """
    NONE: int = 4,

class StorageCommitmentFailureReason():
    """
    The available values for the Failure Reason (0008,1197) during storage commitment. http://dicom.nema.org/medical/dicom/2019e/output/chtml/part03/sect_C.14.html#sect_C.14.1.1
    """

    """
    Success: The DICOM instance is properly stored in the SCP
    """
    SUCCESS: int = 0,

    """
    0110H: A general failure in processing the operation was encountered
    """
    PROCESSING_FAILURE: int = 1,

    """
    0112H: One or more of the elements in the Referenced SOP Instance Sequence was not available
    """
    NO_SUCH_OBJECT_INSTANCE: int = 2,

    """
    0213H: The SCP does not currently have enough resources to store the requested SOP Instance(s)
    """
    RESOURCE_LIMITATION: int = 3,

    """
    0122H: Storage Commitment has been requested for a SOP Instance with a SOP Class that is not supported by the SCP
    """
    REFERENCED_SOPCLASS_NOT_SUPPORTED: int = 4,

    """
    0119H: The SOP Class of an element in the Referenced SOP Instance Sequence did not correspond to the SOP class registered for this SOP Instance at the SCP
    """
    CLASS_INSTANCE_CONFLICT: int = 5,

    """
    0131H: The Transaction UID of the Storage Commitment Request is already in use
    """
    DUPLICATE_TRANSACTION_UID: int = 6,

class ValueRepresentation():
    """
    The value representations present in the DICOM standard (version 2013).
    """

    """
    Application Entity
    """
    AE: int = 1,

    """
    Age String
    """
    AS: int = 2,

    """
    Attribute Tag
    """
    AT: int = 3,

    """
    Code String
    """
    CS: int = 4,

    """
    Date
    """
    DA: int = 5,

    """
    Decimal String
    """
    DS: int = 6,

    """
    Date Time
    """
    DT: int = 7,

    """
    Floating Point Double
    """
    FD: int = 8,

    """
    Floating Point Single
    """
    FL: int = 9,

    """
    Integer String
    """
    IS: int = 10,

    """
    Long String
    """
    LO: int = 11,

    """
    Long Text
    """
    LT: int = 12,

    """
    Other Byte String
    """
    OB: int = 13,

    """
    Other Float String
    """
    OF: int = 14,

    """
    Other Word String
    """
    OW: int = 15,

    """
    Person Name
    """
    PN: int = 16,

    """
    Short String
    """
    SH: int = 17,

    """
    Signed Long
    """
    SL: int = 18,

    """
    Sequence of Items
    """
    SQ: int = 19,

    """
    Signed Short
    """
    SS: int = 20,

    """
    Short Text
    """
    ST: int = 21,

    """
    Time
    """
    TM: int = 22,

    """
    Unique Identifier (UID)
    """
    UI: int = 23,

    """
    Unsigned Long
    """
    UL: int = 24,

    """
    Unknown
    """
    UN: int = 25,

    """
    Unsigned Short
    """
    US: int = 26,

    """
    Unlimited Text
    """
    UT: int = 27,



# This function returns the MIME type of a file by inspecting its extension
def AutodetectMimeType(path: str) -> str:
    """
    This function returns the MIME type of a file by inspecting its extension.

    Args:
      path (str): Path to the file.

    Returns:
      str: The MIME type. This is a statically-allocated string, do not free it.
    """
    ...

# This function compresses or decompresses a buffer, using the version of the zlib library that is used by the Orthanc core
def BufferCompression(source: bytes, compression: CompressionType, uncompress: int) -> bytes:
    """
    This function compresses or decompresses a buffer, using the version of the zlib library that is used by the Orthanc core.

    Args:
      source (bytes): The source buffer.
      compression (CompressionType): The compression algorithm.
      uncompress (int): If set to "0", the buffer must be compressed. If set to "1", the buffer must be uncompressed.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# This function checks whether the version of the Orthanc server running this plugin, is above the version of the current Orthanc SDK header
def CheckVersion() -> int:
    """
    This function checks whether the version of the Orthanc server running this plugin, is above the version of the current Orthanc SDK header. This guarantees that the plugin is compatible with the hosting Orthanc (i.e. it will not call unavailable services). The result of this function should always be checked in the OrthancPluginInitialize() entry point of the plugin.

    Returns:
      int: 1 if and only if the versions are compatible. If the result is 0, the initialization of the plugin should fail.
    """
    ...

# This function checks whether the version of the Orthanc server running this plugin, is above the given version
def CheckVersionAdvanced(expected_major: int, expected_minor: int, expected_revision: int) -> int:
    """
    This function checks whether the version of the Orthanc server running this plugin, is above the given version. Contrarily to OrthancPluginCheckVersion(), it is up to the developer of the plugin to make sure that all the Orthanc SDK services called by the plugin are actually implemented in the given version of Orthanc.

    Args:
      expected_major (int): Expected major version.
      expected_minor (int): Expected minor version.
      expected_revision (int): Expected revision.

    Returns:
      int: 1 if and only if the versions are compatible. If the result is 0, the initialization of the plugin should fail.
    """
    ...

# This function compresses the given memory buffer containing an image using the JPEG specification, and stores the result of the compression into a newly allocated memory buffer
def CompressJpegImage(format: PixelFormat, width: int, height: int, pitch: int, buffer: bytes, quality: int) -> bytes:
    """
    This function compresses the given memory buffer containing an image using the JPEG specification, and stores the result of the compression into a newly allocated memory buffer.

    Args:
      format (PixelFormat): The memory layout of the uncompressed image.
      width (int): The width of the image.
      height (int): The height of the image.
      pitch (int): The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).
      buffer (bytes): The memory buffer containing the uncompressed image.
      quality (int): The quality of the JPEG encoding, between 1 (worst quality, best compression) and 100 (best quality, worst compression).

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# This function compresses the given memory buffer containing an image using the PNG specification, and stores the result of the compression into a newly allocated memory buffer
def CompressPngImage(format: PixelFormat, width: int, height: int, pitch: int, buffer: bytes) -> bytes:
    """
    This function compresses the given memory buffer containing an image using the PNG specification, and stores the result of the compression into a newly allocated memory buffer.

    Args:
      format (PixelFormat): The memory layout of the uncompressed image.
      width (int): The width of the image.
      height (int): The height of the image.
      pitch (int): The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).
      buffer (bytes): The memory buffer containing the uncompressed image.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# This functions computes the MD5 cryptographic hash of the given memory buffer
def ComputeMd5(buffer: bytes) -> str:
    """
    This functions computes the MD5 cryptographic hash of the given memory buffer.

    Args:
      buffer (bytes): The source memory buffer.

    Returns:
      str: The NULL value in case of error, or a string containing the cryptographic hash. This string must be freed by OrthancPluginFreeString().
    """
    ...

# This functions computes the SHA-1 cryptographic hash of the given memory buffer
def ComputeSha1(buffer: bytes) -> str:
    """
    This functions computes the SHA-1 cryptographic hash of the given memory buffer.

    Args:
      buffer (bytes): The source memory buffer.

    Returns:
      str: The NULL value in case of error, or a string containing the cryptographic hash. This string must be freed by OrthancPluginFreeString().
    """
    ...

# This function takes as input a string containing a JSON file describing the content of a DICOM instance
def CreateDicom(json: str, pixel_data: Image, flags: CreateDicomFlags) -> bytes:
    """
    This function takes as input a string containing a JSON file describing the content of a DICOM instance. As an output, it writes the corresponding DICOM instance to a newly allocated memory buffer. Additionally, an image to be encoded within the DICOM instance can also be provided.
    Private tags will be associated with the private creator whose value is specified in the "DefaultPrivateCreator" configuration option of Orthanc. The function OrthancPluginCreateDicom2() can be used if another private creator must be used to create this instance.

    Args:
      json (str): The input JSON file.
      pixel_data (Image): The image. Can be NULL, if the pixel data is encoded inside the JSON with the data URI scheme.
      flags (CreateDicomFlags): Flags governing the output.

    Returns:
      bytes: 0 if success, other value if error.
    """
    ...

# This function takes as input a string containing a JSON file describing the content of a DICOM instance
def CreateDicom2(json: str, pixel_data: Image, flags: CreateDicomFlags, private_creator: str) -> bytes:
    """
    This function takes as input a string containing a JSON file describing the content of a DICOM instance. As an output, it writes the corresponding DICOM instance to a newly allocated memory buffer. Additionally, an image to be encoded within the DICOM instance can also be provided.
    Contrarily to the function OrthancPluginCreateDicom(), this function can be explicitly provided with a private creator.

    Args:
      json (str): The input JSON file.
      pixel_data (Image): The image. Can be NULL, if the pixel data is encoded inside the JSON with the data URI scheme.
      flags (CreateDicomFlags): Flags governing the output.
      private_creator (str): The private creator to be used for the private DICOM tags. Check out the global configuration option "Dictionary" of Orthanc.

    Returns:
      bytes: 0 if success, other value if error.
    """
    ...

# This function parses a memory buffer that contains a DICOM file
def CreateDicomInstance(buffer: bytes) -> DicomInstance:
    """
    This function parses a memory buffer that contains a DICOM file. The function returns a new pointer to a data structure that is managed by the Orthanc core.

    Args:
      buffer (bytes): The memory buffer containing the DICOM instance.

    Returns:
      DicomInstance: The newly allocated DICOM instance. It must be freed with OrthancPluginFreeDicomInstance().
    """
    ...

# This function creates a "matcher" object that can be used to check whether a DICOM instance matches a C-Find query
def CreateFindMatcher(query: bytes) -> FindMatcher:
    """
    This function creates a "matcher" object that can be used to check whether a DICOM instance matches a C-Find query. The C-Find query must be expressed as a DICOM buffer.

    Args:
      query (bytes): The C-Find DICOM query.

    Returns:
      FindMatcher: The newly allocated matcher. It must be freed with OrthancPluginFreeFindMatcher().
    """
    ...

# This function creates an image of given size and format
def CreateImage(format: PixelFormat, width: int, height: int) -> Image:
    """
    This function creates an image of given size and format.

    Args:
      format (PixelFormat): The format of the pixels.
      width (int): The width of the image.
      height (int): The height of the image.

    Returns:
      Image: The newly allocated image. It must be freed with OrthancPluginFreeImage().
    """
    ...

# This function decodes one frame of a DICOM image that is stored in a memory buffer
def DecodeDicomImage(buffer: bytes, frame_index: int) -> Image:
    """
    This function decodes one frame of a DICOM image that is stored in a memory buffer. This function will give the same result as OrthancPluginUncompressImage() for single-frame DICOM images.

    Args:
      buffer (bytes): Pointer to a memory buffer containing the DICOM image.
      frame_index (int): The index of the frame of interest in a multi-frame image.

    Returns:
      Image: The uncompressed image. It must be freed with OrthancPluginFreeImage().
    """
    ...

# This function takes as input a memory buffer containing a DICOM file, and outputs a JSON string representing the tags of this DICOM file
def DicomBufferToJson(buffer: bytes, format: DicomToJsonFormat, flags: DicomToJsonFlags, max_string_length: int) -> str:
    """
    This function takes as input a memory buffer containing a DICOM file, and outputs a JSON string representing the tags of this DICOM file.

    Args:
      buffer (bytes): The memory buffer containing the DICOM file.
      format (DicomToJsonFormat): The output format.
      flags (DicomToJsonFlags): Flags governing the output.
      max_string_length (int): The maximum length of a field. Too long fields will be output as "null". The 0 value means no maximum length.

    Returns:
      str: The NULL value if the case of an error, or the JSON string. This string must be freed by OrthancPluginFreeString().
    """
    ...

# This function formats a DICOM instance that is stored in Orthanc, and outputs a JSON string representing the tags of this DICOM instance
def DicomInstanceToJson(instance_id: str, format: DicomToJsonFormat, flags: DicomToJsonFlags, max_string_length: int) -> str:
    """
    This function formats a DICOM instance that is stored in Orthanc, and outputs a JSON string representing the tags of this DICOM instance.

    Args:
      instance_id (str): The Orthanc identifier of the instance.
      format (DicomToJsonFormat): The output format.
      flags (DicomToJsonFlags): Flags governing the output.
      max_string_length (int): The maximum length of a field. Too long fields will be output as "null". The 0 value means no maximum length.

    Returns:
      str: The NULL value if the case of an error, or the JSON string. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Add JavaScript code to customize the default behavior of Orthanc Explorer
def ExtendOrthancExplorer(javascript: str) -> None:
    """
    Add JavaScript code to customize the default behavior of Orthanc Explorer. This can for instance be used to add new buttons.

    Args:
      javascript (str): The custom JavaScript code.
    """
    ...

# Add JavaScript code to customize the default behavior of Orthanc Explorer
def ExtendOrthancExplorer2(plugin: str, javascript: str) -> None:
    """
    Add JavaScript code to customize the default behavior of Orthanc Explorer. This can for instance be used to add new buttons.

    Args:
      plugin (str): Identifier of your plugin (it must match "OrthancPluginGetName()").
      javascript (str): The custom JavaScript code.
    """
    ...

# This function generates a token that can be set in the HTTP header "Authorization" so as to grant full access to the REST API of Orthanc using an external HTTP client
def GenerateRestApiAuthorizationToken() -> str:
    """
    This function generates a token that can be set in the HTTP header "Authorization" so as to grant full access to the REST API of Orthanc using an external HTTP client. Using this function avoids the need of adding a separate user in the "RegisteredUsers" configuration of Orthanc, which eases deployments.
    This feature is notably useful in multiprocess scenarios, where a subprocess created by a plugin has no access to the "OrthancPluginContext", and thus cannot call "OrthancPluginRestApi[Get|Post|Put|Delete]()".
    This situation is frequently encountered in Python plugins, where the "multiprocessing" package can be used to bypass the Global Interpreter Lock (GIL) and thus to improve performance and concurrency.

    Returns:
      str: The authorization token, or NULL value in the case of an error. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Generate a random GUID/UUID (globally unique identifier)
def GenerateUuid() -> str:
    """
    Generate a random GUID/UUID (globally unique identifier).

    Returns:
      str: NULL in the case of an error, or a newly allocated string containing the UUID. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Get the value of one of the command-line arguments that were used to launch Orthanc
def GetCommandLineArgument(argument: int) -> str:
    """
    Get the value of one of the command-line arguments that were used to launch Orthanc. The number of available arguments can be retrieved by OrthancPluginGetCommandLineArgumentsCount().

    Args:
      argument (int): The index of the argument.

    Returns:
      str: The value of the argument, or NULL in the case of an error. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Retrieve the number of command-line arguments that were used to launch Orthanc
def GetCommandLineArgumentsCount() -> int:
    """
    Retrieve the number of command-line arguments that were used to launch Orthanc.

    Returns:
      int: The number of arguments.
    """
    ...

# This function returns the content of the configuration that is used by Orthanc, formatted as a JSON string
def GetConfiguration() -> str:
    """
    This function returns the content of the configuration that is used by Orthanc, formatted as a JSON string.

    Returns:
      str: NULL in the case of an error, or a newly allocated string containing the configuration. This string must be freed by OrthancPluginFreeString().
    """
    ...

# This function returns the path to the configuration file(s) that was specified when starting Orthanc
def GetConfigurationPath() -> str:
    """
    This function returns the path to the configuration file(s) that was specified when starting Orthanc. Since version 0.9.1, this path can refer to a folder that stores a set of configuration files. This function is deprecated in favor of OrthancPluginGetConfiguration().

    Returns:
      str: NULL in the case of an error, or a newly allocated string containing the path. This string must be freed by OrthancPluginFreeString().
    """
    ...

def GetDatabaseServerIdentifier() -> str:
    """

    Returns:
      str: the database server identifier.  This is a statically-allocated string, do not free it.
    """
    ...

# Retrieve a DICOM instance using its Orthanc identifier
def GetDicomForInstance(instance_id: str) -> bytes:
    """
    Retrieve a DICOM instance using its Orthanc identifier. The DICOM file is stored into a newly allocated memory buffer.

    Args:
      instance_id (str): The Orthanc identifier of the DICOM instance of interest.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# This function returns the description of a given error code
def GetErrorDescription(error: ErrorCode) -> str:
    """
    This function returns the description of a given error code.

    Args:
      error (ErrorCode): The error code of interest.

    Returns:
      str: The error description. This is a statically-allocated string, do not free it.
    """
    ...

# Retrieve the expected version of the database schema
def GetExpectedDatabaseVersion() -> int:
    """
    Retrieve the expected version of the database schema.

    Returns:
      int: The version.
    """
    ...

# This function returns the name of a font that is built in the Orthanc core
def GetFontName(font_index: int) -> str:
    """
    This function returns the name of a font that is built in the Orthanc core.

    Args:
      font_index (int): The index of the font. This value must be less than OrthancPluginGetFontsCount().

    Returns:
      str: The font name. This is a statically-allocated string, do not free it.
    """
    ...

# This function returns the size of a font that is built in the Orthanc core
def GetFontSize(font_index: int) -> int:
    """
    This function returns the size of a font that is built in the Orthanc core.

    Args:
      font_index (int): The index of the font. This value must be less than OrthancPluginGetFontsCount().

    Returns:
      int: The font size.
    """
    ...

# This function returns the number of fonts that are built in the Orthanc core
def GetFontsCount() -> int:
    """
    This function returns the number of fonts that are built in the Orthanc core. These fonts can be used to draw texts on images through OrthancPluginDrawText().

    Returns:
      int: The number of fonts.
    """
    ...

# Get the value of a global property that is stored in the Orthanc database
def GetGlobalProperty(property: int, default_value: str) -> str:
    """
    Get the value of a global property that is stored in the Orthanc database. Global properties whose index is below 1024 are reserved by Orthanc.

    Args:
      property (int): The global property of interest.
      default_value (str): The value to return, if the global property is unset.

    Returns:
      str: The value of the global property, or NULL in the case of an error. This string must be freed by OrthancPluginFreeString().
    """
    ...

# This function returns the path to the directory containing the Orthanc executable
def GetOrthancDirectory() -> str:
    """
    This function returns the path to the directory containing the Orthanc executable.

    Returns:
      str: NULL in the case of an error, or a newly allocated string containing the path. This string must be freed by OrthancPluginFreeString().
    """
    ...

# This function returns the path to the Orthanc executable
def GetOrthancPath() -> str:
    """
    This function returns the path to the Orthanc executable.

    Returns:
      str: NULL in the case of an error, or a newly allocated string containing the path. This string must be freed by OrthancPluginFreeString().
    """
    ...

# This function returns the parameters of the Orthanc peers that are known to the Orthanc server hosting the plugin
def GetPeers() -> Peers:
    """
    This function returns the parameters of the Orthanc peers that are known to the Orthanc server hosting the plugin.

    Returns:
      Peers: NULL if error, or a newly allocated opaque data structure containing the peers. This structure must be freed with OrthancPluginFreePeers().
    """
    ...

# This function makes a lookup to the dictionary of DICOM tags that are known to Orthanc, and returns the symbolic name of a DICOM tag
def GetTagName(group: int, element: int, private_creator: str) -> str:
    """
    This function makes a lookup to the dictionary of DICOM tags that are known to Orthanc, and returns the symbolic name of a DICOM tag.

    Args:
      group (int): The group of the tag.
      element (int): The element of the tag.
      private_creator (str): For private tags, the name of the private creator (can be NULL).

    Returns:
      str: NULL in the case of an error, or a newly allocated string containing the path. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Make a HTTP DELETE call to the given URL
def HttpDelete(url: str, username: str, password: str) -> None:
    """
    Make a HTTP DELETE call to the given URL. Favor OrthancPluginRestApiDelete() if calling the built-in REST API of the Orthanc instance that hosts this plugin.

    Args:
      url (str): The URL of interest.
      username (str): The username (can be "NULL" if no password protection).
      password (str): The password (can be "NULL" if no password protection).
    """
    ...

# Make a HTTP GET call to the given URL
def HttpGet(url: str, username: str, password: str) -> bytes:
    """
    Make a HTTP GET call to the given URL. The result to the query is stored into a newly allocated memory buffer. Favor OrthancPluginRestApiGet() if calling the built-in REST API of the Orthanc instance that hosts this plugin.

    Args:
      url (str): The URL of interest.
      username (str): The username (can be "NULL" if no password protection).
      password (str): The password (can be "NULL" if no password protection).

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# Make a HTTP POST call to the given URL
def HttpPost(url: str, body: bytes, username: str, password: str) -> bytes:
    """
    Make a HTTP POST call to the given URL. The result to the query is stored into a newly allocated memory buffer. Favor OrthancPluginRestApiPost() if calling the built-in REST API of the Orthanc instance that hosts this plugin.

    Args:
      url (str): The URL of interest.
      body (bytes): The content of the body of the request.
      username (str): The username (can be "NULL" if no password protection).
      password (str): The password (can be "NULL" if no password protection).

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# Make a HTTP PUT call to the given URL
def HttpPut(url: str, body: bytes, username: str, password: str) -> bytes:
    """
    Make a HTTP PUT call to the given URL. The result to the query is stored into a newly allocated memory buffer. Favor OrthancPluginRestApiPut() if calling the built-in REST API of the Orthanc instance that hosts this plugin.

    Args:
      url (str): The URL of interest.
      body (bytes): The content of the body of the request.
      username (str): The username (can be "NULL" if no password protection).
      password (str): The password (can be "NULL" if no password protection).

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# This function loads a DICOM instance from the content of the Orthanc database
def LoadDicomInstance(instance_id: str, mode: LoadDicomInstanceMode) -> DicomInstance:
    """
    This function loads a DICOM instance from the content of the Orthanc database. The function returns a new pointer to a data structure that is managed by the Orthanc core.

    Args:
      instance_id (str): The Orthanc identifier of the DICOM instance of interest.
      mode (LoadDicomInstanceMode): Flag specifying how to deal with pixel data.

    Returns:
      DicomInstance: The newly allocated DICOM instance. It must be freed with OrthancPluginFreeDicomInstance().
    """
    ...

# Log an error message using the Orthanc logging system
def LogError(message: str) -> None:
    """
    Log an error message using the Orthanc logging system.

    Args:
      message (str): The message to be logged.
    """
    ...

# Log an information message using the Orthanc logging system
def LogInfo(message: str) -> None:
    """
    Log an information message using the Orthanc logging system.

    Args:
      message (str): The message to be logged.
    """
    ...

# Log a message using the Orthanc logging system
def LogMessage(message: str, plugin: str, file: str, line: int, category: LogCategory, level: LogLevel) -> None:
    """
    Log a message using the Orthanc logging system.

    Args:
      message (str): The message to be logged.
      plugin (str): The plugin name.
      file (str): The filename in the plugin code.
      line (int): The file line in the plugin code.
      category (LogCategory): The category.
      level (LogLevel): The level of the message.
    """
    ...

# Log a warning message using the Orthanc logging system
def LogWarning(message: str) -> None:
    """
    Log a warning message using the Orthanc logging system.

    Args:
      message (str): The message to be logged.
    """
    ...

# Look for an instance stored in Orthanc, using its SOP Instance UID tag (0x0008, 0x0018)
def LookupInstance(sop_instance_u_i_d: str) -> str:
    """
    Look for an instance stored in Orthanc, using its SOP Instance UID tag (0x0008, 0x0018). This function uses the database index to run as fast as possible (it does not loop over all the stored instances).

    Args:
      sop_instance_u_i_d (str): The SOP Instance UID of interest.

    Returns:
      str: The NULL value if the instance is non-existent, or a string containing the Orthanc ID of the instance. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Look for a patient stored in Orthanc, using its Patient ID tag (0x0010, 0x0020)
def LookupPatient(patient_i_d: str) -> str:
    """
    Look for a patient stored in Orthanc, using its Patient ID tag (0x0010, 0x0020). This function uses the database index to run as fast as possible (it does not loop over all the stored patients).

    Args:
      patient_i_d (str): The Patient ID of interest.

    Returns:
      str: The NULL value if the patient is non-existent, or a string containing the Orthanc ID of the patient. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Look for a series stored in Orthanc, using its Series Instance UID tag (0x0020, 0x000e)
def LookupSeries(series_u_i_d: str) -> str:
    """
    Look for a series stored in Orthanc, using its Series Instance UID tag (0x0020, 0x000e). This function uses the database index to run as fast as possible (it does not loop over all the stored series).

    Args:
      series_u_i_d (str): The Series Instance UID of interest.

    Returns:
      str: The NULL value if the series is non-existent, or a string containing the Orthanc ID of the series. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Look for a study stored in Orthanc, using its Study Instance UID tag (0x0020, 0x000d)
def LookupStudy(study_u_i_d: str) -> str:
    """
    Look for a study stored in Orthanc, using its Study Instance UID tag (0x0020, 0x000d). This function uses the database index to run as fast as possible (it does not loop over all the stored studies).

    Args:
      study_u_i_d (str): The Study Instance UID of interest.

    Returns:
      str: The NULL value if the study is non-existent, or a string containing the Orthanc ID of the study. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Look for a study stored in Orthanc, using its Accession Number tag (0x0008, 0x0050)
def LookupStudyWithAccessionNumber(accession_number: str) -> str:
    """
    Look for a study stored in Orthanc, using its Accession Number tag (0x0008, 0x0050). This function uses the database index to run as fast as possible (it does not loop over all the stored studies).

    Args:
      accession_number (str): The Accession Number of interest.

    Returns:
      str: The NULL value if the study is non-existent, or a string containing the Orthanc ID of the study. This string must be freed by OrthancPluginFreeString().
    """
    ...

# Read the content of a file on the filesystem, and returns it into a newly allocated memory buffer
def ReadFile(path: str) -> bytes:
    """
    Read the content of a file on the filesystem, and returns it into a newly allocated memory buffer.

    Args:
      path (str): The path of the file to be read.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# This function declares a new public tag in the dictionary of DICOM tags that are known to Orthanc
def RegisterDictionaryTag(group: int, element: int, vr: ValueRepresentation, name: str, min_multiplicity: int, max_multiplicity: int) -> None:
    """
    This function declares a new public tag in the dictionary of DICOM tags that are known to Orthanc. This function should be used in the OrthancPluginInitialize() callback.

    Args:
      group (int): The group of the tag.
      element (int): The element of the tag.
      vr (ValueRepresentation): The value representation of the tag.
      name (str): The nickname of the tag.
      min_multiplicity (int): The minimum multiplicity of the tag (must be above 0).
      max_multiplicity (int): The maximum multiplicity of the tag. A value of 0 means an arbitrary multiplicity (""n"").
    """
    ...

# This function declares a custom error code that can be generated by this plugin
def RegisterErrorCode(code: int, http_status: int, message: str) -> None:
    """
    This function declares a custom error code that can be generated by this plugin. This declaration is used to enrich the body of the HTTP answer in the case of an error, and to set the proper HTTP status code.

    Args:
      code (int): The error code that is internal to this plugin.
      http_status (int): The HTTP status corresponding to this error.
      message (str): The description of the error.
    """
    ...

# This function declares a new private tag in the dictionary of DICOM tags that are known to Orthanc
def RegisterPrivateDictionaryTag(group: int, element: int, vr: ValueRepresentation, name: str, min_multiplicity: int, max_multiplicity: int, private_creator: str) -> None:
    """
    This function declares a new private tag in the dictionary of DICOM tags that are known to Orthanc. This function should be used in the OrthancPluginInitialize() callback.

    Args:
      group (int): The group of the tag.
      element (int): The element of the tag.
      vr (ValueRepresentation): The value representation of the tag.
      name (str): The nickname of the tag.
      min_multiplicity (int): The minimum multiplicity of the tag (must be above 0).
      max_multiplicity (int): The maximum multiplicity of the tag. A value of 0 means an arbitrary multiplicity (""n"").
      private_creator (str): The private creator of this private tag.
    """
    ...

# Make a DELETE call to the built-in Orthanc REST API
def RestApiDelete(uri: str) -> None:
    """
    Make a DELETE call to the built-in Orthanc REST API.
    Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource.

    Args:
      uri (str): The URI to delete in the built-in Orthanc API.
    """
    ...

# Make a DELETE call to the Orthanc REST API, after all the plugins are applied
def RestApiDeleteAfterPlugins(uri: str) -> None:
    """
    Make a DELETE call to the Orthanc REST API, after all the plugins are applied. In other words, if some plugin overrides or adds the called URI to the built-in Orthanc REST API, this call will return the result provided by this plugin.
    Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource.

    Args:
      uri (str): The URI to delete in the built-in Orthanc API.
    """
    ...

# Make a GET call to the built-in Orthanc REST API
def RestApiGet(uri: str) -> bytes:
    """
    Make a GET call to the built-in Orthanc REST API. The result to the query is stored into a newly allocated memory buffer.
    Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource.

    Args:
      uri (str): The URI in the built-in Orthanc API.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# Make a GET call to the Orthanc REST API, after all the plugins are applied
def RestApiGetAfterPlugins(uri: str) -> bytes:
    """
    Make a GET call to the Orthanc REST API, after all the plugins are applied. In other words, if some plugin overrides or adds the called URI to the built-in Orthanc REST API, this call will return the result provided by this plugin. The result to the query is stored into a newly allocated memory buffer.
    Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource.

    Args:
      uri (str): The URI in the built-in Orthanc API.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# Make a POST call to the built-in Orthanc REST API
def RestApiPost(uri: str, body: bytes) -> bytes:
    """
    Make a POST call to the built-in Orthanc REST API. The result to the query is stored into a newly allocated memory buffer.
    Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource.

    Args:
      uri (str): The URI in the built-in Orthanc API.
      body (bytes): The body of the POST request.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# Make a POST call to the Orthanc REST API, after all the plugins are applied
def RestApiPostAfterPlugins(uri: str, body: bytes) -> bytes:
    """
    Make a POST call to the Orthanc REST API, after all the plugins are applied. In other words, if some plugin overrides or adds the called URI to the built-in Orthanc REST API, this call will return the result provided by this plugin. The result to the query is stored into a newly allocated memory buffer.
    Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource.

    Args:
      uri (str): The URI in the built-in Orthanc API.
      body (bytes): The body of the POST request.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# Make a PUT call to the built-in Orthanc REST API
def RestApiPut(uri: str, body: bytes) -> bytes:
    """
    Make a PUT call to the built-in Orthanc REST API. The result to the query is stored into a newly allocated memory buffer.
    Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource.

    Args:
      uri (str): The URI in the built-in Orthanc API.
      body (bytes): The body of the PUT request.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# Make a PUT call to the Orthanc REST API, after all the plugins are applied
def RestApiPutAfterPlugins(uri: str, body: bytes) -> bytes:
    """
    Make a PUT call to the Orthanc REST API, after all the plugins are applied. In other words, if some plugin overrides or adds the called URI to the built-in Orthanc REST API, this call will return the result provided by this plugin. The result to the query is stored into a newly allocated memory buffer.
    Remark: If the resource is not existing (error 404), the error code will be OrthancPluginErrorCode_UnknownResource.

    Args:
      uri (str): The URI in the built-in Orthanc API.
      body (bytes): The body of the PUT request.

    Returns:
      bytes: 0 if success, or the error code if failure.
    """
    ...

# This function gives a name to the thread that is calling this function
def SetCurrentThreadName(thread_name: str) -> None:
    """
    This function gives a name to the thread that is calling this function. This name is used in the Orthanc logs. This function must only be called from threads that the plugin has created itself.

    Args:
      thread_name (str): The name of the current thread. A thread name cannot be longer than 16 characters.
    """
    ...

# Set a description for this plugin
def SetDescription(description: str) -> None:
    """
    Set a description for this plugin. It is displayed in the "Plugins" page of Orthanc Explorer.

    Args:
      description (str): The description.
    """
    ...

# Set a description for this plugin
def SetDescription2(plugin: str, description: str) -> None:
    """
    Set a description for this plugin. It is displayed in the "Plugins" page of Orthanc Explorer.

    Args:
      plugin (str): Identifier of your plugin (it must match "OrthancPluginGetName()").
      description (str): The description.
    """
    ...

# Set the value of a global property into the Orthanc database
def SetGlobalProperty(property: int, value: str) -> None:
    """
    Set the value of a global property into the Orthanc database. Setting a global property can be used by plugins to save their internal parameters. Plugins are only allowed to set properties whose index are above or equal to 1024 (properties below 1024 are read-only and reserved by Orthanc).

    Args:
      property (int): The global property of interest.
      value (str): The value to be set in the global property.
    """
    ...

# This function sets the value of a floating-point metrics to monitor the behavior of the plugin through tools such as Prometheus
def SetMetricsValue(name: str, value: float, type: MetricsType) -> None:
    """
    This function sets the value of a floating-point metrics to monitor the behavior of the plugin through tools such as Prometheus. The values of all the metrics are stored within the Orthanc context.

    Args:
      name (str): The name of the metrics to be set.
      value (float): The value of the metrics.
      type (MetricsType): The type of the metrics. This parameter is only taken into consideration the first time this metrics is set.
    """
    ...

# For plugins that come with a Web interface, this function declares the entry path where to find this interface
def SetRootUri(uri: str) -> None:
    """
    For plugins that come with a Web interface, this function declares the entry path where to find this interface. This information is notably used in the "Plugins" page of Orthanc Explorer.

    Args:
      uri (str): The root URI for this plugin.
    """
    ...

# For plugins that come with a Web interface, this function declares the entry path where to find this interface
def SetRootUri2(plugin: str, uri: str) -> None:
    """
    For plugins that come with a Web interface, this function declares the entry path where to find this interface. This information is notably used in the "Plugins" page of Orthanc Explorer.

    Args:
      plugin (str): Identifier of your plugin (it must match "OrthancPluginGetName()").
      uri (str): The root URI for this plugin.
    """
    ...

# This function parses a memory buffer that contains a DICOM file, then transcodes it to the given transfer syntax
def TranscodeDicomInstance(buffer: bytes, transfer_syntax: str) -> DicomInstance:
    """
    This function parses a memory buffer that contains a DICOM file, then transcodes it to the given transfer syntax. The function returns a new pointer to a data structure that is managed by the Orthanc core.

    Args:
      buffer (bytes): The memory buffer containing the DICOM instance.
      transfer_syntax (str): The transfer syntax UID for the transcoding.

    Returns:
      DicomInstance: The newly allocated DICOM instance. It must be freed with OrthancPluginFreeDicomInstance().
    """
    ...

# This function decodes a compressed image from a memory buffer
def UncompressImage(data: bytes, format: ImageFormat) -> Image:
    """
    This function decodes a compressed image from a memory buffer.

    Args:
      data (bytes): Pointer to a memory buffer containing the compressed image.
      format (ImageFormat): The file format of the compressed image.

    Returns:
      Image: The uncompressed image. It must be freed with OrthancPluginFreeImage().
    """
    ...

# Write the content of a memory buffer to the filesystem
def WriteFile(path: str, data: bytes) -> None:
    """
    Write the content of a memory buffer to the filesystem.

    Args:
      path (str): The path of the file to be written.
      data (bytes): The content of the memory buffer.
    """
    ...

# This function creates an image of given size and format, and initializes its pixel data from a memory buffer
def CreateImageFromBuffer(format: PixelFormat, width: int, height: int, pitch: int, buffer: bytes) -> Image:
    """
    This function creates an image of given size and format, and initializes its pixel data from a memory buffer.

    Args:
      format (PixelFormat): The format of the pixels.
      width (int): The width of the image.
      height (int): The height of the image.
      pitch (int): The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).
      buffer (bytes): The memory buffer.

    Returns:
      Image: The newly allocated image.
    """
    ...

# Get information about the given DICOM tag
def LookupDictionary(name: str) -> dict:
    """
    Get information about the given DICOM tag.

    Args:
      name (str): The name of the DICOM tag.

    Returns:
      dict: Dictionary containing the requested information.
    """
    ...

class FindCallback(typing.Protocol):
    def __call__(self, answers: FindAnswers, query: FindQuery, issuer_aet: str, called_aet: str) -> None:
        ...

# Register a callback to handle C-Find requests
def RegisterFindCallback(callback: FindCallback) -> None:
    """
    Register a callback to handle C-Find requests.

    Args:
      callback (FindCallback): The callback function.
    """
    ...

class IncomingCStoreInstanceFilter(typing.Protocol):
    def __call__(self, received_dicom: DicomInstance) -> int:
        ...

# Register a callback to filter incoming DICOM instances received by Orthanc through C-STORE
def RegisterIncomingCStoreInstanceFilter(callback: IncomingCStoreInstanceFilter) -> None:
    """
    Register a callback to filter incoming DICOM instances received by Orthanc through C-STORE.

    Args:
      callback (IncomingCStoreInstanceFilter): The callback function.
    """
    ...

class IncomingHttpRequestFilter(typing.Protocol):
    def __call__(self, uri: str, method: HttpMethod, ip: str, headers: dict, get: dict) -> bool:
        ...

# Callback to filter incoming HTTP requests received by Orthanc
def RegisterIncomingHttpRequestFilter(callback: IncomingHttpRequestFilter) -> None:
    """
    Callback to filter incoming HTTP requests received by Orthanc.

    Args:
      callback (IncomingHttpRequestFilter): The callback function.
    """
    ...

class MoveCallback(typing.Protocol):
    def __call__(self, Level: str, PatientID: str, AccessionNumber: str, StudyInstanceUID: str, SeriesInstanceUID: str, SOPInstanceUID: str, OriginatorAET: str, SourceAET: str, TargetAET: str, OriginatorID: int) -> None:
        ...

# Register a callback to handle C-Move requests (simple version, with 1 suboperation)
def RegisterMoveCallback(callback: MoveCallback) -> None:
    """
    Register a callback to handle C-Move requests (simple version, with 1 suboperation).

    Args:
      callback (MoveCallback): The callback function.
    """
    ...

class MoveCallback2(typing.Protocol):
    def __call__(self, Level: str, PatientID: str, AccessionNumber: str, StudyInstanceUID: str, SeriesInstanceUID: str, SOPInstanceUID: str, OriginatorAET: str, SourceAET: str, TargetAET: str, OriginatorID: int) -> object:
        ...

class GetMoveSizeCallback(typing.Protocol):
    def __call__(self, driver: object) -> int:
        ...

class ApplyMoveCallback(typing.Protocol):
    def __call__(self, driver: object) -> None:
        ...

class FreeMoveCallback(typing.Protocol):
    def __call__(self, driver: object) -> None:
        ...

# Register a callback to handle C-Move requests (full version, with multiple suboperations)
def RegisterMoveCallback2(callback: MoveCallback2, get_move_size: GetMoveSizeCallback, apply_move: ApplyMoveCallback, free_move: FreeMoveCallback) -> None:
    """
    Register a callback to handle C-Move requests (full version, with multiple suboperations).

    Args:
      callback (MoveCallback2): Main callback that creates the C-Move driver.
      get_move_size (GetMoveSizeCallback): Callback to read the number of C-Move suboperations.
      apply_move (ApplyMoveCallback): Callback to apply one C-Move suboperation.
      free_move (FreeMoveCallback): Callback to free the C-Move driver.
    """
    ...

class OnChangeCallback(typing.Protocol):
    def __call__(self, change_type: ChangeType, resource_type: ResourceType, resource_id: str) -> None:
        ...

# Register a callback to monitor changes
def RegisterOnChangeCallback(callback: OnChangeCallback) -> None:
    """
    Register a callback to monitor changes.

    Args:
      callback (OnChangeCallback): The callback function.
    """
    ...

class OnStoredInstanceCallback(typing.Protocol):
    def __call__(self, instance: DicomInstance, instance_id: str) -> None:
        ...

# Register a callback for received DICOM instances
def RegisterOnStoredInstanceCallback(callback: OnStoredInstanceCallback) -> None:
    """
    Register a callback for received DICOM instances.

    Args:
      callback (OnStoredInstanceCallback): The callback function.
    """
    ...

class ReceivedInstanceCallback(typing.Protocol):
    def __call__(self, received_dicom: bytes, origin: InstanceOrigin) -> tuple[ReceivedInstanceAction, bytes]:
        ...

# Register a callback to keep/discard/modify a DICOM instance received by Orthanc from any source (C-STORE or REST API)
def RegisterReceivedInstanceCallback(callback: ReceivedInstanceCallback) -> None:
    """
    Register a callback to keep/discard/modify a DICOM instance received by Orthanc from any source (C-STORE or REST API).

    Args:
      callback (ReceivedInstanceCallback): The callback function.
    """
    ...

class RestCallback(typing.Protocol):
    def __call__(self, output: RestOutput, url: str, method: HttpMethod, groups: dict, get: dict, headers: dict, body: bytes=None) -> None:
        ...

# Register a REST callback
def RegisterRestCallback(path_regular_expression: str, callback: RestCallback) -> None:
    """
    Register a REST callback.

    Args:
      path_regular_expression (str): Regular expression for the URI. May contain groups.
      callback (RestCallback): The callback function to handle the REST call.
    """
    ...

class StorageCreateCallback(typing.Protocol):
    def __call__(self, uuid: str, content_type: ContentType, data: bytes) -> None:
        ...

class StorageReadCallback(typing.Protocol):
    def __call__(self, uuid: str, content_type: ContentType) -> bytes:
        ...

class StorageRemoveCallback(typing.Protocol):
    def __call__(self, uuid: str, content_type: ContentType) -> None:
        ...

# Register a custom storage area
def RegisterStorageArea(create: StorageCreateCallback, read: StorageReadCallback, remove: StorageRemoveCallback) -> None:
    """
    Register a custom storage area.

    Args:
      create (StorageCreateCallback): The callback function to store a file on the custom storage area.
      read (StorageReadCallback): The callback function to read a file from the custom storage area.
      remove (StorageRemoveCallback): The callback function to remove a file from the custom storage area.
    """
    ...

class StorageCommitmentScpCallback(typing.Protocol):
    def __call__(self, job_id: str, transaction_uid: str, sop_class_uids: list[str], sop_instance_uids: list[str], remote_aet: str, called_aet: str) -> object:
        ...

class StorageCommitmentLookup(typing.Protocol):
    def __call__(self, sop_class_uid: str, sop_instance_uid: str, driver: object) -> StorageCommitmentFailureReason:
        ...

# Register a callback to handle incoming requests to the storage commitment SCP
def RegisterStorageCommitmentScpCallback(callback: StorageCommitmentScpCallback, lookup: StorageCommitmentLookup) -> None:
    """
    Register a callback to handle incoming requests to the storage commitment SCP.

    Args:
      callback (StorageCommitmentScpCallback): Main callback that creates the a driver to handle an incoming storage commitment request.
      lookup (StorageCommitmentLookup): Callback function to get the status of one DICOM instance.
    """
    ...

class WorklistCallback(typing.Protocol):
    def __call__(self, answers: WorklistAnswers, query: WorklistQuery, issuer_aet: str, called_aet: str) -> None:
        ...

# Register a callback to handle modality worklists requests
def RegisterWorklistCallback(callback: WorklistCallback) -> None:
    """
    Register a callback to handle modality worklists requests.

    Args:
      callback (WorklistCallback): The callback function.
    """
    ...


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
    def GetInstanceRemoteAet(self) -> str:
        """
        This function returns the Application Entity Title (AET) of the DICOM modality from which a DICOM instance originates.

        Returns:
          str: The AET if success, NULL if error.
        """
        ...
    
    # This function returns the number of bytes of the given DICOM instance
    def GetInstanceSize(self) -> int:
        """
        This function returns the number of bytes of the given DICOM instance.

        Returns:
          int: The size of the file, -1 in case of error.
        """
        ...
    
    # This function returns a pointer to a newly created string containing a JSON file
    def GetInstanceJson(self) -> str:
        """
        This function returns a pointer to a newly created string containing a JSON file. This JSON file encodes the tag hierarchy of the given DICOM instance.

        Returns:
          str: The NULL value in case of error, or a string containing the JSON file. This string must be freed by OrthancPluginFreeString().
        """
        ...
    
    # This function returns a pointer to a newly created string containing a JSON file
    def GetInstanceSimplifiedJson(self) -> str:
        """
        This function returns a pointer to a newly created string containing a JSON file. This JSON file encodes the tag hierarchy of the given DICOM instance. In contrast with ::OrthancPluginGetInstanceJson(), the returned JSON file is in its simplified version.

        Returns:
          str: The NULL value in case of error, or a string containing the JSON file. This string must be freed by OrthancPluginFreeString().
        """
        ...
    
    # This function checks whether the DICOM instance of interest is associated with some metadata
    def HasInstanceMetadata(self, metadata: str) -> int:
        """
        This function checks whether the DICOM instance of interest is associated with some metadata. As of Orthanc 0.8.1, in the callbacks registered by ::OrthancPluginRegisterOnStoredInstanceCallback(), the only possibly available metadata are "ReceptionDate", "RemoteAET" and "IndexInSeries".

        Args:
          metadata (str): The metadata of interest.

        Returns:
          int: 1 if the metadata is present, 0 if it is absent, -1 in case of error.
        """
        ...
    
    # This functions returns the value of some metadata that is associated with the DICOM instance of interest
    def GetInstanceMetadata(self, metadata: str) -> str:
        """
        This functions returns the value of some metadata that is associated with the DICOM instance of interest. Before calling this function, the existence of the metadata must have been checked with ::OrthancPluginHasInstanceMetadata().

        Args:
          metadata (str): The metadata of interest.

        Returns:
          str: The metadata value if success, NULL if error. Please note that the returned string belongs to the instance object and must NOT be deallocated. Please make a copy of the string if you wish to access it later.
        """
        ...
    
    # This function returns the origin of a DICOM instance that has been received by Orthanc
    def GetInstanceOrigin(self) -> InstanceOrigin:
        """
        This function returns the origin of a DICOM instance that has been received by Orthanc.

        Returns:
          InstanceOrigin: The origin of the instance.
        """
        ...
    
    # This function returns a pointer to a newly created string that contains the transfer syntax UID of the DICOM instance
    def GetInstanceTransferSyntaxUid(self) -> str:
        """
        This function returns a pointer to a newly created string that contains the transfer syntax UID of the DICOM instance. The empty string might be returned if this information is unknown.

        Returns:
          str: The NULL value in case of error, or a string containing the transfer syntax UID. This string must be freed by OrthancPluginFreeString().
        """
        ...
    
    # This function returns a Boolean value indicating whether the DICOM instance contains the pixel data (7FE0,0010) tag
    def HasInstancePixelData(self) -> int:
        """
        This function returns a Boolean value indicating whether the DICOM instance contains the pixel data (7FE0,0010) tag.

        Returns:
          int: "1" if the DICOM instance contains pixel data, or "0" if the tag is missing, or "-1" in the case of an error.
        """
        ...
    
    # This function returns the number of frames that are part of a DICOM image managed by the Orthanc core
    def GetInstanceFramesCount(self) -> int:
        """
        This function returns the number of frames that are part of a DICOM image managed by the Orthanc core.

        Returns:
          int: The number of frames (will be zero in the case of an error).
        """
        ...
    
    # This function returns a memory buffer containing the raw content of a frame in a DICOM instance that is managed by the Orthanc core
    def GetInstanceRawFrame(self, frame_index: int) -> bytes:
        """
        This function returns a memory buffer containing the raw content of a frame in a DICOM instance that is managed by the Orthanc core. This is notably useful for compressed transfer syntaxes, as it gives access to the embedded files (such as JPEG, JPEG-LS or JPEG2k). The Orthanc core transparently reassembles the fragments to extract the raw frame.

        Args:
          frame_index (int): The index of the frame of interest.

        Returns:
          bytes: 0 if success, or the error code if failure.
        """
        ...
    
    # This function decodes one frame of a DICOM image that is managed by the Orthanc core
    def GetInstanceDecodedFrame(self, frame_index: int) -> Image:
        """
        This function decodes one frame of a DICOM image that is managed by the Orthanc core.

        Args:
          frame_index (int): The index of the frame of interest.

        Returns:
          Image: The uncompressed image. It must be freed with OrthancPluginFreeImage().
        """
        ...
    
    # This function returns a memory buffer containing the serialization of a DICOM instance that is managed by the Orthanc core
    def SerializeDicomInstance(self) -> bytes:
        """
        This function returns a memory buffer containing the serialization of a DICOM instance that is managed by the Orthanc core.

        Returns:
          bytes: 0 if success, or the error code if failure.
        """
        ...
    
    # This function takes as DICOM instance managed by the Orthanc core, and outputs a JSON string representing the tags of this DICOM file
    def GetInstanceAdvancedJson(self, format: DicomToJsonFormat, flags: DicomToJsonFlags, max_string_length: int) -> str:
        """
        This function takes as DICOM instance managed by the Orthanc core, and outputs a JSON string representing the tags of this DICOM file.

        Args:
          format (DicomToJsonFormat): The output format.
          flags (DicomToJsonFlags): Flags governing the output.
          max_string_length (int): The maximum length of a field. Too long fields will be output as "null". The 0 value means no maximum length.

        Returns:
          str: The NULL value if the case of an error, or the JSON string. This string must be freed by OrthancPluginFreeString().
        """
        ...

    
    # Get the content of the DICOM instance
    def GetInstanceData(self) -> bytes:
        """
        Get the content of the DICOM instance.

        Returns:
          bytes: The DICOM data.
        """
        ...
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
    def FindAddAnswer(self, dicom: bytes) -> None:
        """
        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.

        Args:
          dicom (bytes): The answer to be added, encoded as a DICOM file.
        """
        ...
    
    # This function marks as incomplete the set of answers corresponding to some C-Find SCP request that is not related to modality worklists
    def FindMarkIncomplete(self) -> None:
        """
        This function marks as incomplete the set of answers corresponding to some C-Find SCP request that is not related to modality worklists. This must be used if canceling the handling of a request when too many answers are to be returned.
        """
        ...

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()
    def FindMatcherIsMatch(self, dicom: bytes) -> int:
        """
        This function checks whether one DICOM instance matches C-Find matcher that was previously allocated using OrthancPluginCreateFindMatcher().

        Args:
          dicom (bytes): The DICOM instance to be matched.

        Returns:
          int: 1 if the DICOM instance matches the query, 0 otherwise.
        """
        ...

class FindQuery:
    """
    DICOM C-FIND query
    """
    ...

    
    # This function returns the number of tags that are contained in the given C-Find query
    def GetFindQuerySize(self) -> int:
        """
        This function returns the number of tags that are contained in the given C-Find query.

        Returns:
          int: The number of tags.
        """
        ...
    
    # This function returns the symbolic name of one DICOM tag in the given C-Find query
    def GetFindQueryTagName(self, index: int) -> str:
        """
        This function returns the symbolic name of one DICOM tag in the given C-Find query.

        Args:
          index (int): The index of the tag of interest.

        Returns:
          str: 0 if success, other value if error.
        """
        ...
    
    # This function returns the value associated with one tag in the given C-Find query
    def GetFindQueryValue(self, index: int) -> str:
        """
        This function returns the value associated with one tag in the given C-Find query.

        Args:
          index (int): The index of the tag of interest.

        Returns:
          str: 0 if success, other value if error.
        """
        ...

    
    # This function returns the element of one DICOM tag in the given C-Find query
    def GetFindQueryTagElement(self, index: int) -> int:
        """
        This function returns the element of one DICOM tag in the given C-Find query.

        Args:
          index (int): The index of the tag of interest.

        Returns:
          int: The value of the element.
        """
        ...
    
    # This function returns the group of one DICOM tag in the given C-Find query
    def GetFindQueryTagGroup(self, index: int) -> int:
        """
        This function returns the group of one DICOM tag in the given C-Find query.

        Args:
          index (int): The index of the tag of interest.

        Returns:
          int: The value of the group.
        """
        ...
class Image:
    """
    2D image managed by the Orthanc core
    """
    ...

    
    # This function returns the type of memory layout for the pixels of the given image
    def GetImagePixelFormat(self) -> PixelFormat:
        """
        This function returns the type of memory layout for the pixels of the given image.

        Returns:
          PixelFormat: The pixel format.
        """
        ...
    
    # This function returns the width of the given image
    def GetImageWidth(self) -> int:
        """
        This function returns the width of the given image.

        Returns:
          int: The width.
        """
        ...
    
    # This function returns the height of the given image
    def GetImageHeight(self) -> int:
        """
        This function returns the height of the given image.

        Returns:
          int: The height.
        """
        ...
    
    # This function returns the pitch of the given image
    def GetImagePitch(self) -> int:
        """
        This function returns the pitch of the given image. The pitch is defined as the number of bytes between 2 successive lines of the image in the memory buffer.

        Returns:
          int: The pitch.
        """
        ...
    
    # This function creates a new image, changing the memory layout of the pixels
    def ConvertPixelFormat(self, target_format: PixelFormat) -> Image:
        """
        This function creates a new image, changing the memory layout of the pixels.

        Args:
          target_format (PixelFormat): The target pixel format.

        Returns:
          Image: The resulting image. It must be freed with OrthancPluginFreeImage().
        """
        ...
    
    # This function draws some text on some image
    def DrawText(self, font_index: int, utf8_text: str, x: int, y: int, r: int, g: int, b: int) -> None:
        """
        This function draws some text on some image.

        Args:
          font_index (int): The index of the font. This value must be less than OrthancPluginGetFontsCount().
          utf8_text (str): The text to be drawn, encoded as an UTF-8 zero-terminated string.
          x (int): The X position of the text over the image.
          y (int): The Y position of the text over the image.
          r (int): The value of the red color channel of the text.
          g (int): The value of the green color channel of the text.
          b (int): The value of the blue color channel of the text.
        """
        ...

    
    # This function returns a pointer to the memory buffer that contains the pixels of the image
    def GetImageBuffer(self) -> bytes:
        """
        This function returns a pointer to the memory buffer that contains the pixels of the image.

        Returns:
          bytes: The pixel data.
        """
        ...
class Job:
    """
    Orthanc job
    """
    ...

    
    # This function adds the given job to the pending jobs of Orthanc
    def SubmitJob(self, priority: int) -> str:
        """
        This function adds the given job to the pending jobs of Orthanc. Orthanc will take take of freeing it by invoking the finalization callback provided to OrthancPluginCreateJob().

        Args:
          priority (int): The priority of the job.

        Returns:
          str: ID of the newly-submitted job. This string must be freed by OrthancPluginFreeString().
        """
        ...

class Peers:
    """
    Orthanc peer
    """
    ...

    
    # This function returns the number of Orthanc peers
    def GetPeersCount(self) -> int:
        """
        This function returns the number of Orthanc peers.
        This function is thread-safe: Several threads sharing the same OrthancPluginPeers object can simultaneously call this function.

        Returns:
          int: The number of peers.
        """
        ...
    
    # This function returns the symbolic name of the Orthanc peer, which corresponds to the key of the "OrthancPeers" configuration option of Orthanc
    def GetPeerName(self, peer_index: int) -> str:
        """
        This function returns the symbolic name of the Orthanc peer, which corresponds to the key of the "OrthancPeers" configuration option of Orthanc.
        This function is thread-safe: Several threads sharing the same OrthancPluginPeers object can simultaneously call this function.

        Args:
          peer_index (int): The index of the peer of interest. This value must be lower than OrthancPluginGetPeersCount().

        Returns:
          str: The symbolic name, or NULL in the case of an error.
        """
        ...
    
    # This function returns the base URL to the REST API of some Orthanc peer
    def GetPeerUrl(self, peer_index: int) -> str:
        """
        This function returns the base URL to the REST API of some Orthanc peer.
        This function is thread-safe: Several threads sharing the same OrthancPluginPeers object can simultaneously call this function.

        Args:
          peer_index (int): The index of the peer of interest. This value must be lower than OrthancPluginGetPeersCount().

        Returns:
          str: The URL, or NULL in the case of an error.
        """
        ...
    
    # This function returns some user-defined property of some Orthanc peer
    def GetPeerUserProperty(self, peer_index: int, user_property: str) -> str:
        """
        This function returns some user-defined property of some Orthanc peer. An user-defined property is a property that is associated with the peer in the Orthanc configuration file, but that is not recognized by the Orthanc core.
        This function is thread-safe: Several threads sharing the same OrthancPluginPeers object can simultaneously call this function.

        Args:
          peer_index (int): The index of the peer of interest. This value must be lower than OrthancPluginGetPeersCount().
          user_property (str): The user property of interest.

        Returns:
          str: The value of the user property, or NULL if it is not defined.
        """
        ...

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
    def AnswerBuffer(self, answer: bytes, mime_type: str) -> None:
        """
        This function answers to a REST request with the content of a memory buffer.

        Args:
          answer (bytes): Pointer to the memory buffer containing the answer.
          mime_type (str): The MIME type of the answer.
        """
        ...
    
    # This function answers to a REST request with a PNG image
    def CompressAndAnswerPngImage(self, format: PixelFormat, width: int, height: int, pitch: int, buffer: bytes) -> None:
        """
        This function answers to a REST request with a PNG image. The parameters of this function describe a memory buffer that contains an uncompressed image. The image will be automatically compressed as a PNG image by the core system of Orthanc.

        Args:
          format (PixelFormat): The memory layout of the uncompressed image.
          width (int): The width of the image.
          height (int): The height of the image.
          pitch (int): The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).
          buffer (bytes): The memory buffer containing the uncompressed image.
        """
        ...
    
    # This function answers to a REST request by redirecting the user to another URI using HTTP status 301
    def Redirect(self, redirection: str) -> None:
        """
        This function answers to a REST request by redirecting the user to another URI using HTTP status 301.

        Args:
          redirection (str): Where to redirect.
        """
        ...
    
    # This function answers to a REST request by sending a HTTP status code (such as "400 - Bad Request")
    def SendHttpStatusCode(self, status: int) -> None:
        """
        This function answers to a REST request by sending a HTTP status code (such as "400 - Bad Request"). Note that: - Successful requests (status 200) must use ::OrthancPluginAnswerBuffer(). - Redirections (status 301) must use ::OrthancPluginRedirect(). - Unauthorized access (status 401) must use ::OrthancPluginSendUnauthorized(). - Methods not allowed (status 405) must use ::OrthancPluginSendMethodNotAllowed().

        Args:
          status (int): The HTTP status code to be sent.
        """
        ...
    
    # This function answers to a REST request by signaling that it is not authorized
    def SendUnauthorized(self, realm: str) -> None:
        """
        This function answers to a REST request by signaling that it is not authorized.

        Args:
          realm (str): The realm for the authorization process.
        """
        ...
    
    # This function answers to a REST request by signaling that the queried URI does not support this method
    def SendMethodNotAllowed(self, allowed_methods: str) -> None:
        """
        This function answers to a REST request by signaling that the queried URI does not support this method.

        Args:
          allowed_methods (str): The allowed methods for this URI (e.g. "GET,POST" after a PUT or a POST request).
        """
        ...
    
    # This function sets a cookie in the HTTP client
    def SetCookie(self, cookie: str, value: str) -> None:
        """
        This function sets a cookie in the HTTP client.

        Args:
          cookie (str): The cookie to be set.
          value (str): The value of the cookie.
        """
        ...
    
    # This function sets a HTTP header in the HTTP answer
    def SetHttpHeader(self, key: str, value: str) -> None:
        """
        This function sets a HTTP header in the HTTP answer.

        Args:
          key (str): The HTTP header to be set.
          value (str): The value of the HTTP header.
        """
        ...
    
    # Initiates a HTTP multipart answer, as the result of a REST request
    def StartMultipartAnswer(self, sub_type: str, content_type: str) -> None:
        """
        Initiates a HTTP multipart answer, as the result of a REST request.

        Args:
          sub_type (str): The sub-type of the multipart answer ("mixed" or "related").
          content_type (str): The MIME type of the items in the multipart answer.
        """
        ...
    
    # This function sends an item as a part of some HTTP multipart answer that was initiated by OrthancPluginStartMultipartAnswer()
    def SendMultipartItem(self, answer: bytes) -> None:
        """
        This function sends an item as a part of some HTTP multipart answer that was initiated by OrthancPluginStartMultipartAnswer().

        Args:
          answer (bytes): Pointer to the memory buffer containing the item.
        """
        ...
    
    # This function answers to a HTTP request by sending a HTTP status code (such as "400 - Bad Request"), together with a body describing the error
    def SendHttpStatus(self, status: int, body: bytes) -> None:
        """
        This function answers to a HTTP request by sending a HTTP status code (such as "400 - Bad Request"), together with a body describing the error. The body will only be returned if the configuration option "HttpDescribeErrors" of Orthanc is set to "true".
        Note that: - Successful requests (status 200) must use ::OrthancPluginAnswerBuffer(). - Redirections (status 301) must use ::OrthancPluginRedirect(). - Unauthorized access (status 401) must use ::OrthancPluginSendUnauthorized(). - Methods not allowed (status 405) must use ::OrthancPluginSendMethodNotAllowed().

        Args:
          status (int): The HTTP status code to be sent.
          body (bytes): The body of the answer.
        """
        ...
    
    # This function answers to a REST request with a JPEG image
    def CompressAndAnswerJpegImage(self, format: PixelFormat, width: int, height: int, pitch: int, buffer: bytes, quality: int) -> None:
        """
        This function answers to a REST request with a JPEG image. The parameters of this function describe a memory buffer that contains an uncompressed image. The image will be automatically compressed as a JPEG image by the core system of Orthanc.

        Args:
          format (PixelFormat): The memory layout of the uncompressed image.
          width (int): The width of the image.
          height (int): The height of the image.
          pitch (int): The pitch of the image (i.e. the number of bytes between 2 successive lines of the image in the memory buffer).
          buffer (bytes): The memory buffer containing the uncompressed image.
          quality (int): The quality of the JPEG encoding, between 1 (worst quality, best compression) and 100 (best quality, worst compression).
        """
        ...
    
    # This function sets the detailed description associated with an HTTP error
    def SetHttpErrorDetails(self, details: str, log: int) -> None:
        """
        This function sets the detailed description associated with an HTTP error. This description will be displayed in the "Details" field of the JSON body of the HTTP answer. It is only taken into consideration if the REST callback returns an error code that is different from "OrthancPluginErrorCode_Success", and if the "HttpDescribeErrors" configuration option of Orthanc is set to "true".

        Args:
          details (str): The details of the error message.
          log (int): Whether to also write the detailed error to the Orthanc logs.
        """
        ...
    
    # Initiates an HTTP stream answer, as the result of a REST request
    def StartStreamAnswer(self, content_type: str) -> None:
        """
        Initiates an HTTP stream answer, as the result of a REST request.

        Args:
          content_type (str): The MIME type of the items in the stream answer.
        """
        ...
    
    # This function sends a chunk as part of an HTTP stream answer that was initiated by OrthancPluginStartStreamAnswer()
    def SendStreamChunk(self, answer: bytes) -> None:
        """
        This function sends a chunk as part of an HTTP stream answer that was initiated by OrthancPluginStartStreamAnswer().

        Args:
          answer (bytes): Pointer to the memory buffer containing the item.
        """
        ...

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
    def StorageAreaCreate(self, uuid: str, content: bytes, size: int, type: ContentType) -> None:
        """
        This function creates a new file inside the storage area that is currently used by Orthanc.

        Args:
          uuid (str): The identifier of the file to be created.
          content (bytes): The content to store in the newly created file.
          size (int): The size of the content.
          type (ContentType): The type of the file content.
        """
        ...
    
    # This function reads the content of a given file from the storage area that is currently used by Orthanc
    def StorageAreaRead(self, uuid: str, type: ContentType) -> bytes:
        """
        This function reads the content of a given file from the storage area that is currently used by Orthanc.

        Args:
          uuid (str): The identifier of the file to be read.
          type (ContentType): The type of the file content.

        Returns:
          bytes: 0 if success, other value if error.
        """
        ...
    
    # This function removes a given file from the storage area that is currently used by Orthanc
    def StorageAreaRemove(self, uuid: str, type: ContentType) -> None:
        """
        This function removes a given file from the storage area that is currently used by Orthanc.

        Args:
          uuid (str): The identifier of the file to be removed.
          type (ContentType): The type of the file content.
        """
        ...
    
    # This function requests the Orthanc core to reconstruct the main DICOM tags of all the resources of the given type
    def ReconstructMainDicomTags(self, level: ResourceType) -> None:
        """
        This function requests the Orthanc core to reconstruct the main DICOM tags of all the resources of the given type. This function can only be used as a part of the upgrade of a custom database back-end. A database transaction will be automatically setup.

        Args:
          level (ResourceType): The type of the resources of interest.
        """
        ...

class WebDavCollection:
    """
    WebDAV collection
    """
    ...


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
    def WorklistAddAnswer(self, query: WorklistQuery, dicom: bytes) -> None:
        """
        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.

        Args:
          query (WorklistQuery): The worklist query, as received by the callback.
          dicom (bytes): The worklist to answer, encoded as a DICOM file.
        """
        ...
    
    # This function marks as incomplete the set of answers corresponding to some C-Find SCP request against modality worklists
    def WorklistMarkIncomplete(self) -> None:
        """
        This function marks as incomplete the set of answers corresponding to some C-Find SCP request against modality worklists. This must be used if canceling the handling of a request when too many answers are to be returned.
        """
        ...

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
    def WorklistIsMatch(self, dicom: bytes) -> int:
        """
        This function checks whether one worklist (encoded as a DICOM file) matches the C-Find SCP query against modality worklists. This function must be called before adding the worklist as an answer through OrthancPluginWorklistAddAnswer().

        Args:
          dicom (bytes): The worklist to answer, encoded as a DICOM file.

        Returns:
          int: 1 if the worklist matches the query, 0 otherwise.
        """
        ...
    
    # This function retrieves the DICOM file that underlies a C-Find SCP query against modality worklists
    def WorklistGetDicomQuery(self) -> bytes:
        """
        This function retrieves the DICOM file that underlies a C-Find SCP query against modality worklists.

        Returns:
          bytes: 0 if success, other value if error.
        """
        ...