Git Product home page Git Product logo

dicomwebapi's Introduction

This project was generated with:

java -jar ../openapi-generator-cli-6.0.1.jar generate -i ~/projects/dws/api.yaml -g rust-server --skip-validate-spec

Rust Dicom Web Server Template

DICOMweb™ is the DICOM standard for web-based medical imaging. It is a set of RESTful services, enabling web developers to unlock the power of healthcare images using industry-standard toolsets.

Overview

This client/server was generated by the [openapi-generator] (https://openapi-generator.tech) project. By using the OpenAPI-Spec from a remote server, you can easily generate a server stub.

To see how to make this your own, look here:

README

  • API version: 0.1.0

This autogenerated project defines an API crate openapi_client which contains:

  • An Api trait defining the API in Rust.
  • Data types representing the underlying data model.
  • A Client type which implements Api and issues HTTP requests for each operation.
  • A router which accepts HTTP requests and invokes the appropriate Api method for each operation.

It also contains an example server and client which make use of openapi_client:

  • The example server starts up a web server using the openapi_client router, and supplies a trivial implementation of Api which returns failure for every operation.
  • The example client provides a CLI which lets you invoke any single operation on the openapi_client client by passing appropriate arguments on the command line.

You can use the example server and client as a basis for your own code. See below for more detail on implementing a server.

Examples

Run examples with:

cargo run --example <example-name>

To pass in arguments to the examples, put them after --, for example:

cargo run --example client -- --help

Running the example server

To run the server, follow these simple steps:

cargo run --example server

Running the example client

To run a client, follow one of the following simple steps:

cargo run --example client ApiInstancesTag
cargo run --example client InstancesGet
cargo run --example client InstancesSOPInstanceUIDFramesUidGet
cargo run --example client InstancesSOPInstanceUIDGet
cargo run --example client InstancesSOPInstanceUIDRenderedGet
cargo run --example client InstancesSOPInstanceUIDThumbnailGet
cargo run --example client SeriesGet
cargo run --example client SeriesSeriesInstanceUIDGet
cargo run --example client SeriesSeriesInstanceUIDInstancesGet
cargo run --example client SeriesSeriesInstanceUIDInstancesSOPInstanceUIDFramesUidGet
cargo run --example client SeriesSeriesInstanceUIDInstancesSOPInstanceUIDGet
cargo run --example client SeriesSeriesInstanceUIDInstancesSOPInstanceUIDRenderedGet
cargo run --example client SeriesSeriesInstanceUIDInstancesSOPInstanceUIDThumbnailGet
cargo run --example client SeriesSeriesInstanceUIDRenderedGet
cargo run --example client SeriesSeriesInstanceUIDThumbnailGet
cargo run --example client StudiesGet
cargo run --example client StudiesStudyInstanceUIDGet
cargo run --example client StudiesStudyInstanceUIDSeriesGet
cargo run --example client StudiesStudyInstanceUIDSeriesSeriesInstanceUIDGet
cargo run --example client StudiesStudyInstanceUIDSeriesSeriesInstanceUIDInstancesGet
cargo run --example client StudiesStudyInstanceUIDSeriesSeriesInstanceUIDInstancesSOPInstanceUIDFramesUidGet
cargo run --example client StudiesStudyInstanceUIDSeriesSeriesInstanceUIDInstancesSOPInstanceUIDGet
cargo run --example client StudiesStudyInstanceUIDSeriesSeriesInstanceUIDInstancesSOPInstanceUIDRenderedGet
cargo run --example client StudiesStudyInstanceUIDSeriesSeriesInstanceUIDInstancesSOPInstanceUIDThumbnailGet
cargo run --example client StudiesStudyInstanceUIDSeriesSeriesInstanceUIDRenderedGet
cargo run --example client StudiesStudyInstanceUIDSeriesSeriesInstanceUIDThumbnailGet
cargo run --example client StudiesStudyInstanceUIDThumbnailGet

HTTPS

The examples can be run in HTTPS mode by passing in the flag --https, for example:

cargo run --example server -- --https

This will use the keys/certificates from the examples directory. Note that the server chain is signed with CN=localhost.

Using the generated library

The generated library has a few optional features that can be activated through Cargo.

  • server
    • This defaults to enabled and creates the basic skeleton of a server implementation based on hyper
    • To create the server stack you'll need to provide an implementation of the API trait to provide the server function.
  • client
    • This defaults to enabled and creates the basic skeleton of a client implementation based on hyper
    • The constructed client implements the API trait by making remote API call.
  • conversions
    • This defaults to disabled and creates extra derives on models to allow "transmogrification" between objects of structurally similar types.

See https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section for how to use features in your Cargo.toml.

Documentation for API Endpoints

All URIs are relative to http://localhost

Method HTTP request Description
api.instances.tag GET /instances/{SOPInstanceUID}/{tag} Retrieve an instance field.
**** GET /instances Query for instances.
**** GET /instances/{SOPInstanceUID}/frames/{uid} Query for a series in a study.
**** GET /instances/{SOPInstanceUID} Retrieve a instance.
**** GET /instances/{SOPInstanceUID}/rendered Render an instance.
**** GET /instances/{SOPInstanceUID}/thumbnail Render a thumbnail.
**** GET /series Query for series.
**** GET /series/{SeriesInstanceUID} Retrieve a series.
**** GET /series/{SeriesInstanceUID}/instances Query for instances in the series of a study.
**** GET /series/{SeriesInstanceUID}/instances/{SOPInstanceUID}/frames/{uid} Query for a series in a study.
**** GET /series/{SeriesInstanceUID}/instances/{SOPInstanceUID} Query for a series in a study.
**** GET /series/{SeriesInstanceUID}/instances/{SOPInstanceUID}/rendered Render an instance.
**** GET /series/{SeriesInstanceUID}/instances/{SOPInstanceUID}/thumbnail Render a thumbnail.
**** GET /series/{SeriesInstanceUID}/rendered Render an instance.
**** GET /series/{SeriesInstanceUID}/thumbnail Render a thumbnail.
**** GET /studies Query for studies.
**** GET /studies/{StudyInstanceUID} Retrieve a study.
**** GET /studies/{StudyInstanceUID}/series Query for series in a study.
**** GET /studies/{StudyInstanceUID}/series/{SeriesInstanceUID} Query for a series in a study.
**** GET /studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/instances Query for instances in the series of a study.
**** GET /studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/instances/{SOPInstanceUID}/frames/{uid} Query for a series in a study.
**** GET /studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/instances/{SOPInstanceUID} Query for a series in a study.
**** GET /studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/instances/{SOPInstanceUID}/rendered Render an instance.
**** GET /studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/instances/{SOPInstanceUID}/thumbnail Render a thumbnail.
**** GET /studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/rendered Render a series.
**** GET /studies/{StudyInstanceUID}/series/{SeriesInstanceUID}/thumbnail Render a thumbnail.
**** GET /studies/{StudyInstanceUID}/thumbnail Render a thumbnail.

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.