Python API

Client

class client_api.AIAAClient(server_ip, server_port, api_version='v1')

The AIAAClient object is constructed with the server information

Parameters
  • server_ip – AIAA Server IP address

  • server_port – AIAA Server Port

  • api_version – AIAA Serverversion

dextr3d(model_name, image_file_path, result_file_prefix, point_set, pad=20, roi_size='128x128x128', sigma=3)

3D image segmentation using DEXTR3D method

Parameters
  • model_name – model name according to the output of model_list()

  • image_file_path – input 3D image file name

  • point_set – point set json containing the extreme points’ indices

  • result_file_prefix – output files will be stored under this prefix

  • pad – padding size (default is 20)

  • roi_size – image resize value (default is 128x128x128)

  • sigma – sigma value to be used for sigma (default is 3)

Output 3D binary mask will be saved to the specified file

fixpolygon(image_file_path, result_file_prefix, params)

2D polygon update with single point edit

Parameters
  • image_file_path – input 2D image file name

  • result_file_prefix – output 2D mask image file name

  • params – json containing parameters of polygon editing

Returns

A json containing the indices of updated polygon vertices

json parameters will have
  1. Neighborhood size

  2. Index of the changed polygon

  3. Index of the changed vertex

  4. Polygon before editing

  5. Polygon after editing

Output binary mask will be saved to the specified name

mask2polygon(image_file_path, result_file_prefix, point_ratio)

3D binary mask to polygon representation conversion

Parameters
  • image_file_path – input 3D binary mask image file name

  • result_file_prefix – result file from AIAA Server

  • point_ratio – point ratio controlling how many polygon vertices will be generated

Returns

A json containing the indices of all polygon vertices slice by slice.

model_list(result_file_prefix)

Get the current supported model list :param result_file_prefix: File name to store the result :return: returns json containing list of models and details supported for DEXTR3D

segmentation(model_name, image_file_path, result_file_prefix, params)

3D image segmentation method

Parameters
  • model_name – model name according to the output of model_list()

  • image_file_path – input 3D image file name

  • result_file_prefix – result file from AIAA Server

  • params – additional params if applicable for segmentation

Output 3D binary mask and extreme points will be saved into files with result_file_prefix