comparison Sources/Autogenerated/orthanc.pyi @ 211:d7acfccc0d0b

documented RegisterFindCallback(), RegisterMoveCallback(), RegisterMoveCallback2(), and RegisterWorklistCallback()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 03 Jul 2024 14:21:01 +0200
parents 315e1720a35f
children 2db6c1f6417f
comparison
equal deleted inserted replaced
210:6ca37fcf0979 211:d7acfccc0d0b
2184 Returns: 2184 Returns:
2185 dict: Dictionary containing the requested information. 2185 dict: Dictionary containing the requested information.
2186 """ 2186 """
2187 ... 2187 ...
2188 2188
2189 class FindCallback(typing.Protocol):
2190 def __call__(self, answers: FindAnswers, query: FindQuery, issuer_aet: str, called_aet: str) -> None:
2191 ...
2192
2193 # Register a callback to handle C-Find requests
2194 def RegisterFindCallback(callback: FindCallback) -> None:
2195 """
2196 Register a callback to handle C-Find requests.
2197
2198 Args:
2199 callback (FindCallback): The callback function.
2200 """
2201 ...
2202
2189 class IncomingHttpRequestFilter(typing.Protocol): 2203 class IncomingHttpRequestFilter(typing.Protocol):
2190 def __call__(self, uri: str, method: HttpMethod, ip: str, headers: dict, get: dict) -> bool: 2204 def __call__(self, uri: str, method: HttpMethod, ip: str, headers: dict, get: dict) -> bool:
2191 ... 2205 ...
2192 2206
2193 # Callback to filter incoming HTTP requests received by Orthanc 2207 # Callback to filter incoming HTTP requests received by Orthanc
2198 Args: 2212 Args:
2199 callback (IncomingHttpRequestFilter): The callback function. 2213 callback (IncomingHttpRequestFilter): The callback function.
2200 """ 2214 """
2201 ... 2215 ...
2202 2216
2217 class MoveCallback(typing.Protocol):
2218 def __call__(self, Level: str, PatientID: str, AccessionNumber: str, StudyInstanceUID: str, SeriesInstanceUID: str, SOPInstanceUID: str, OriginatorAET: str, SourceAET: str, TargetAET: str, OriginatorID: int) -> None:
2219 ...
2220
2221 # Register a callback to handle C-Move requests (simple version, with 1 suboperation)
2222 def RegisterMoveCallback(callback: MoveCallback) -> None:
2223 """
2224 Register a callback to handle C-Move requests (simple version, with 1 suboperation).
2225
2226 Args:
2227 callback (MoveCallback): The callback function.
2228 """
2229 ...
2230
2231 class MoveCallback2(typing.Protocol):
2232 def __call__(self, Level: str, PatientID: str, AccessionNumber: str, StudyInstanceUID: str, SeriesInstanceUID: str, SOPInstanceUID: str, OriginatorAET: str, SourceAET: str, TargetAET: str, OriginatorID: int) -> object:
2233 ...
2234
2235 class GetMoveSizeCallback(typing.Protocol):
2236 def __call__(self, driver: object) -> int:
2237 ...
2238
2239 class ApplyMoveCallback(typing.Protocol):
2240 def __call__(self, driver: object) -> None:
2241 ...
2242
2243 class FreeMoveCallback(typing.Protocol):
2244 def __call__(self, driver: object) -> None:
2245 ...
2246
2247 # Register a callback to handle C-Move requests (full version, with multiple suboperations)
2248 def RegisterMoveCallback2(callback: MoveCallback2, get_move_size: GetMoveSizeCallback, apply_move: ApplyMoveCallback, free_move: FreeMoveCallback) -> None:
2249 """
2250 Register a callback to handle C-Move requests (full version, with multiple suboperations).
2251
2252 Args:
2253 callback (MoveCallback2): Main callback that creates the C-Move driver.
2254 get_move_size (GetMoveSizeCallback): Callback to read the number of C-Move suboperations.
2255 apply_move (ApplyMoveCallback): Callback to apply one C-Move suboperation.
2256 free_move (FreeMoveCallback): Callback to free the C-Move driver.
2257 """
2258 ...
2259
2203 class OnChangeCallback(typing.Protocol): 2260 class OnChangeCallback(typing.Protocol):
2204 def __call__(self, change_type: ChangeType, resource_type: ResourceType, resource_id: str) -> None: 2261 def __call__(self, change_type: ChangeType, resource_type: ResourceType, resource_id: str) -> None:
2205 ... 2262 ...
2206 2263
2207 # Register a callback to monitor changes 2264 # Register a callback to monitor changes
2238 Register a REST callback. 2295 Register a REST callback.
2239 2296
2240 Args: 2297 Args:
2241 path_regular_expression (str): Regular expression for the URI. May contain groups. 2298 path_regular_expression (str): Regular expression for the URI. May contain groups.
2242 callback (RestCallback): The callback function to handle the REST call. 2299 callback (RestCallback): The callback function to handle the REST call.
2300 """
2301 ...
2302
2303 class WorklistCallback(typing.Protocol):
2304 def __call__(self, answers: WorklistAnswers, query: WorklistQuery, issuer_aet: str, called_aet: str) -> None:
2305 ...
2306
2307 # Register a callback to handle modality worklists requests
2308 def RegisterWorklistCallback(callback: WorklistCallback) -> None:
2309 """
2310 Register a callback to handle modality worklists requests.
2311
2312 Args:
2313 callback (WorklistCallback): The callback function.
2243 """ 2314 """
2244 ... 2315 ...
2245 2316
2246 2317
2247 class DicomInstance: 2318 class DicomInstance: