Skip to content

Orthanc SDK

The orthanc_sdk is useful when developing with the Orthanc's Python Plugin, it exposes orthanc module when available (i.e. used as an Orthanc script), or expose the functions/classes signatures when not for linting and autocomplete.

Use it the same way you would use the Python Plugin:

from pyorthanc import orthanc_sdk

def on_get(output: orthanc_sdk.RestOutput, *_, **__):
    output.AnswerBuffer('ok', 'text/plain')

orthanc_sdk.RegisterRestCallback('/test', on_get)

How it works

When developing importing the Orthanc Python Plugin with import orthanc will raise a ModuleNotFoundError. This where the orthanc_sdk submodule is interesting. When orthanc is available, it uses it. When not, orthanc_sdk expose mock functions/classes of everything available from orthanc, however, these functions/classes does nothing.

try:
    from orthanc import *

except ModuleNotFoundError:
    """Orthanc SDK methods wrapped in python (plugin version 4.0)"""
    ...

Reference

pyorthanc.orthanc_sdk

Orthanc SDK methods wrapped in python

VERSION = '4.1' module-attribute

ChangeType

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginChangeType

Source code in pyorthanc/_orthanc_sdk_enums.py
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
class ChangeType(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginChangeType"""
    COMPLETED_SERIES = 0
    DELETED = 1
    JOB_FAILURE = 18
    JOB_SUBMITTED = 16
    JOB_SUCCESS = 17
    NEW_CHILD_INSTANCE = 2
    NEW_INSTANCE = 3
    NEW_PATIENT = 4
    NEW_SERIES = 5
    NEW_STUDY = 6
    ORTHANC_STARTED = 10
    ORTHANC_STOPPED = 11
    STABLE_PATIENT = 7
    STABLE_SERIES = 8
    STABLE_STUDY = 9
    UPDATED_ATTACHMENT = 12
    UPDATED_METADATA = 13
    UPDATED_MODALITIES = 15
    UPDATED_PEERS = 14

CompressionType

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginCompressionType

Source code in pyorthanc/_orthanc_sdk_enums.py
27
28
29
30
31
32
class CompressionType(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginCompressionType"""
    GZIP = 2
    GZIP_WITH_SIZE = 3
    ZLIB = 0
    ZLIB_WITH_SIZE = 1

ConstraintType

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginConstraintType

Source code in pyorthanc/_orthanc_sdk_enums.py
35
36
37
38
39
40
41
class ConstraintType(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginConstraintType"""
    EQUAL = 1
    GREATER_OR_EQUAL = 3
    LIST = 5
    SMALLER_OR_EQUAL = 2
    WILDCARD = 4

ContentType

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginContentType

Source code in pyorthanc/_orthanc_sdk_enums.py
44
45
46
47
48
49
class ContentType(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginContentType"""
    DICOM = 1
    DICOM_AS_JSON = 2
    DICOM_UNTIL_PIXEL_DATA = 3
    UNKNOWN = 0

CreateDicomFlags

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginCreateDicomFlags

Source code in pyorthanc/_orthanc_sdk_enums.py
52
53
54
55
56
class CreateDicomFlags(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginCreateDicomFlags"""
    DECODE_DATA_URI_SCHEME = 1
    GENERATE_IDENTIFIERS = 2
    NONE = 0

DicomInstance

Generated from Orthanc C class: OrthancPluginDicomInstance

Source code in pyorthanc/orthanc_sdk.py
 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
class DicomInstance:
    """Generated from Orthanc C class: OrthancPluginDicomInstance"""

    def GetInstanceAdvancedJson(self, *args, **kwargs) -> str:
        """This function outputs a JSON string representing the tags of this DICOM file."""
        pass

    def GetInstanceData(self) -> Any:
        """This function returns the content of the given DICOM instance."""
        pass

    def GetInstanceDecodedFrame(self, frameIndex: int) -> Image:
        """This function decodes one frame of a DICOM image that is managed by the Orthanc core."""
        pass

    def GetInstanceFramesCount(self) -> int:
        """This function returns the number of frames that are part of a DICOM image managed by the Orthanc core."""
        pass

    def GetInstanceJson(self) -> str:
        """
        This function returns a string containing a JSON file.
        This JSON file encodes the tag hierarchy of the given DICOM instance.
        """
        pass

    def GetInstanceMetadata(self, metadata: str) -> Any:
        """
        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 HasInstanceMetadata().
        """
        pass

    def GetInstanceOrigin(self) -> InstanceOrigin:
        """This function returns the origin of a DICOM instance that has been received by Orthanc."""
        pass

    def GetInstanceRawFrame(self, *args) -> Any:
        """Generated from C function OrthancPluginGetInstanceRawFrame()"""
        pass

    def GetInstanceRemoteAet(self) -> str:
        """
        This function returns the Application Entity Title (AET) of the DICOM modality
        from which a DICOM instance originates.
        """
        pass

    def GetInstanceSimplifiedJson(self) -> str:
        """
        This function returns a string containing a JSON file.
        This JSON file encodes the tag hierarchy of the given DICOM instance.
        In contrast with GetInstanceJson(), the returned JSON file is in its simplified version.
        """
        pass

    def GetInstanceSize(self) -> int:
        """This function returns the number of bytes of the given DICOM instance."""
        pass

    def GetInstanceTransferSyntaxUid(self) -> str:
        """
        This function returns a string that contains the transfer syntax UID of the DICOM instance.
        The empty string might be returned if this information is unknown.
        """
        pass

    def HasInstanceMetadata(self, metadata: str) -> bool:
        """
        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 OnStoredInstanceCallback(),
        the only possibly available metadata are "ReceptionDate", "RemoteAET" and "IndexInSeries".
        """
        pass

    def HasInstancePixelData(self) -> bool:
        """
        This function returns a Boolean value indicating whether the DICOM instance
        contains the pixel data (7FE0,0010) tag.
        """
        pass

    def SerializeDicomInstance(self, *args) -> Any:
        """Generated from C function OrthancPluginSerializeDicomInstance()"""
        pass

GetInstanceAdvancedJson(*args, **kwargs)

This function outputs a JSON string representing the tags of this DICOM file.

Source code in pyorthanc/orthanc_sdk.py
44
45
46
def GetInstanceAdvancedJson(self, *args, **kwargs) -> str:
    """This function outputs a JSON string representing the tags of this DICOM file."""
    pass

GetInstanceData()

This function returns the content of the given DICOM instance.

Source code in pyorthanc/orthanc_sdk.py
48
49
50
def GetInstanceData(self) -> Any:
    """This function returns the content of the given DICOM instance."""
    pass

GetInstanceDecodedFrame(frameIndex)

This function decodes one frame of a DICOM image that is managed by the Orthanc core.

Source code in pyorthanc/orthanc_sdk.py
52
53
54
def GetInstanceDecodedFrame(self, frameIndex: int) -> Image:
    """This function decodes one frame of a DICOM image that is managed by the Orthanc core."""
    pass

GetInstanceFramesCount()

This function returns the number of frames that are part of a DICOM image managed by the Orthanc core.

Source code in pyorthanc/orthanc_sdk.py
56
57
58
def GetInstanceFramesCount(self) -> int:
    """This function returns the number of frames that are part of a DICOM image managed by the Orthanc core."""
    pass

GetInstanceJson()

This function returns a string containing a JSON file. This JSON file encodes the tag hierarchy of the given DICOM instance.

Source code in pyorthanc/orthanc_sdk.py
60
61
62
63
64
65
def GetInstanceJson(self) -> str:
    """
    This function returns a string containing a JSON file.
    This JSON file encodes the tag hierarchy of the given DICOM instance.
    """
    pass

GetInstanceMetadata(metadata)

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 HasInstanceMetadata().

Source code in pyorthanc/orthanc_sdk.py
67
68
69
70
71
72
def GetInstanceMetadata(self, metadata: str) -> Any:
    """
    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 HasInstanceMetadata().
    """
    pass

GetInstanceOrigin()

This function returns the origin of a DICOM instance that has been received by Orthanc.

Source code in pyorthanc/orthanc_sdk.py
74
75
76
def GetInstanceOrigin(self) -> InstanceOrigin:
    """This function returns the origin of a DICOM instance that has been received by Orthanc."""
    pass

GetInstanceRawFrame(*args)

Generated from C function OrthancPluginGetInstanceRawFrame()

Source code in pyorthanc/orthanc_sdk.py
78
79
80
def GetInstanceRawFrame(self, *args) -> Any:
    """Generated from C function OrthancPluginGetInstanceRawFrame()"""
    pass

GetInstanceRemoteAet()

This function returns the Application Entity Title (AET) of the DICOM modality from which a DICOM instance originates.

Source code in pyorthanc/orthanc_sdk.py
82
83
84
85
86
87
def GetInstanceRemoteAet(self) -> str:
    """
    This function returns the Application Entity Title (AET) of the DICOM modality
    from which a DICOM instance originates.
    """
    pass

GetInstanceSimplifiedJson()

This function returns a string containing a JSON file. This JSON file encodes the tag hierarchy of the given DICOM instance. In contrast with GetInstanceJson(), the returned JSON file is in its simplified version.

Source code in pyorthanc/orthanc_sdk.py
89
90
91
92
93
94
95
def GetInstanceSimplifiedJson(self) -> str:
    """
    This function returns a string containing a JSON file.
    This JSON file encodes the tag hierarchy of the given DICOM instance.
    In contrast with GetInstanceJson(), the returned JSON file is in its simplified version.
    """
    pass

GetInstanceSize()

This function returns the number of bytes of the given DICOM instance.

Source code in pyorthanc/orthanc_sdk.py
97
98
99
def GetInstanceSize(self) -> int:
    """This function returns the number of bytes of the given DICOM instance."""
    pass

GetInstanceTransferSyntaxUid()

This function returns a string that contains the transfer syntax UID of the DICOM instance. The empty string might be returned if this information is unknown.

Source code in pyorthanc/orthanc_sdk.py
101
102
103
104
105
106
def GetInstanceTransferSyntaxUid(self) -> str:
    """
    This function returns a string that contains the transfer syntax UID of the DICOM instance.
    The empty string might be returned if this information is unknown.
    """
    pass

HasInstanceMetadata(metadata)

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 OnStoredInstanceCallback(), the only possibly available metadata are "ReceptionDate", "RemoteAET" and "IndexInSeries".

Source code in pyorthanc/orthanc_sdk.py
108
109
110
111
112
113
114
def HasInstanceMetadata(self, metadata: str) -> bool:
    """
    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 OnStoredInstanceCallback(),
    the only possibly available metadata are "ReceptionDate", "RemoteAET" and "IndexInSeries".
    """
    pass

HasInstancePixelData()

This function returns a Boolean value indicating whether the DICOM instance contains the pixel data (7FE0,0010) tag.

Source code in pyorthanc/orthanc_sdk.py
116
117
118
119
120
121
def HasInstancePixelData(self) -> bool:
    """
    This function returns a Boolean value indicating whether the DICOM instance
    contains the pixel data (7FE0,0010) tag.
    """
    pass

SerializeDicomInstance(*args)

Generated from C function OrthancPluginSerializeDicomInstance()

Source code in pyorthanc/orthanc_sdk.py
123
124
125
def SerializeDicomInstance(self, *args) -> Any:
    """Generated from C function OrthancPluginSerializeDicomInstance()"""
    pass

DicomToJsonFlags

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginDicomToJsonFlags

Source code in pyorthanc/_orthanc_sdk_enums.py
59
60
61
62
63
64
65
66
67
68
69
class DicomToJsonFlags(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginDicomToJsonFlags"""
    CONVERT_BINARY_TO_ASCII = 16
    CONVERT_BINARY_TO_NULL = 32
    INCLUDE_BINARY = 1
    INCLUDE_PIXEL_DATA = 8
    INCLUDE_PRIVATE_TAGS = 2
    INCLUDE_UNKNOWN_TAGS = 4
    NONE = 0
    SKIP_GROUP_LENGTHS = 128
    STOP_AFTER_PIXEL_DATA = 64

DicomToJsonFormat

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginDicomToJsonFormat

Source code in pyorthanc/_orthanc_sdk_enums.py
72
73
74
75
76
class DicomToJsonFormat(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginDicomToJsonFormat"""
    FULL = 1
    HUMAN = 3
    SHORT = 2

DicomWebBinaryMode

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginDicomWebBinaryMode

Source code in pyorthanc/_orthanc_sdk_enums.py
79
80
81
82
83
class DicomWebBinaryMode(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginDicomWebBinaryMode"""
    BULK_DATA_URI = 2
    IGNORE = 0
    INLINE_BINARY = 1

DicomWebNode

Generated from Orthanc C class: OrthancPluginDicomWebNode

Source code in pyorthanc/_orthanc_sdk_enums.py
86
87
class DicomWebNode:
    """Generated from Orthanc C class: OrthancPluginDicomWebNode"""

ErrorCode

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginErrorCode

Source code in pyorthanc/_orthanc_sdk_enums.py
 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
class ErrorCode(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginErrorCode"""
    ALREADY_EXISTING_TAG = 2042
    BAD_APPLICATION_ENTITY_TITLE = 2009
    BAD_FILE_FORMAT = 15
    BAD_FONT = 30
    BAD_GEOMETRY = 38
    BAD_HTTP_STATUS_IN_REST = 2005
    BAD_JOB_ORDERING = 2028
    BAD_JSON = 28
    BAD_PARAMETER_TYPE = 5
    BAD_RANGE = 41
    BAD_REQUEST = 8
    BAD_SEQUENCE_OF_CALLS = 6
    CANCELED_JOB = 37
    CANNOT_CREATE_LUA = 2030
    CANNOT_EXECUTE_LUA = 2031
    CANNOT_ORDER_SLICES = 2040
    CANNOT_STORE_INSTANCE = 2018
    CANNOT_WRITE_FILE = 14
    CORRUPTED_FILE = 20
    CREATE_DICOM_BAD_PARENT = 2024
    CREATE_DICOM_NOT_STRING = 2019
    CREATE_DICOM_NO_PAYLOAD = 2022
    CREATE_DICOM_OVERRIDE_TAG = 2020
    CREATE_DICOM_PARENT_ENCODING = 2026
    CREATE_DICOM_PARENT_IS_INSTANCE = 2025
    CREATE_DICOM_USE_CONTENT = 2021
    CREATE_DICOM_USE_DATA_URI_SCHEME = 2023
    DATABASE = 11
    DATABASE_BACKEND_ALREADY_REGISTERED = 2037
    DATABASE_CANNOT_SERIALIZE = 42
    DATABASE_NOT_INITIALIZED = 2038
    DATABASE_PLUGIN = 31
    DATABASE_UNAVAILABLE = 36
    DICOM_FIND_UNAVAILABLE = 2016
    DICOM_MOVE_UNAVAILABLE = 2017
    DICOM_PORT_IN_USE = 2004
    DIRECTORY_EXPECTED = 2002
    DIRECTORY_OVER_FILE = 2000
    DISCONTINUED_ABI = 40
    EMPTY_REQUEST = 33
    FILE_STORAGE_CANNOT_WRITE = 2001
    FULL_STORAGE = 19
    HTTP_PORT_IN_USE = 2003
    INCOMPATIBLE_DATABASE_VERSION = 18
    INCOMPATIBLE_IMAGE_FORMAT = 23
    INCOMPATIBLE_IMAGE_SIZE = 24
    INEXISTENT_FILE = 13
    INEXISTENT_ITEM = 7
    INEXISTENT_TAG = 21
    INTERNAL_ERROR = -1
    JSON_TO_LUA_TABLE = 2029
    LUA_ALREADY_EXECUTED = 2032
    LUA_BAD_OUTPUT = 2033
    LUA_RETURNS_NO_STRING = 2035
    MAKE_DIRECTORY = 2008
    NETWORK_PROTOCOL = 9
    NOT_ACCEPTABLE = 34
    NOT_ENOUGH_MEMORY = 4
    NOT_IMPLEMENTED = 2
    NOT_LUA_PREDICATE = 2034
    NO_APPLICATION_ENTITY_FILTER = 2013
    NO_CFIND_HANDLER = 2010
    NO_CGET_HANDLER = 2044
    NO_CMOVE_HANDLER = 2011
    NO_CSTORE_HANDLER = 2012
    NO_PRESENTATION_CONTEXT = 2015
    NO_SOP_CLASS_OR_INSTANCE = 2014
    NO_STORAGE_COMMITMENT_HANDLER = 2043
    NO_WORKLIST_HANDLER = 2041
    NULL_POINTER = 35
    PARAMETER_OUT_OF_RANGE = 3
    PATH_TO_EXECUTABLE = 2007
    PLUGIN = 1
    READ_ONLY = 22
    REGULAR_FILE_EXPECTED = 2006
    REVISION = 43
    SHARED_LIBRARY = 25
    SQLITE_ALREADY_OPENED = 1001
    SQLITE_BIND_OUT_OF_RANGE = 1011
    SQLITE_CANNOT_OPEN = 1002
    SQLITE_CANNOT_RUN = 1009
    SQLITE_CANNOT_STEP = 1010
    SQLITE_COMMIT_WITHOUT_TRANSACTION = 1006
    SQLITE_EXECUTE = 1004
    SQLITE_FLUSH = 1008
    SQLITE_NOT_OPENED = 1000
    SQLITE_PREPARE_STATEMENT = 1012
    SQLITE_REGISTER_FUNCTION = 1007
    SQLITE_ROLLBACK_WITHOUT_TRANSACTION = 1005
    SQLITE_STATEMENT_ALREADY_USED = 1003
    SQLITE_TRANSACTION_ALREADY_STARTED = 1013
    SQLITE_TRANSACTION_BEGIN = 1015
    SQLITE_TRANSACTION_COMMIT = 1014
    SSL_DISABLED = 2039
    SSL_INITIALIZATION = 39
    STORAGE_AREA_ALREADY_REGISTERED = 2036
    STORAGE_AREA_PLUGIN = 32
    SUCCESS = 0
    SYSTEM_COMMAND = 10
    TIMEOUT = 16
    UNAUTHORIZED = 29
    UNKNOWN_DICOM_TAG = 27
    UNKNOWN_MODALITY = 2027
    UNKNOWN_PLUGIN_SERVICE = 26
    UNKNOWN_RESOURCE = 17
    UNSUPPORTED_MEDIA_TYPE = 3000
    URI_SYNTAX = 12

FindAnswers

Generated from Orthanc C class: OrthancPluginFindAnswers

Source code in pyorthanc/orthanc_sdk.py
128
129
130
131
132
133
134
135
136
137
class FindAnswers:
    """Generated from Orthanc C class: OrthancPluginFindAnswers"""

    def FindAddAnswer(self, *args):
        """Generated from C function OrthancPluginFindAddAnswer()"""
        pass

    def FindMarkIncomplete(self, *args):
        """Generated from C function OrthancPluginFindMarkIncomplete()"""
        pass

FindAddAnswer(*args)

Generated from C function OrthancPluginFindAddAnswer()

Source code in pyorthanc/orthanc_sdk.py
131
132
133
def FindAddAnswer(self, *args):
    """Generated from C function OrthancPluginFindAddAnswer()"""
    pass

FindMarkIncomplete(*args)

Generated from C function OrthancPluginFindMarkIncomplete()

Source code in pyorthanc/orthanc_sdk.py
135
136
137
def FindMarkIncomplete(self, *args):
    """Generated from C function OrthancPluginFindMarkIncomplete()"""
    pass

FindMatcher

Generated from Orthanc C class: OrthancPluginFindMatcher

Source code in pyorthanc/orthanc_sdk.py
140
141
142
143
144
145
class FindMatcher:
    """Generated from Orthanc C class: OrthancPluginFindMatcher"""

    def FindMatcherIsMatch(self, *args):
        """Generated from C function OrthancPluginFindMatcherIsMatch()"""
        pass

FindMatcherIsMatch(*args)

Generated from C function OrthancPluginFindMatcherIsMatch()

Source code in pyorthanc/orthanc_sdk.py
143
144
145
def FindMatcherIsMatch(self, *args):
    """Generated from C function OrthancPluginFindMatcherIsMatch()"""
    pass

FindQuery

Generated from Orthanc C class: OrthancPluginFindQuery

Source code in pyorthanc/orthanc_sdk.py
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
class FindQuery:
    """Generated from Orthanc C class: OrthancPluginFindQuery"""

    def GetFindQuerySize(self, *args):
        """Generated from C function OrthancPluginGetFindQuerySize()"""
        pass

    def GetFindQueryTagElement(self, *args):
        """Generated from C function OrthancPluginGetFindQueryTag()"""
        pass

    def GetFindQueryTagGroup(self, *args):
        """Generated from C function OrthancPluginGetFindQueryTag()"""
        pass

    def GetFindQueryTagName(self, *args):
        """Generated from C function OrthancPluginGetFindQueryTagName()"""
        pass

    def GetFindQueryValue(self, *args):
        """Generated from C function OrthancPluginGetFindQueryValue()"""
        pass

GetFindQuerySize(*args)

Generated from C function OrthancPluginGetFindQuerySize()

Source code in pyorthanc/orthanc_sdk.py
151
152
153
def GetFindQuerySize(self, *args):
    """Generated from C function OrthancPluginGetFindQuerySize()"""
    pass

GetFindQueryTagElement(*args)

Generated from C function OrthancPluginGetFindQueryTag()

Source code in pyorthanc/orthanc_sdk.py
155
156
157
def GetFindQueryTagElement(self, *args):
    """Generated from C function OrthancPluginGetFindQueryTag()"""
    pass

GetFindQueryTagGroup(*args)

Generated from C function OrthancPluginGetFindQueryTag()

Source code in pyorthanc/orthanc_sdk.py
159
160
161
def GetFindQueryTagGroup(self, *args):
    """Generated from C function OrthancPluginGetFindQueryTag()"""
    pass

GetFindQueryTagName(*args)

Generated from C function OrthancPluginGetFindQueryTagName()

Source code in pyorthanc/orthanc_sdk.py
163
164
165
def GetFindQueryTagName(self, *args):
    """Generated from C function OrthancPluginGetFindQueryTagName()"""
    pass

GetFindQueryValue(*args)

Generated from C function OrthancPluginGetFindQueryValue()

Source code in pyorthanc/orthanc_sdk.py
167
168
169
def GetFindQueryValue(self, *args):
    """Generated from C function OrthancPluginGetFindQueryValue()"""
    pass

HttpMethod

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginHttpMethod

Source code in pyorthanc/_orthanc_sdk_enums.py
201
202
203
204
205
206
class HttpMethod(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginHttpMethod"""
    DELETE = 4
    GET = 1
    POST = 2
    PUT = 3

IdentifierConstraint

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginIdentifierConstraint

Source code in pyorthanc/_orthanc_sdk_enums.py
209
210
211
212
213
214
class IdentifierConstraint(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginIdentifierConstraint"""
    EQUAL = 1
    GREATER_OR_EQUAL = 3
    SMALLER_OR_EQUAL = 2
    WILDCARD = 4

Image

Generated from Orthanc C class: OrthancPluginImage

Source code in pyorthanc/orthanc_sdk.py
 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
class Image:
    """Generated from Orthanc C class: OrthancPluginImage"""

    def ConvertPixelFormat(self, *args):
        """Generated from C function OrthancPluginConvertPixelFormat()"""
        pass

    def DrawText(self, *args):
        """Generated from C function OrthancPluginDrawText()"""
        pass

    def GetImageBuffer(self, *args):
        """Generated from C function OrthancPluginGetImageBuffer()"""
        pass

    def GetImageHeight(self, *args):
        """Generated from C function OrthancPluginGetImageHeight()"""
        pass

    def GetImagePitch(self, *args):
        """Generated from C function OrthancPluginGetImagePitch()"""
        pass

    def GetImagePixelFormat(self, *args):
        """Generated from C function OrthancPluginGetImagePixelFormat()"""
        pass

    def GetImageWidth(self, *args):
        """Generated from C function OrthancPluginGetImageWidth()"""
        pass

ConvertPixelFormat(*args)

Generated from C function OrthancPluginConvertPixelFormat()

Source code in pyorthanc/orthanc_sdk.py
12
13
14
def ConvertPixelFormat(self, *args):
    """Generated from C function OrthancPluginConvertPixelFormat()"""
    pass

DrawText(*args)

Generated from C function OrthancPluginDrawText()

Source code in pyorthanc/orthanc_sdk.py
16
17
18
def DrawText(self, *args):
    """Generated from C function OrthancPluginDrawText()"""
    pass

GetImageBuffer(*args)

Generated from C function OrthancPluginGetImageBuffer()

Source code in pyorthanc/orthanc_sdk.py
20
21
22
def GetImageBuffer(self, *args):
    """Generated from C function OrthancPluginGetImageBuffer()"""
    pass

GetImageHeight(*args)

Generated from C function OrthancPluginGetImageHeight()

Source code in pyorthanc/orthanc_sdk.py
24
25
26
def GetImageHeight(self, *args):
    """Generated from C function OrthancPluginGetImageHeight()"""
    pass

GetImagePitch(*args)

Generated from C function OrthancPluginGetImagePitch()

Source code in pyorthanc/orthanc_sdk.py
28
29
30
def GetImagePitch(self, *args):
    """Generated from C function OrthancPluginGetImagePitch()"""
    pass

GetImagePixelFormat(*args)

Generated from C function OrthancPluginGetImagePixelFormat()

Source code in pyorthanc/orthanc_sdk.py
32
33
34
def GetImagePixelFormat(self, *args):
    """Generated from C function OrthancPluginGetImagePixelFormat()"""
    pass

GetImageWidth(*args)

Generated from C function OrthancPluginGetImageWidth()

Source code in pyorthanc/orthanc_sdk.py
36
37
38
def GetImageWidth(self, *args):
    """Generated from C function OrthancPluginGetImageWidth()"""
    pass

ImageFormat

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginImageFormat

Source code in pyorthanc/_orthanc_sdk_enums.py
217
218
219
220
221
class ImageFormat(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginImageFormat"""
    DICOM = 2
    JPEG = 1
    PNG = 0

InstanceOrigin

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginInstanceOrigin

Source code in pyorthanc/_orthanc_sdk_enums.py
224
225
226
227
228
229
230
231
class InstanceOrigin(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginInstanceOrigin"""
    DICOM_PROTOCOL = 2
    LUA = 5
    PLUGIN = 4
    REST_API = 3
    UNKNOWN = 1
    WEB_DAV = 6

Job

Generated from Orthanc C class: OrthancPluginJob

Source code in pyorthanc/orthanc_sdk.py
172
173
174
175
176
177
class Job:
    """Generated from Orthanc C class: OrthancPluginJob"""

    def SubmitJob(self, *args):
        """Generated from C function OrthancPluginSubmitJob()"""
        pass

SubmitJob(*args)

Generated from C function OrthancPluginSubmitJob()

Source code in pyorthanc/orthanc_sdk.py
175
176
177
def SubmitJob(self, *args):
    """Generated from C function OrthancPluginSubmitJob()"""
    pass

JobStepStatus

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginJobStepStatus

Source code in pyorthanc/_orthanc_sdk_enums.py
234
235
236
237
238
class JobStepStatus(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginJobStepStatus"""
    CONTINUE = 3
    FAILURE = 2
    SUCCESS = 1

JobStopReason

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginJobStopReason

Source code in pyorthanc/_orthanc_sdk_enums.py
241
242
243
244
245
246
class JobStopReason(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginJobStopReason"""
    CANCELED = 4
    FAILURE = 3
    PAUSED = 2
    SUCCESS = 1

MetricsType

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginMetricsType

Source code in pyorthanc/_orthanc_sdk_enums.py
249
250
251
252
class MetricsType(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginMetricsType"""
    DEFAULT = 0
    TIMER = 1

OrthancException

Common base class for all non-exit exceptions.

Source code in pyorthanc/orthanc_sdk.py
180
181
182
183
184
185
class OrthancException:
    """Common base class for all non-exit exceptions."""

    def with_traceback(self, *args):
        """Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self."""
        pass

with_traceback(*args)

Exception.with_traceback(tb) -- set self.traceback to tb and return self.

Source code in pyorthanc/orthanc_sdk.py
183
184
185
def with_traceback(self, *args):
    """Exception.with_traceback(tb) -- set self.__traceback__ to tb and return self."""
    pass

Peers

Generated from Orthanc C class: OrthancPluginPeers

Source code in pyorthanc/orthanc_sdk.py
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
class Peers:
    """Generated from Orthanc C class: OrthancPluginPeers"""

    def GetPeerName(self, *args):
        """Generated from C function OrthancPluginGetPeerName()"""
        pass

    def GetPeerUrl(self, *args):
        """Generated from C function OrthancPluginGetPeerUrl()"""
        pass

    def GetPeerUserProperty(self, *args):
        """Generated from C function OrthancPluginGetPeerUserProperty()"""
        pass

    def GetPeersCount(self, *args):
        """Generated from C function OrthancPluginGetPeersCount()"""
        pass

GetPeerName(*args)

Generated from C function OrthancPluginGetPeerName()

Source code in pyorthanc/orthanc_sdk.py
191
192
193
def GetPeerName(self, *args):
    """Generated from C function OrthancPluginGetPeerName()"""
    pass

GetPeerUrl(*args)

Generated from C function OrthancPluginGetPeerUrl()

Source code in pyorthanc/orthanc_sdk.py
195
196
197
def GetPeerUrl(self, *args):
    """Generated from C function OrthancPluginGetPeerUrl()"""
    pass

GetPeerUserProperty(*args)

Generated from C function OrthancPluginGetPeerUserProperty()

Source code in pyorthanc/orthanc_sdk.py
199
200
201
def GetPeerUserProperty(self, *args):
    """Generated from C function OrthancPluginGetPeerUserProperty()"""
    pass

GetPeersCount(*args)

Generated from C function OrthancPluginGetPeersCount()

Source code in pyorthanc/orthanc_sdk.py
203
204
205
def GetPeersCount(self, *args):
    """Generated from C function OrthancPluginGetPeersCount()"""
    pass

PixelFormat

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginPixelFormat

Source code in pyorthanc/_orthanc_sdk_enums.py
255
256
257
258
259
260
261
262
263
264
265
266
267
class PixelFormat(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginPixelFormat"""
    BGRA32 = 10
    FLOAT32 = 9
    GRAYSCALE16 = 2
    GRAYSCALE32 = 8
    GRAYSCALE64 = 11
    GRAYSCALE8 = 1
    RGB24 = 4
    RGB48 = 7
    RGBA32 = 5
    SIGNED_GRAYSCALE16 = 3
    UNKNOWN = 6

ReceivedInstanceAction

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginReceivedInstanceAction

Source code in pyorthanc/_orthanc_sdk_enums.py
270
271
272
273
274
class ReceivedInstanceAction(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginReceivedInstanceAction"""
    DISCARD = 3
    KEEP_AS_IS = 1
    MODIFY = 2

ResourceType

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginResourceType

Source code in pyorthanc/_orthanc_sdk_enums.py
277
278
279
280
281
282
283
class ResourceType(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginResourceType"""
    INSTANCE = 3
    NONE = 4
    PATIENT = 0
    SERIES = 2
    STUDY = 1

RestOutput

Generated from Orthanc C class: OrthancPluginRestOutput

Source code in pyorthanc/orthanc_sdk.py
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
class RestOutput:
    """Generated from Orthanc C class: OrthancPluginRestOutput"""

    def AnswerBuffer(self, *args):
        """Generated from C function OrthancPluginAnswerBuffer()"""
        pass

    def CompressAndAnswerJpegImage(self, *args):
        """Generated from C function OrthancPluginCompressAndAnswerJpegImage()"""
        pass

    def CompressAndAnswerPngImage(self, *args):
        """Generated from C function OrthancPluginCompressAndAnswerPngImage()"""
        pass

    def Redirect(self, *args):
        """Generated from C function OrthancPluginRedirect()"""
        pass

    def SendHttpStatus(self, *args):
        """Generated from C function OrthancPluginSendHttpStatus()"""
        pass

    def SendHttpStatusCode(self, *args):
        """Generated from C function OrthancPluginSendHttpStatusCode()"""
        pass

    def SendMethodNotAllowed(self, *args):
        """Generated from C function OrthancPluginSendMethodNotAllowed()"""
        pass

    def SendMultipartItem(self, *args):
        """Generated from C function OrthancPluginSendMultipartItem()"""
        pass

    def SendUnauthorized(self, *args):
        """Generated from C function OrthancPluginSendUnauthorized()"""
        pass

    def SetCookie(self, *args):
        """Generated from C function OrthancPluginSetCookie()"""
        pass

    def SetHttpErrorDetails(self, *args):
        """Generated from C function OrthancPluginSetHttpErrorDetails()"""
        pass

    def SetHttpHeader(self, *args):
        """Generated from C function OrthancPluginSetHttpHeader()"""
        pass

    def StartMultipartAnswer(self, *args):
        """Generated from C function OrthancPluginStartMultipartAnswer()"""
        pass

AnswerBuffer(*args)

Generated from C function OrthancPluginAnswerBuffer()

Source code in pyorthanc/orthanc_sdk.py
211
212
213
def AnswerBuffer(self, *args):
    """Generated from C function OrthancPluginAnswerBuffer()"""
    pass

CompressAndAnswerJpegImage(*args)

Generated from C function OrthancPluginCompressAndAnswerJpegImage()

Source code in pyorthanc/orthanc_sdk.py
215
216
217
def CompressAndAnswerJpegImage(self, *args):
    """Generated from C function OrthancPluginCompressAndAnswerJpegImage()"""
    pass

CompressAndAnswerPngImage(*args)

Generated from C function OrthancPluginCompressAndAnswerPngImage()

Source code in pyorthanc/orthanc_sdk.py
219
220
221
def CompressAndAnswerPngImage(self, *args):
    """Generated from C function OrthancPluginCompressAndAnswerPngImage()"""
    pass

Redirect(*args)

Generated from C function OrthancPluginRedirect()

Source code in pyorthanc/orthanc_sdk.py
223
224
225
def Redirect(self, *args):
    """Generated from C function OrthancPluginRedirect()"""
    pass

SendHttpStatus(*args)

Generated from C function OrthancPluginSendHttpStatus()

Source code in pyorthanc/orthanc_sdk.py
227
228
229
def SendHttpStatus(self, *args):
    """Generated from C function OrthancPluginSendHttpStatus()"""
    pass

SendHttpStatusCode(*args)

Generated from C function OrthancPluginSendHttpStatusCode()

Source code in pyorthanc/orthanc_sdk.py
231
232
233
def SendHttpStatusCode(self, *args):
    """Generated from C function OrthancPluginSendHttpStatusCode()"""
    pass

SendMethodNotAllowed(*args)

Generated from C function OrthancPluginSendMethodNotAllowed()

Source code in pyorthanc/orthanc_sdk.py
235
236
237
def SendMethodNotAllowed(self, *args):
    """Generated from C function OrthancPluginSendMethodNotAllowed()"""
    pass

SendMultipartItem(*args)

Generated from C function OrthancPluginSendMultipartItem()

Source code in pyorthanc/orthanc_sdk.py
239
240
241
def SendMultipartItem(self, *args):
    """Generated from C function OrthancPluginSendMultipartItem()"""
    pass

SendUnauthorized(*args)

Generated from C function OrthancPluginSendUnauthorized()

Source code in pyorthanc/orthanc_sdk.py
243
244
245
def SendUnauthorized(self, *args):
    """Generated from C function OrthancPluginSendUnauthorized()"""
    pass

SetCookie(*args)

Generated from C function OrthancPluginSetCookie()

Source code in pyorthanc/orthanc_sdk.py
247
248
249
def SetCookie(self, *args):
    """Generated from C function OrthancPluginSetCookie()"""
    pass

SetHttpErrorDetails(*args)

Generated from C function OrthancPluginSetHttpErrorDetails()

Source code in pyorthanc/orthanc_sdk.py
251
252
253
def SetHttpErrorDetails(self, *args):
    """Generated from C function OrthancPluginSetHttpErrorDetails()"""
    pass

SetHttpHeader(*args)

Generated from C function OrthancPluginSetHttpHeader()

Source code in pyorthanc/orthanc_sdk.py
255
256
257
def SetHttpHeader(self, *args):
    """Generated from C function OrthancPluginSetHttpHeader()"""
    pass

StartMultipartAnswer(*args)

Generated from C function OrthancPluginStartMultipartAnswer()

Source code in pyorthanc/orthanc_sdk.py
259
260
261
def StartMultipartAnswer(self, *args):
    """Generated from C function OrthancPluginStartMultipartAnswer()"""
    pass

ServerChunkedRequestReader

Generated from Orthanc C class: OrthancPluginServerChunkedRequestReader

Source code in pyorthanc/orthanc_sdk.py
264
265
class ServerChunkedRequestReader:
    """Generated from Orthanc C class: OrthancPluginServerChunkedRequestReader"""

StorageArea

Generated from Orthanc C class: OrthancPluginStorageArea

Source code in pyorthanc/orthanc_sdk.py
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
class StorageArea:
    """Generated from Orthanc C class: OrthancPluginStorageArea"""

    def ReconstructMainDicomTags(self, *args):
        """Generated from C function OrthancPluginReconstructMainDicomTags()"""
        pass

    def StorageAreaCreate(self, *args):
        """Generated from C function OrthancPluginStorageAreaCreate()"""
        pass

    def StorageAreaRead(self, *args):
        """Generated from C function OrthancPluginStorageAreaRead()"""
        pass

    def StorageAreaRemove(self, *args):
        """Generated from C function OrthancPluginStorageAreaRemove()"""
        pass

ReconstructMainDicomTags(*args)

Generated from C function OrthancPluginReconstructMainDicomTags()

Source code in pyorthanc/orthanc_sdk.py
271
272
273
def ReconstructMainDicomTags(self, *args):
    """Generated from C function OrthancPluginReconstructMainDicomTags()"""
    pass

StorageAreaCreate(*args)

Generated from C function OrthancPluginStorageAreaCreate()

Source code in pyorthanc/orthanc_sdk.py
275
276
277
def StorageAreaCreate(self, *args):
    """Generated from C function OrthancPluginStorageAreaCreate()"""
    pass

StorageAreaRead(*args)

Generated from C function OrthancPluginStorageAreaRead()

Source code in pyorthanc/orthanc_sdk.py
279
280
281
def StorageAreaRead(self, *args):
    """Generated from C function OrthancPluginStorageAreaRead()"""
    pass

StorageAreaRemove(*args)

Generated from C function OrthancPluginStorageAreaRemove()

Source code in pyorthanc/orthanc_sdk.py
283
284
285
def StorageAreaRemove(self, *args):
    """Generated from C function OrthancPluginStorageAreaRemove()"""
    pass

StorageCommitmentFailureReason

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginStorageCommitmentFailureReason

Source code in pyorthanc/_orthanc_sdk_enums.py
286
287
288
289
290
291
292
293
294
class StorageCommitmentFailureReason(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginStorageCommitmentFailureReason"""
    CLASS_INSTANCE_CONFLICT = 5
    DUPLICATE_TRANSACTION_UID = 6
    NO_SUCH_OBJECT_INSTANCE = 2
    PROCESSING_FAILURE = 1
    REFERENCED_SOPCLASS_NOT_SUPPORTED = 4
    RESOURCE_LIMITATION = 3
    SUCCESS = 0

ValueRepresentation

Bases: Enum

Generated from C enumeration OrthancPluginOrthancPluginValueRepresentation

Source code in pyorthanc/_orthanc_sdk_enums.py
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
class ValueRepresentation(Enum):
    """Generated from C enumeration OrthancPluginOrthancPluginValueRepresentation"""
    AE = 1
    AS = 2
    AT = 3
    CS = 4
    DA = 5
    DS = 6
    DT = 7
    FD = 8
    FL = 9
    IS = 10
    LO = 11
    LT = 12
    OB = 13
    OF = 14
    OW = 15
    PN = 16
    SH = 17
    SL = 18
    SQ = 19
    SS = 20
    ST = 21
    TM = 22
    UI = 23
    UL = 24
    UN = 25
    US = 26
    UT = 27

WorklistAnswers

Generated from Orthanc C class: OrthancPluginWorklistAnswers

Source code in pyorthanc/orthanc_sdk.py
288
289
290
291
292
293
294
295
296
297
class WorklistAnswers:
    """Generated from Orthanc C class: OrthancPluginWorklistAnswers"""

    def WorklistAddAnswer(self, *args):
        """Generated from C function OrthancPluginWorklistAddAnswer()"""
        pass

    def WorklistMarkIncomplete(self, *args):
        """Generated from C function OrthancPluginWorklistMarkIncomplete()"""
        pass

WorklistAddAnswer(*args)

Generated from C function OrthancPluginWorklistAddAnswer()

Source code in pyorthanc/orthanc_sdk.py
291
292
293
def WorklistAddAnswer(self, *args):
    """Generated from C function OrthancPluginWorklistAddAnswer()"""
    pass

WorklistMarkIncomplete(*args)

Generated from C function OrthancPluginWorklistMarkIncomplete()

Source code in pyorthanc/orthanc_sdk.py
295
296
297
def WorklistMarkIncomplete(self, *args):
    """Generated from C function OrthancPluginWorklistMarkIncomplete()"""
    pass

WorklistQuery

Generated from Orthanc C class: OrthancPluginWorklistQuery

Source code in pyorthanc/orthanc_sdk.py
300
301
302
303
304
305
306
307
308
309
class WorklistQuery:
    """Generated from Orthanc C class: OrthancPluginWorklistQuery"""

    def WorklistGetDicomQuery(self, *args):
        """Generated from C function OrthancPluginWorklistGetDicomQuery()"""
        pass

    def WorklistIsMatch(self, *args):
        """Generated from C function OrthancPluginWorklistIsMatch()"""
        pass

WorklistGetDicomQuery(*args)

Generated from C function OrthancPluginWorklistGetDicomQuery()

Source code in pyorthanc/orthanc_sdk.py
303
304
305
def WorklistGetDicomQuery(self, *args):
    """Generated from C function OrthancPluginWorklistGetDicomQuery()"""
    pass

WorklistIsMatch(*args)

Generated from C function OrthancPluginWorklistIsMatch()

Source code in pyorthanc/orthanc_sdk.py
307
308
309
def WorklistIsMatch(self, *args):
    """Generated from C function OrthancPluginWorklistIsMatch()"""
    pass

__loader__

Meta path import for built-in modules.

Source code in pyorthanc/orthanc_sdk.py
878
879
class __loader__:
    """Meta path import for built-in modules."""

AutodetectMimeType(*args)

Generated from C function OrthancPluginAutodetectMimeType()

Source code in pyorthanc/orthanc_sdk.py
312
313
314
def AutodetectMimeType(*args):
    """Generated from C function OrthancPluginAutodetectMimeType()"""
    pass

BufferCompression(memory_buffer, source, size, compression, uncompress)

Compress or decompress a buffer.

This function compresses or decompresses a buffer, using the version of the zlib library that is used by the Orthanc core.

Parameters:

Name Type Description Default
memory_buffer Any

The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer()

required
source Any

The source buffer.

required
size int

The size in bytes of the source buffer.

required
compression CompressionType

The compression algorithm.

required
uncompress int

If set to "0", the buffer must be compressed.

required

Returns:

Type Description
0 if success, or the error code if failure.
Source code in pyorthanc/orthanc_sdk.py
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
def BufferCompression(memory_buffer: Any,
                      source: Any,
                      size: int,
                      compression: CompressionType,
                      uncompress: int) -> int:
    """Compress or decompress a buffer.

    This function compresses or decompresses a buffer, using the version of the zlib
    library that is used by the Orthanc core.

    Parameters
    ----------
    memory_buffer
        The target memory buffer. It must be freed with OrthancPluginFreeMemoryBuffer()
    source
        The source buffer.
    size
        The size in bytes of the source buffer.
    compression
        The compression algorithm.
    uncompress
        If set to "0", the buffer must be compressed.

    Returns
    -------
        0 if success, or the error code if failure.
    """
    pass

CheckVersion()

Check the compatibility of the plugin wrt. the version of its hosting Orthanc.

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:

Type Description
1 if and only if the versions are compatible. If the result is 0,

the initialization of the plugin should fail.

Source code in pyorthanc/orthanc_sdk.py
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
def CheckVersion() -> int:
    """Check the compatibility of the plugin wrt. the version of its hosting Orthanc.

    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
    -------
        1 if and only if the versions are compatible. If the result is 0,
        the initialization of the plugin should fail.

    """
    pass

CheckVersionAdvanced(*args)

Generated from C function OrthancPluginCheckVersionAdvanced()

Source code in pyorthanc/orthanc_sdk.py
366
367
368
def CheckVersionAdvanced(*args):
    """Generated from C function OrthancPluginCheckVersionAdvanced()"""
    pass

CompressJpegImage(*args)

Generated from C function OrthancPluginCompressJpegImage()

Source code in pyorthanc/orthanc_sdk.py
371
372
373
def CompressJpegImage(*args):
    """Generated from C function OrthancPluginCompressJpegImage()"""
    pass

CompressPngImage(*args)

Generated from C function OrthancPluginCompressPngImage()

Source code in pyorthanc/orthanc_sdk.py
376
377
378
def CompressPngImage(*args):
    """Generated from C function OrthancPluginCompressPngImage()"""
    pass

ComputeMd5(*args)

Generated from C function OrthancPluginComputeMd5()

Source code in pyorthanc/orthanc_sdk.py
381
382
383
def ComputeMd5(*args):
    """Generated from C function OrthancPluginComputeMd5()"""
    pass

ComputeSha1(*args)

Generated from C function OrthancPluginComputeSha1()

Source code in pyorthanc/orthanc_sdk.py
386
387
388
def ComputeSha1(*args):
    """Generated from C function OrthancPluginComputeSha1()"""
    pass

CreateDicom(*args)

None

Source code in pyorthanc/orthanc_sdk.py
391
392
393
def CreateDicom(*args):
    """None"""
    pass

CreateDicomInstance(*args)

Generated from C function OrthancPluginCreateDicomInstance()

Source code in pyorthanc/orthanc_sdk.py
396
397
398
def CreateDicomInstance(*args):
    """Generated from C function OrthancPluginCreateDicomInstance()"""
    pass

CreateFindMatcher(*args)

Generated from C function OrthancPluginCreateFindMatcher()

Source code in pyorthanc/orthanc_sdk.py
401
402
403
def CreateFindMatcher(*args):
    """Generated from C function OrthancPluginCreateFindMatcher()"""
    pass

CreateImage(*args)

Generated from C function OrthancPluginCreateImage()

Source code in pyorthanc/orthanc_sdk.py
406
407
408
def CreateImage(*args):
    """Generated from C function OrthancPluginCreateImage()"""
    pass

CreateImageFromBuffer(*args)

None

Source code in pyorthanc/orthanc_sdk.py
411
412
413
def CreateImageFromBuffer(*args):
    """None"""
    pass

CreateMemoryBuffer(*args)

Generated from C function OrthancPluginCreateMemoryBuffer()

Source code in pyorthanc/orthanc_sdk.py
416
417
418
def CreateMemoryBuffer(*args):
    """Generated from C function OrthancPluginCreateMemoryBuffer()"""
    pass

DecodeDicomImage(*args)

Generated from C function OrthancPluginDecodeDicomImage()

Source code in pyorthanc/orthanc_sdk.py
421
422
423
def DecodeDicomImage(*args):
    """Generated from C function OrthancPluginDecodeDicomImage()"""
    pass

DicomBufferToJson(*args)

Generated from C function OrthancPluginDicomBufferToJson()

Source code in pyorthanc/orthanc_sdk.py
426
427
428
def DicomBufferToJson(*args):
    """Generated from C function OrthancPluginDicomBufferToJson()"""
    pass

DicomInstanceToJson(*args)

Generated from C function OrthancPluginDicomInstanceToJson()

Source code in pyorthanc/orthanc_sdk.py
431
432
433
def DicomInstanceToJson(*args):
    """Generated from C function OrthancPluginDicomInstanceToJson()"""
    pass

ExtendOrthancExplorer(*args)

Generated from C function OrthancPluginExtendOrthancExplorer()

Source code in pyorthanc/orthanc_sdk.py
436
437
438
def ExtendOrthancExplorer(*args):
    """Generated from C function OrthancPluginExtendOrthancExplorer()"""
    pass

GenerateRestApiAuthorizationToken(*args)

Generated from C function OrthancPluginGenerateRestApiAuthorizationToken()

Source code in pyorthanc/orthanc_sdk.py
441
442
443
def GenerateRestApiAuthorizationToken(*args):
    """Generated from C function OrthancPluginGenerateRestApiAuthorizationToken()"""
    pass

GenerateUuid(*args)

Generated from C function OrthancPluginGenerateUuid()

Source code in pyorthanc/orthanc_sdk.py
446
447
448
def GenerateUuid(*args):
    """Generated from C function OrthancPluginGenerateUuid()"""
    pass

GetCommandLineArgument(*args)

Generated from C function OrthancPluginGetCommandLineArgument()

Source code in pyorthanc/orthanc_sdk.py
451
452
453
def GetCommandLineArgument(*args):
    """Generated from C function OrthancPluginGetCommandLineArgument()"""
    pass

GetCommandLineArgumentsCount(*args)

Generated from C function OrthancPluginGetCommandLineArgumentsCount()

Source code in pyorthanc/orthanc_sdk.py
456
457
458
def GetCommandLineArgumentsCount(*args):
    """Generated from C function OrthancPluginGetCommandLineArgumentsCount()"""
    pass

GetConfiguration(*args)

Generated from C function OrthancPluginGetConfiguration()

Source code in pyorthanc/orthanc_sdk.py
461
462
463
def GetConfiguration(*args):
    """Generated from C function OrthancPluginGetConfiguration()"""
    pass

GetConfigurationPath(*args)

Generated from C function OrthancPluginGetConfigurationPath()

Source code in pyorthanc/orthanc_sdk.py
466
467
468
def GetConfigurationPath(*args):
    """Generated from C function OrthancPluginGetConfigurationPath()"""
    pass

GetDicomForInstance(*args)

Generated from C function OrthancPluginGetDicomForInstance()

Source code in pyorthanc/orthanc_sdk.py
471
472
473
def GetDicomForInstance(*args):
    """Generated from C function OrthancPluginGetDicomForInstance()"""
    pass

GetErrorDescription(*args)

Generated from C function OrthancPluginGetErrorDescription()

Source code in pyorthanc/orthanc_sdk.py
476
477
478
def GetErrorDescription(*args):
    """Generated from C function OrthancPluginGetErrorDescription()"""
    pass

GetExpectedDatabaseVersion(*args)

Generated from C function OrthancPluginGetExpectedDatabaseVersion()

Source code in pyorthanc/orthanc_sdk.py
481
482
483
def GetExpectedDatabaseVersion(*args):
    """Generated from C function OrthancPluginGetExpectedDatabaseVersion()"""
    pass

GetFontName(*args)

Generated from C function OrthancPluginGetFontName()

Source code in pyorthanc/orthanc_sdk.py
486
487
488
def GetFontName(*args):
    """Generated from C function OrthancPluginGetFontName()"""
    pass

GetFontSize(*args)

Generated from C function OrthancPluginGetFontSize()

Source code in pyorthanc/orthanc_sdk.py
491
492
493
def GetFontSize(*args):
    """Generated from C function OrthancPluginGetFontSize()"""
    pass

GetFontsCount(*args)

Generated from C function OrthancPluginGetFontsCount()

Source code in pyorthanc/orthanc_sdk.py
496
497
498
def GetFontsCount(*args):
    """Generated from C function OrthancPluginGetFontsCount()"""
    pass

GetGlobalProperty(*args)

Generated from C function OrthancPluginGetGlobalProperty()

Source code in pyorthanc/orthanc_sdk.py
501
502
503
def GetGlobalProperty(*args):
    """Generated from C function OrthancPluginGetGlobalProperty()"""
    pass

GetOrthancDirectory(*args)

Generated from C function OrthancPluginGetOrthancDirectory()

Source code in pyorthanc/orthanc_sdk.py
506
507
508
def GetOrthancDirectory(*args):
    """Generated from C function OrthancPluginGetOrthancDirectory()"""
    pass

GetOrthancPath(*args)

Generated from C function OrthancPluginGetOrthancPath()

Source code in pyorthanc/orthanc_sdk.py
511
512
513
def GetOrthancPath(*args):
    """Generated from C function OrthancPluginGetOrthancPath()"""
    pass

GetPeers(*args)

Generated from C function OrthancPluginGetPeers()

Source code in pyorthanc/orthanc_sdk.py
516
517
518
def GetPeers(*args):
    """Generated from C function OrthancPluginGetPeers()"""
    pass

GetTagName(*args)

Generated from C function OrthancPluginGetTagName()

Source code in pyorthanc/orthanc_sdk.py
521
522
523
def GetTagName(*args):
    """Generated from C function OrthancPluginGetTagName()"""
    pass

HttpDelete(*args)

Generated from C function OrthancPluginHttpDelete()

Source code in pyorthanc/orthanc_sdk.py
526
527
528
def HttpDelete(*args):
    """Generated from C function OrthancPluginHttpDelete()"""
    pass

HttpGet(*args)

Generated from C function OrthancPluginHttpGet()

Source code in pyorthanc/orthanc_sdk.py
531
532
533
def HttpGet(*args):
    """Generated from C function OrthancPluginHttpGet()"""
    pass

HttpPost(*args)

Generated from C function OrthancPluginHttpPost()

Source code in pyorthanc/orthanc_sdk.py
536
537
538
def HttpPost(*args):
    """Generated from C function OrthancPluginHttpPost()"""
    pass

HttpPut(*args)

Generated from C function OrthancPluginHttpPut()

Source code in pyorthanc/orthanc_sdk.py
541
542
543
def HttpPut(*args):
    """Generated from C function OrthancPluginHttpPut()"""
    pass

LogError(*args)

Generated from C function OrthancPluginLogError()

Source code in pyorthanc/orthanc_sdk.py
546
547
548
def LogError(*args):
    """Generated from C function OrthancPluginLogError()"""
    pass

LogInfo(*args)

Generated from C function OrthancPluginLogInfo()

Source code in pyorthanc/orthanc_sdk.py
551
552
553
def LogInfo(*args):
    """Generated from C function OrthancPluginLogInfo()"""
    pass

LogWarning(*args)

Generated from C function OrthancPluginLogWarning()

Source code in pyorthanc/orthanc_sdk.py
556
557
558
def LogWarning(*args):
    """Generated from C function OrthancPluginLogWarning()"""
    pass

LookupDictionary(*args)

None

Source code in pyorthanc/orthanc_sdk.py
561
562
563
def LookupDictionary(*args):
    """None"""
    pass

LookupInstance(*args)

Generated from C function OrthancPluginLookupInstance()

Source code in pyorthanc/orthanc_sdk.py
566
567
568
def LookupInstance(*args):
    """Generated from C function OrthancPluginLookupInstance()"""
    pass

LookupPatient(*args)

Generated from C function OrthancPluginLookupPatient()

Source code in pyorthanc/orthanc_sdk.py
571
572
573
def LookupPatient(*args):
    """Generated from C function OrthancPluginLookupPatient()"""
    pass

LookupSeries(*args)

Generated from C function OrthancPluginLookupSeries()

Source code in pyorthanc/orthanc_sdk.py
576
577
578
def LookupSeries(*args):
    """Generated from C function OrthancPluginLookupSeries()"""
    pass

LookupStudy(*args)

Generated from C function OrthancPluginLookupStudy()

Source code in pyorthanc/orthanc_sdk.py
581
582
583
def LookupStudy(*args):
    """Generated from C function OrthancPluginLookupStudy()"""
    pass

LookupStudyWithAccessionNumber(*args)

Generated from C function OrthancPluginLookupStudyWithAccessionNumber()

Source code in pyorthanc/orthanc_sdk.py
586
587
588
def LookupStudyWithAccessionNumber(*args):
    """Generated from C function OrthancPluginLookupStudyWithAccessionNumber()"""
    pass

ReadFile(*args)

Generated from C function OrthancPluginReadFile()

Source code in pyorthanc/orthanc_sdk.py
591
592
593
def ReadFile(*args):
    """Generated from C function OrthancPluginReadFile()"""
    pass

RegisterDictionaryTag(*args)

Generated from C function OrthancPluginRegisterDictionaryTag()

Source code in pyorthanc/orthanc_sdk.py
596
597
598
def RegisterDictionaryTag(*args):
    """Generated from C function OrthancPluginRegisterDictionaryTag()"""
    pass

RegisterErrorCode(*args)

Generated from C function OrthancPluginRegisterErrorCode()

Source code in pyorthanc/orthanc_sdk.py
601
602
603
def RegisterErrorCode(*args):
    """Generated from C function OrthancPluginRegisterErrorCode()"""
    pass

RegisterFindCallback(func)

Register on C-Find Callback

Parameters:

Name Type Description Default
func Callable[[FindAnswers, FindQuery, str, str], None]

Function that is call when Orthanc receive an incoming C-Find request

required

Examples:

From https://orthanc.uclouvain.be/book/plugins/python.html#handling-dicom-scp-requests-new-in-3-2

def on_find(answers, query, issuerAet, calledAet):
    print('Received incoming C-FIND request from %s:' % issuerAet)

    answer = {}
    for i in range(query.GetFindQuerySize()):
        print('  %s (%04x,%04x) = [%s]' % (query.GetFindQueryTagName(i),
                                           query.GetFindQueryTagGroup(i),
                                           query.GetFindQueryTagElement(i),
                                           query.GetFindQueryValue(i)))
        answer[query.GetFindQueryTagName(i)] = ('HELLO%d-%s' % (i, query.GetFindQueryValue(i)))

    answers.FindAddAnswer(orthanc.CreateDicom(json.dumps(answer), None, orthanc.CreateDicomFlags.NONE))

orthanc.RegisterFindCallback(on_find)
Source code in pyorthanc/orthanc_sdk.py
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
def RegisterFindCallback(func: Callable[[FindAnswers, FindQuery, str, str], None]) -> None:
    """Register on C-Find Callback

    Parameters
    ----------
    func
        Function that is call when Orthanc receive an incoming C-Find request

    Examples
    --------
    From https://orthanc.uclouvain.be/book/plugins/python.html#handling-dicom-scp-requests-new-in-3-2
    ```python
    def on_find(answers, query, issuerAet, calledAet):
        print('Received incoming C-FIND request from %s:' % issuerAet)

        answer = {}
        for i in range(query.GetFindQuerySize()):
            print('  %s (%04x,%04x) = [%s]' % (query.GetFindQueryTagName(i),
                                               query.GetFindQueryTagGroup(i),
                                               query.GetFindQueryTagElement(i),
                                               query.GetFindQueryValue(i)))
            answer[query.GetFindQueryTagName(i)] = ('HELLO%d-%s' % (i, query.GetFindQueryValue(i)))

        answers.FindAddAnswer(orthanc.CreateDicom(json.dumps(answer), None, orthanc.CreateDicomFlags.NONE))

    orthanc.RegisterFindCallback(on_find)
    ```
    """
    pass

RegisterIncomingCStoreInstanceFilter(*args)

None

Source code in pyorthanc/orthanc_sdk.py
637
638
639
def RegisterIncomingCStoreInstanceFilter(*args):
    """None"""
    pass

RegisterIncomingHttpRequestFilter(*args)

None

Source code in pyorthanc/orthanc_sdk.py
642
643
644
def RegisterIncomingHttpRequestFilter(*args):
    """None"""
    pass

RegisterMoveCallback(func)

None

Source code in pyorthanc/orthanc_sdk.py
647
648
649
def RegisterMoveCallback(func: Callable):
    """None"""
    pass

RegisterMoveCallback2(create_move_func, get_move_func, apply_move_func, free_move_func)

See https://github.com/orthanc-team/dicom-dicomweb-proxy/blob/main/proxy.py for an example from the OrthancTeam.

Source code in pyorthanc/orthanc_sdk.py
652
653
654
def RegisterMoveCallback2(create_move_func: Callable, get_move_func: Callable, apply_move_func: Callable, free_move_func: Callable) -> None:
    """See https://github.com/orthanc-team/dicom-dicomweb-proxy/blob/main/proxy.py for an example from the OrthancTeam."""
    pass

RegisterOnChangeCallback(func)

Register on change callback

Parameters:

Name Type Description Default
func Callable[[ChangeType, ResourceType, str], None]

Function that is called as callback.

required

Examples:

From https://book.orthanc-server.com/plugins/python.html#listening-to-changes.

def on_change(change_type: orthanc_sdk.ChangeType, level: orthanc_sdk.ResourceType, resource: str) -> None:
    if changeType == orthanc_sdk.ChangeType.ORTHANC_STARTED:
        with open('/tmp/sample.dcm', 'rb') as f:
            orthanc.RestApiPost('/instances', f.read())

    elif changeType == orthanc_sdk.ChangeType.ORTHANC_STOPPED:
        print('Stopped')

    elif changeType == orthanc_sdk.ChangeType.NEW_INSTANCE:
        print('A new instance was uploaded: %s' % resource)

orthanc_sdk.RegisterOnChangeCallback(on_change)
Source code in pyorthanc/orthanc_sdk.py
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
def RegisterOnChangeCallback(func: Callable[[ChangeType, ResourceType, str], None]):
    """Register on change callback

    Parameters
    ----------
    func
        Function that is called as callback.

    Examples
    --------
    From https://book.orthanc-server.com/plugins/python.html#listening-to-changes.
    ```python
    def on_change(change_type: orthanc_sdk.ChangeType, level: orthanc_sdk.ResourceType, resource: str) -> None:
        if changeType == orthanc_sdk.ChangeType.ORTHANC_STARTED:
            with open('/tmp/sample.dcm', 'rb') as f:
                orthanc.RestApiPost('/instances', f.read())

        elif changeType == orthanc_sdk.ChangeType.ORTHANC_STOPPED:
            print('Stopped')

        elif changeType == orthanc_sdk.ChangeType.NEW_INSTANCE:
            print('A new instance was uploaded: %s' % resource)

    orthanc_sdk.RegisterOnChangeCallback(on_change)
    ```
    """
    pass

RegisterOnStoredInstanceCallback(func)

Register a callback for when an instance is stored.

Parameters:

Name Type Description Default
func Callable[[DicomInstance, str], None]

Function that is called as callback.

required

Examples:

Example from https://book.orthanc-server.com/plugins/python.html#accessing-the-content-of-a-new-instance

def on_store_instance(dicom: orthanc_sdk.DicomInstance, instance_id: str):
    print('Received instance %s of size %d (transfer syntax %s, SOP class UID %s)' % (
        instance_id, dicom.GetInstanceSize(),
        dicom.GetInstanceMetadata('TransferSyntax'),
        dicom.GetInstanceMetadata('SopClassUid')))

    if dicom.GetInstanceOrigin() == orthanc_sdk.InstanceOrigin.DICOM_PROTOCOL:
        print('This instance was received through the DICOM protocol')
    elif dicom.GetInstanceOrigin() == orthanc_sdk.InstanceOrigin.REST_API:
        print('This instance was received through the REST API')

orthanc_sdk.RegisterOnStoredInstanceCallback(on_store_instance)
Source code in pyorthanc/orthanc_sdk.py
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
def RegisterOnStoredInstanceCallback(func: Callable[[DicomInstance, str], None]):
    """Register a callback for when an instance is stored.

    Parameters
    ----------
    func
        Function that is called as callback.

    Examples
    --------
    Example from https://book.orthanc-server.com/plugins/python.html#accessing-the-content-of-a-new-instance
    ```python
    def on_store_instance(dicom: orthanc_sdk.DicomInstance, instance_id: str):
        print('Received instance %s of size %d (transfer syntax %s, SOP class UID %s)' % (
            instance_id, dicom.GetInstanceSize(),
            dicom.GetInstanceMetadata('TransferSyntax'),
            dicom.GetInstanceMetadata('SopClassUid')))

        if dicom.GetInstanceOrigin() == orthanc_sdk.InstanceOrigin.DICOM_PROTOCOL:
            print('This instance was received through the DICOM protocol')
        elif dicom.GetInstanceOrigin() == orthanc_sdk.InstanceOrigin.REST_API:
            print('This instance was received through the REST API')

    orthanc_sdk.RegisterOnStoredInstanceCallback(on_store_instance)
    ```
    """
    pass

RegisterPrivateDictionaryTag(*args)

Generated from C function OrthancPluginRegisterPrivateDictionaryTag()

Source code in pyorthanc/orthanc_sdk.py
715
716
717
def RegisterPrivateDictionaryTag(*args):
    """Generated from C function OrthancPluginRegisterPrivateDictionaryTag()"""
    pass

RegisterReceivedInstanceCallback(func)

Register a callback for when an instance arrives (but hasn't been stored).

Parameters:

Name Type Description Default
func Callable[[DicomInstance, InstanceOrigin], Tuple[ReceivedInstanceAction, Optional[bytes]]]

Function that is called as callback.

required

Examples:

def on_received_instance(dicom: orthanc_sdk.DicomInstance, origin: orthanc_sdk.InstanceOrigin):
    if origin == origin.REST_API:
        LogInfo('Not accepting DICOM from REST API.')
        return ReceivedInstanceAction.DISCARD, None

    return ReceivedInstanceAction.KEEP_AS_IS, None

orthanc.RegisterReceivedInstanceCallback(on_received_instance)
Source code in pyorthanc/orthanc_sdk.py
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
def RegisterReceivedInstanceCallback(
        func: Callable[[DicomInstance, InstanceOrigin], Tuple[ReceivedInstanceAction, Optional[bytes]]]):
    """Register a callback for when an instance arrives (but hasn't been stored).

    Parameters
    ----------
    func
        Function that is called as callback.

    Examples
    --------
    ```python
    def on_received_instance(dicom: orthanc_sdk.DicomInstance, origin: orthanc_sdk.InstanceOrigin):
        if origin == origin.REST_API:
            LogInfo('Not accepting DICOM from REST API.')
            return ReceivedInstanceAction.DISCARD, None

        return ReceivedInstanceAction.KEEP_AS_IS, None

    orthanc.RegisterReceivedInstanceCallback(on_received_instance)
    ```
    """
    pass

RegisterRestCallback(new_route, func)

Register a REST callback.

This function registers a REST callback against a regular expression for a URI. This function must be called during the initialization of the plugin, i.e. inside the OrthancPluginInitialize() public function.

Parameters:

Name Type Description Default
new_route str

Regular expression for the URI. May contain groups.

required
func Callable[[RestOutput, str, Any], None]

The callback function to handle the REST call.

required

Examples:

Example from https://book.orthanc-server.com/plugins/python.html#extending-the-rest-api

def on_rest(output: orthanc_sdk.RestOutput, uri: str, **request):
    print(request)
    output.AnswerBuffer('ok', 'text/plain')

orthanc.RegisterRestCallback('/tata', on_rest)
Source code in pyorthanc/orthanc_sdk.py
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
def RegisterRestCallback(new_route: str, func: Callable[[RestOutput, str, Any], None]) -> None:
    """Register a REST callback.

    This function registers a REST callback against a regular
    expression for a URI. This function must be called during the
    initialization of the plugin, i.e. inside the
    OrthancPluginInitialize() public function.

    Parameters
    ----------
    new_route
        Regular expression for the URI. May contain groups.
    func
        The callback function to handle the REST call.

    Examples
    --------
    Example from https://book.orthanc-server.com/plugins/python.html#extending-the-rest-api
    ```python
    def on_rest(output: orthanc_sdk.RestOutput, uri: str, **request):
        print(request)
        output.AnswerBuffer('ok', 'text/plain')

    orthanc.RegisterRestCallback('/tata', on_rest)
    ```
    """
    pass

RegisterStorageArea(*args)

None

Source code in pyorthanc/orthanc_sdk.py
774
775
776
def RegisterStorageArea(*args):
    """None"""
    pass

RegisterStorageCommitmentScpCallback(*args)

None

Source code in pyorthanc/orthanc_sdk.py
779
780
781
def RegisterStorageCommitmentScpCallback(*args):
    """None"""
    pass

RegisterWorklistCallback(*args)

None

Source code in pyorthanc/orthanc_sdk.py
784
785
786
def RegisterWorklistCallback(*args):
    """None"""
    pass

RestApiDelete(*args)

Generated from C function OrthancPluginRestApiDelete()

Source code in pyorthanc/orthanc_sdk.py
789
790
791
def RestApiDelete(*args):
    """Generated from C function OrthancPluginRestApiDelete()"""
    pass

RestApiDeleteAfterPlugins(*args)

Generated from C function OrthancPluginRestApiDeleteAfterPlugins()

Source code in pyorthanc/orthanc_sdk.py
794
795
796
def RestApiDeleteAfterPlugins(*args):
    """Generated from C function OrthancPluginRestApiDeleteAfterPlugins()"""
    pass

RestApiGet(*args)

Generated from C function OrthancPluginRestApiGet()

Source code in pyorthanc/orthanc_sdk.py
799
800
801
def RestApiGet(*args):
    """Generated from C function OrthancPluginRestApiGet()"""
    pass

RestApiGetAfterPlugins(*args)

Generated from C function OrthancPluginRestApiGetAfterPlugins()

Source code in pyorthanc/orthanc_sdk.py
804
805
806
def RestApiGetAfterPlugins(*args):
    """Generated from C function OrthancPluginRestApiGetAfterPlugins()"""
    pass

RestApiPost(uri, body, *args, **kwargs)

Make a POST call to the built-in Orthanc REST API.

Make a POST call to the built-in Orthanc REST API. The result to the query is stored into a newly allocated memory buffer.

Parameters:

Name Type Description Default
uri str

The URI in the built-in Orthanc API.

required
body Any

The body of the POST request.

required
*args
()
**kwargs
{}
Source code in pyorthanc/orthanc_sdk.py
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
def RestApiPost(uri: str, body: Any, *args, **kwargs):
    """Make a POST call to the built-in Orthanc REST API.

    Make a POST call to the built-in Orthanc REST API. The result to
    the query is stored into a newly allocated memory buffer.

    Parameters
    ----------
    uri
        The URI in the built-in Orthanc API.
    body
        The body of the POST request.
    *args
    **kwargs

    """
    pass

RestApiPostAfterPlugins(*args)

Generated from C function OrthancPluginRestApiPostAfterPlugins()

Source code in pyorthanc/orthanc_sdk.py
828
829
830
def RestApiPostAfterPlugins(*args):
    """Generated from C function OrthancPluginRestApiPostAfterPlugins()"""
    pass

RestApiPut(*args)

Generated from C function OrthancPluginRestApiPut()

Source code in pyorthanc/orthanc_sdk.py
833
834
835
def RestApiPut(*args):
    """Generated from C function OrthancPluginRestApiPut()"""
    pass

RestApiPutAfterPlugins(*args)

Generated from C function OrthancPluginRestApiPutAfterPlugins()

Source code in pyorthanc/orthanc_sdk.py
838
839
840
def RestApiPutAfterPlugins(*args):
    """Generated from C function OrthancPluginRestApiPutAfterPlugins()"""
    pass

SetDescription(*args)

Generated from C function OrthancPluginSetDescription()

Source code in pyorthanc/orthanc_sdk.py
843
844
845
def SetDescription(*args):
    """Generated from C function OrthancPluginSetDescription()"""
    pass

SetGlobalProperty(*args)

Generated from C function OrthancPluginSetGlobalProperty()

Source code in pyorthanc/orthanc_sdk.py
848
849
850
def SetGlobalProperty(*args):
    """Generated from C function OrthancPluginSetGlobalProperty()"""
    pass

SetMetricsValue(*args)

Generated from C function OrthancPluginSetMetricsValue()

Source code in pyorthanc/orthanc_sdk.py
853
854
855
def SetMetricsValue(*args):
    """Generated from C function OrthancPluginSetMetricsValue()"""
    pass

SetRootUri(*args)

Generated from C function OrthancPluginSetRootUri()

Source code in pyorthanc/orthanc_sdk.py
858
859
860
def SetRootUri(*args):
    """Generated from C function OrthancPluginSetRootUri()"""
    pass

TranscodeDicomInstance(*args)

Generated from C function OrthancPluginTranscodeDicomInstance()

Source code in pyorthanc/orthanc_sdk.py
863
864
865
def TranscodeDicomInstance(*args):
    """Generated from C function OrthancPluginTranscodeDicomInstance()"""
    pass

UncompressImage(*args)

Generated from C function OrthancPluginUncompressImage()

Source code in pyorthanc/orthanc_sdk.py
868
869
870
def UncompressImage(*args):
    """Generated from C function OrthancPluginUncompressImage()"""
    pass

WriteFile(*args)

Generated from C function OrthancPluginWriteFile()

Source code in pyorthanc/orthanc_sdk.py
873
874
875
def WriteFile(*args):
    """Generated from C function OrthancPluginWriteFile()"""
    pass