view Applications/StoneWebViewer/WebAssembly/DeepLearningWorker.proto @ 2134:93258466311b deep-learning

integration mainline->deep-learning
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 30 May 2024 21:31:37 +0200
parents d4e769a0961f
children
line wrap: on
line source

syntax = "proto2";
option optimize_for = LITE_RUNTIME;

package OrthancStone.Messages;

enum RequestType {
  PARSE_MODEL = 1;
  LOAD_IMAGE = 2;
  EXECUTE_STEP = 3;
}

enum ResponseType {
  INITIALIZED = 1;
  PARSED_MODEL = 2;
  LOADED_IMAGE = 3;
  STEP_DONE = 4;
}

message ParseModelRequest {
  required bytes content = 1;
}

message ParseModelResponse {
  required uint32 number_of_steps = 1;
}

message LoadImageRequest {
  required string sop_instance_uid = 1;
  required uint32 frame_number = 2;
  required uint32 height = 3;
  required uint32 width = 4;
  repeated float values = 5 [packed=true];
}

message SegmentationMask {
  required string sop_instance_uid = 1;
  required uint32 frame_number = 2;
  required uint32 height = 3;
  required uint32 width = 4;
  repeated bool values = 5 [packed=true];
}

message StepResponse {
  required bool done = 1;
  required float progress = 2;
  optional SegmentationMask mask = 3;
}

message Request {
  required RequestType type = 1;

  optional ParseModelRequest parse_model = 2;
  optional LoadImageRequest load_image = 3;
}

message Response {
  required ResponseType type = 1;

  optional ParseModelResponse parse_model = 2;
  optional StepResponse step = 3;
}