aurabx/orthancphp

A PHP client for use with the Orthanc REST API

1.0.1 2024-10-13 10:22 UTC

This package is auto-updated.

Last update: 2024-12-13 10:51:46 UTC


README

This is a PHP API Client for Orthanc. It is automatically generated from the Orthanc Open API schema available at https://orthanc.uclouvain.be/api/, using the OpenAPI generator

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

$ composer require aurabx/orthancphp

Then run composer install

Getting Started

Please follow the installation procedure and then run the following:

<?php
require_once(__DIR__ . '/vendor/autoload.php');

$apiInstance = new Aurabx\OrthancPHP\Api\InstancesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

$expand = 'expand_example'; // string | If present, retrieve detailed information about the individual instances
$full = True; // bool | If present, report the DICOM tags in full format (tags indexed by their hexadecimal format, associated with their symbolic name and their value)
$limit = 3.4; // float | Limit the number of results
$requestedTags = 'requestedTags_example'; // string | If present, list the DICOM Tags you want to list in the response.  This argument is a semi-column separated list of DICOM Tags identifiers; e.g: 'requested-tags=0010,0010;PatientBirthDate'.  The tags requested tags are returned in the 'RequestedTags' field in the response.  Note that, if you are requesting tags that are not listed in the Main Dicom Tags stored in DB, building the response might be slow since Orthanc will need to access the DICOM files.  If not specified, Orthanc will return
$short = True; // bool | If present, report the DICOM tags in hexadecimal format
$since = 3.4; // float | Show only the resources since the provided index

try {
    $result = $apiInstance->instancesGet($expand, $full, $limit, $requestedTags, $short, $since);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InstancesApi->instancesGet: ', $e->getMessage(), PHP_EOL;
}

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.12.4
    • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen