Crates.io | discovery-connect |
lib.rs | discovery-connect |
version | |
source | src |
created_at | 2024-03-27 13:23:49.653941 |
updated_at | 2024-12-04 15:10:48.615906 |
description | Library to upload data to RetinAI Discovery via the public API. |
homepage | https://retinai.com |
repository | https://github.com/ikerian/discovery-connect |
max_upload_size | |
id | 1187946 |
Cargo.toml error: | TOML parse error at line 21, column 1 | 21 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
Rust interface for data exchange via the Discovery API, with C-compatible bindings.
Make sure you have a working Rust installation according to the installation instructions.
Open a terminal and type:
cargo run --p example
You should see the following output:
Usage: ExampleUploadAcquisition <api_url> <client_id> <client_secret> <username> <password> <timeout> <workbook_uuid> <acquisition_name> <file1> <file2> ...
If you receive an error, please review or update your Rust installation.
You can use cargo build --release
to generate a library that you can include in your project.
cargo build --release
A C interface is automatically generated in target/release/:
include/discovery.h
- header file (cross-platform)libdiscovery.so
- shared library (Linux only)libdiscovery.dylib
- shared library (MacOS only)discovery.dll
- shared library (Windows only)To access the Discovery API, you will need:
When collaborating with Ikerian on a particular project, you will be issued those credentials as part of the project setup. If you have not been issued credentials, please reach out to your contact person.
Below is an example call for Linux / Mac:
API_URL='https://api.example.discovery.com' \
CLIENT_ID='12345678-1234-1234-1234-1234567890ab' \
CLIENT_SECRET='1234567890' \
USER='upload-service@example.com' \
PASS='abcdefghij' \
TIMEOUT=300 \
WORKBOOK_UUID='12345678-1234-1234-1234-1234567890ab' \
ACQUISITION_NAME='test-acquisition' \
cargo run -q --p example \
$API_URL $CLIENT_ID $CLIENT_SECRET $USER $PASS $TIMEOUT \
$WORKBOOK_UUID $ACQUISITION_NAME \
00000001.dcm 00000002.dcm 00000003.dcm 00000004.dcm
Below is an example call for Windows:
set API_URL= 'https://api.example.discovery.com'
set CLIENT_ID='12345678-1234-1234-1234-1234567890ab'
set CLIENT_SECRET='1234567890'
set USER='upload-service@example.com'
set PASS='abcdefghij'
set TIMEOUT=300
set WORKBOOK_UUID='12345678-1234-1234-1234-1234567890ab'
set ACQUISITION_NAME='test-acquisition'
cargo run -q --project example/DiscoveryExample.csproj ^
%API_URL% %CLIENT_ID% %CLIENT_SECRET% %USER% %PASS% %TIMEOUT% ^
%WORKBOOK_UUID% %ACQUISITION_NAME% ^
00000001.dcm 00000002.dcm 00000003.dcm 00000004.dcm
Copyright 2023 Ikerian AG
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.