Python API


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

The AIAAClient object is constructed with the server information

  • server_ip – AIAA Server IP address
  • port – AIAA Server Port
  • version – AIAA Serverversion
dextr3d(model_name, temp_folder_path, image_file_path, out_image_file_path, point_set, pad=20, roi_size='128x128x128', sigma=3)

3D image segmentation using DEXTR3D method

  • model_name – model name according to the output of model_list()
  • temp_folder_path – temporary folder path, needed for http request/response
  • image_file_path – input 3D image file name
  • point_set – point set json containing the extreme points’ indices
  • out_image_file_path – output 3D binary mask image file name
  • 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

  • image_file_path – input 2D image file name
  • result_file_prefix – output 2D mask image file name
  • params – json containing parameters of polygon editing

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, pointRatio)

3D binary mask to polygon representation conversion

  • image_file_path – input 3D binary mask image file name
  • result_file_prefix – result file from AIAA Server
  • pointRatio – point ratio controlling how many polygon vertices will be generated

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


Get the current supported model list :param result_file_prefix: File name to store the result :return: It returns json containing current supported object names along with their corresponding object model names for DEXTR3D