Kind: global class
- Client
- new Client(param)
- .url :
String
- .auth :
Object
- .instances
- .getAll() ⇒
Promise
- .get(id) ⇒
Promise
- .add(buffer) ⇒
Promise
- .getContent(id, [group], [element], [index]) ⇒
Promise
- .export(id) ⇒
Promise
- .getFile(id) ⇒
Promise
- .getAllFrames(id) ⇒
Promise
- .getFrame(id, frameNumber, [frameFormat])
- .getImage(id, [imageFormat])
- .getModule(id, [simplify]) ⇒
Promise
- .getPatient(id) ⇒
Promise
- .getSeries(id) ⇒
Promise
- .getTags(id, [simplify]) ⇒
Promise
- .getStatistics(id) ⇒
Promise
- .getStudy(id) ⇒
Promise
- .getAll() ⇒
- .series
- .getAll() ⇒
Promise
- .get(id) ⇒
Promise
- .getArchive(id) ⇒
Promise
- .getInstances(id) ⇒
Promise
- .getMedia(id) ⇒
Promise
- .getModule(id, [simplify]) ⇒
Promise
- .getPatient(id) ⇒
Promise
- .getSharedTags(id, [simplify]) ⇒
Promise
- .getStatistics(id) ⇒
Promise
- .getStudy(id) ⇒
Promise
- .getAll() ⇒
- .studies
- .getAll() ⇒
Promise
- .get(id) ⇒
Promise
- .getArchive(id) ⇒
Promise
- .getInstances(id) ⇒
Promise
- .getMedia(id) ⇒
Promise
- .getModule(id, [simplify]) ⇒
Promise
- .getModulePatient(id, [simplify]) ⇒
Promise
- .getPatient(id) ⇒
Promise
- .getSeries(id) ⇒
Promise
- .getSharedTags(id, [simplify]) ⇒
Promise
- .getStatistics(id) ⇒
Promise
- .getAll() ⇒
- .patients
- .getAll() ⇒
Promise
- .get(id) ⇒
Promise
- .getArchive(id) ⇒
Promise
- .getInstances(id) ⇒
Promise
- .getMedia(id) ⇒
Promise
- .getModule(id, [simplify]) ⇒
Promise
- .getProtected(id) ⇒
Promise
- .setProtected(id, protect) ⇒
Promise
- .getSeries(id) ⇒
Promise
- .getSharedTags(id, [simplify]) ⇒
Promise
- .getStatistics(id) ⇒
Promise
- .getStudies(id) ⇒
Promise
- .getAll() ⇒
- .tools
- .now() ⇒
Promise
- .reset() ⇒
Promise
- .lookup(uuid) ⇒
Promise
- .dicomConformance() ⇒
Promise
- .generateUid(level) ⇒
Promise
- .now() ⇒
- .system
- .system() ⇒
Promise
- .system() ⇒
- .changes
- .getChanges([params]) ⇒
Promise
- .deleteChanges() ⇒
Promise
- .getChanges([params]) ⇒
- .exports
- .getExports([params]) ⇒
Promise
- .deleteExports() ⇒
Promise
- .getExports([params]) ⇒
Creates a new Client
Param | Type | Default | Description |
---|---|---|---|
param | Object |
||
[param.url] | String |
http://localhost:8042 |
Orthanc REST API's URL |
[param.auth] | Object |
||
[param.auth.user] | String |
Valid Orthanc Server username | |
[param.auth.pass] | String |
Valid Orthanc Server password |
Orthanc REST API's url
Kind: instance property of Client
Orthanc REST API's user credentials
Kind: instance property of Client
Properties
Name | Type | Description |
---|---|---|
username | String |
Username which will be used by the client to authenticate against Orthanc server |
password | String |
Password which will be used by the client to authenticate against Orthanc server |
Operations over instances
Kind: instance property of Client
- .instances
- .getAll() ⇒
Promise
- .get(id) ⇒
Promise
- .add(buffer) ⇒
Promise
- .getContent(id, [group], [element], [index]) ⇒
Promise
- .export(id) ⇒
Promise
- .getFile(id) ⇒
Promise
- .getAllFrames(id) ⇒
Promise
- .getFrame(id, frameNumber, [frameFormat])
- .getImage(id, [imageFormat])
- .getModule(id, [simplify]) ⇒
Promise
- .getPatient(id) ⇒
Promise
- .getSeries(id) ⇒
Promise
- .getTags(id, [simplify]) ⇒
Promise
- .getStatistics(id) ⇒
Promise
- .getStudy(id) ⇒
Promise
- .getAll() ⇒
Get all instances
Kind: static method of instances
Returns: Promise
- The expected response is an array containing Strings
Get the instance with the given id
Kind: static method of instances
Returns: Promise
- The expected result is a JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
Add the new DICOM file given as a Buffer
Kind: static method of instances
Returns: Promise
- The expected result is a JSON object
Param | Type | Description |
---|---|---|
buffer | Buffer |
The DICOM file which will be uploaded |
Get raw access to DICOM tags. If both group and element are provided, get raw access to the value of the targeted DICOM tag. If index is also provided, get raw access to the targeted DICOM sequence value.
Kind: static method of instances
Returns: Promise
- The expected value is either an array containing Strings, either a String (if group and element are both provided)
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
[group] | String |
Group number of the targeted element |
[element] | String |
Element number of the targeted value |
[index] | Integer |
Index number of the targeted sequence value |
Write the DICOM file in the filesystem where Orthanc is running
Kind: static method of instances
Returns: Promise
- The expected response is an empty JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
Get the .dcm file of the instance with the given id
Kind: static method of instances
Returns: Promise
- The expected response is a Buffer
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
Get an array containing all the frames index of the instance with the given id
Kind: static method of instances
Returns: Promise
- The expected response is an array containing Integers
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
Get the frameNumber'th frame of the instance with the given id
Kind: static method of instances
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted instance | |
frameNumber | Integer |
Index of the targeted frame | |
[frameFormat] | String |
preview |
Wanted format for the targeted frame. Must be image-int16, image-uint16, image-uint8, matlab or preview |
Get the image of the instance with the given id
Kind: static method of instances
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted instance | |
[imageFormat] | String |
preview |
Wanted format for the targeted frame. Must be image-int16, image-uint16, image-uint8, matlab or preview |
Kind: static method of instances
Returns: Promise
- The expected response is a JSON object
Todo
- Improve the documentation of this function
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted instance | |
[simplify] | Boolean |
false |
Specify whether or not the output should be simplified |
Get the parent Patient of the instance with the given id
Kind: static method of instances
Returns: Promise
- The expected result is a JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
Get the parent Series of the instance with the given id
Kind: static method of instances
Returns: Promise
- The expected result is a JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
Get the tags of the instance with the given id
Kind: static method of instances
Returns: Promise
- The expected response is a JSON object
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted instance | |
[simplify] | Boolean |
false |
Specify whether or not the output should be simplified |
Get some general informations about the instance with the given id
Kind: static method of instances
Returns: Promise
- The expected response is a JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
Get the parent Study of the instance with the given id
Kind: static method of instances
Returns: Promise
- The expected result is a JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted instance |
Operations over series
Kind: instance property of Client
- .series
- .getAll() ⇒
Promise
- .get(id) ⇒
Promise
- .getArchive(id) ⇒
Promise
- .getInstances(id) ⇒
Promise
- .getMedia(id) ⇒
Promise
- .getModule(id, [simplify]) ⇒
Promise
- .getPatient(id) ⇒
Promise
- .getSharedTags(id, [simplify]) ⇒
Promise
- .getStatistics(id) ⇒
Promise
- .getStudy(id) ⇒
Promise
- .getAll() ⇒
Get all series
Kind: static method of series
Returns: Promise
- The expected result is an array containing Strings
Get the series with the given id
Kind: static method of series
Returns: Promise
- The expected result is a JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted series |
Get a zipped archive containing the series with the given id
Kind: static method of series
Returns: Promise
- The expected response is a Buffer
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted series |
Get all the instances of the series with the given id
Kind: static method of series
Returns: Promise
- The expected response is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted series |
Get a zipped archive containing the series with the given id for media storage with DICOMDIR
Kind: static method of series
Returns: Promise
- The expected response is a Buffer
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted series |
Kind: static method of series
Returns: Promise
- The expected response is a JSON object
Todo
- Improve the documentation of this function
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted series | |
[simplify] | Boolean |
false |
Specify whether or not the output should be simplified |
Get the parent Patient of the series with the given id
Kind: static method of series
Returns: Promise
- The expected result is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted series |
Get the shared tags of the series with the given id
Kind: static method of series
Returns: Promise
- The expected response is a JSON object
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted series | |
[simplify] | Boolean |
false |
Specify whether or not the output should be simplified |
Get some general informations about the series with the given id
Kind: static method of series
Returns: Promise
- The expected response is a JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted series |
Get the parent Study of the series with the given id
Kind: static method of series
Returns: Promise
- The expected result is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted series |
Operations over studies
Kind: instance property of Client
- .studies
- .getAll() ⇒
Promise
- .get(id) ⇒
Promise
- .getArchive(id) ⇒
Promise
- .getInstances(id) ⇒
Promise
- .getMedia(id) ⇒
Promise
- .getModule(id, [simplify]) ⇒
Promise
- .getModulePatient(id, [simplify]) ⇒
Promise
- .getPatient(id) ⇒
Promise
- .getSeries(id) ⇒
Promise
- .getSharedTags(id, [simplify]) ⇒
Promise
- .getStatistics(id) ⇒
Promise
- .getAll() ⇒
Get all studies
Kind: static method of studies
Returns: Promise
- The expected result is an array containing Strings
Get the study with the given id
Kind: static method of studies
Returns: Promise
- The expected result is a JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted study |
Get a zipped archive containing the study with the given id
Kind: static method of studies
Returns: Promise
- The expected response is a Buffer
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted study |
Get all the instances of the study with the given id
Kind: static method of studies
Returns: Promise
- The expected response is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted study |
Get a zipped archive containing the study with the given id for media storage with DICOMDIR
Kind: static method of studies
Returns: Promise
- The expected response is a Buffer
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted study |
Kind: static method of studies
Returns: Promise
- The expected response is a JSON object
Todo
- Improve the documentation of this function
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted study | |
[simplify] | Boolean |
false |
Specify whether or not the output should be simplified |
Kind: static method of studies
Returns: Promise
- The expected response is a JSON object
Todo
- Improve the documentation of this function
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted study | |
[simplify] | Boolean |
false |
Specify whether or not the output should be simplified |
Get the parent Patient of the study with the given id
Kind: static method of studies
Returns: Promise
- The expected result is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted study |
Get all the series of the study with the given id
Kind: static method of studies
Returns: Promise
- The expected result is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted study |
Get the shared tags of the study with the given id
Kind: static method of studies
Returns: Promise
- The expected response is a JSON object
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted study | |
[simplify] | Boolean |
false |
Specify whether or not the output should be simplified |
Get some general informations about the study with the given id
Kind: static method of studies
Returns: Promise
- The expected response is a JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted study |
Operations over patients
Kind: instance property of Client
- .patients
- .getAll() ⇒
Promise
- .get(id) ⇒
Promise
- .getArchive(id) ⇒
Promise
- .getInstances(id) ⇒
Promise
- .getMedia(id) ⇒
Promise
- .getModule(id, [simplify]) ⇒
Promise
- .getProtected(id) ⇒
Promise
- .setProtected(id, protect) ⇒
Promise
- .getSeries(id) ⇒
Promise
- .getSharedTags(id, [simplify]) ⇒
Promise
- .getStatistics(id) ⇒
Promise
- .getStudies(id) ⇒
Promise
- .getAll() ⇒
Get all patients
Kind: static method of patients
Returns: Promise
- The expected result is an array containing Strings
Get the patient with the given id
Kind: static method of patients
Returns: Promise
- The expected result is a JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
Get a zipped archive containing the patient with the given id
Kind: static method of patients
Returns: Promise
- The expected response is a Buffer
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
Get all the instances of the patient with the given id
Kind: static method of patients
Returns: Promise
- The expected response is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
Get a zipped archive containing the patient with the given id for media storage with DICOMDIR
Kind: static method of patients
Returns: Promise
- The expected response is a Buffer
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
Kind: static method of patients
Returns: Promise
- The expected response is a JSON object
Todo
- Improve the documentation of this function
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted patient | |
[simplify] | Boolean |
false |
Get the protection against recycling status
Kind: static method of patients
Returns: Promise
- The expected result is a Boolean
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
Set the protection against recycling status
Kind: static method of patients
Returns: Promise
- The expected response is empty
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
protect | Boolean |
Specify whether or not the patient should be protected against recycling |
Get all the series of the patient with the given id
Kind: static method of patients
Returns: Promise
- The expected result is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
Get the shared tags of the patient with the given id
Kind: static method of patients
Returns: Promise
- The expected response is a JSON object
Param | Type | Default | Description |
---|---|---|---|
id | String |
Id of the targeted patient | |
[simplify] | Boolean |
false |
Get some general informations about the patient with the given id
Kind: static method of patients
Returns: Promise
- The expected response is a JSON object
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
Get all the studies of the patient with the given id
Kind: static method of patients
Returns: Promise
- The expected response is an array of JSON objects
Param | Type | Description |
---|---|---|
id | String |
Id of the targeted patient |
Tools operations
Kind: instance property of Client
- .tools
- .now() ⇒
Promise
- .reset() ⇒
Promise
- .lookup(uuid) ⇒
Promise
- .dicomConformance() ⇒
Promise
- .generateUid(level) ⇒
Promise
- .now() ⇒
Returns the current datetime in the ISO 8601 format
Kind: static method of tools
Returns: Promise
- The expected response is a String
Hot restart of Orthanc, the configuration file will be read again
Kind: static method of tools
Returns: Promise
- The expected response is an empty JSON object
Map DICOM UIDs to Orthanc identifiers
Kind: static method of tools
Returns: Promise
- The expected result is an array containing a JSON object
Param | Type | Description |
---|---|---|
uuid | UUID |
UUID which will be used to perform the lookup |
DICOM conformance statement of this version of Orthanc
Kind: static method of tools
Returns: Promise
- The expected result is a String
Generates an UUID
Kind: static method of tools
Returns: Promise
- The expected result is a String
Param | Type | Description |
---|---|---|
level | String |
argument among "patient", "study", "series" and "instance" |
System operations
Kind: instance property of Client
Get some information about the Orthanc Server
Kind: static method of system
Returns: Promise
- The expected response is a JSON object
Operations over changes logs
Kind: instance property of Client
- .changes
- .getChanges([params]) ⇒
Promise
- .deleteChanges() ⇒
Promise
- .getChanges([params]) ⇒
Get changes logs
Kind: static method of changes
Returns: Promise
- The expected response is a JSON object
Param | Type | Default | Description |
---|---|---|---|
[params] | Object |
last, "limit" and "since" arguments | |
[params.last] | Boolean |
false |
Specify whether or not only the last change should be returned |
[params.since] | Integer |
0 |
Set the sequence number since which changes should be returned |
[params.limit] | Integer |
100 |
Set the returned changes limit. Default and maximum values are the same : 100 |
Delete changes logs
Kind: static method of changes
Returns: Promise
- The expected response is empty
Operations over exports logs
Kind: instance property of Client
- .exports
- .getExports([params]) ⇒
Promise
- .deleteExports() ⇒
Promise
- .getExports([params]) ⇒
Get exports logs. For medical traceability, Orthanc stores a log of all the resources that have been exported to remote modalities.
Kind: static method of exports
Returns: Promise
- The expected response is a JSON object
Param | Type | Default | Description |
---|---|---|---|
[params] | Object |
last, "limit" and "since" arguments | |
[params.last] | Boolean |
false |
Specify whether or not only the last export should be returned |
[params.since] | Integer |
0 |
Set the sequence number since which exports should be returned |
[params.limit] | Integer |
100 |
Set the returned exports limit. Default and maximum values are the same : 100 |
Delete exports logs
Kind: static method of exports
Returns: Promise
- The expected response is empty