Parameter Types¶
The task interface defines a type for each input and output parameter.
Primitive Types¶
XamFlow supports the following primitive types:
Int
Float
String
Bool
Composite Types¶
XamFlow supports composite types (JSON objects and arrays) to represent or reference more complex entities.
Bulk data is usually referenced in files stored on FSS.
XamFlow does not restrict the set of composite parameter types, but has special built-in support for certain standard types.
Core.Type.Base
provides the core types:
{
"package_format": "XFP-DEP1.0",
"name": "Core.Type.Base",
"version": "1.10.1.0",
"summary": "Core Types",
"description_filename": "readme.txt",
"parameter_types": [
{
"name": "Bitmap",
"$ref": "parameter_type_bitmap.json#/definitions/parameter_type_bitmap"
},
{
"name": "ChartReport",
"$ref": "parameter_type_chart_report.json#/definitions/parameter_type_chart_report"
},
{
"name": "ChartReportConfig",
"$ref": "parameter_type_chart_report.json#/definitions/parameter_type_chart_report_config"
},
{
"name": "Contours",
"$ref": "parameter_type_contours.json#/definitions/parameter_type_contours"
},
{
"name": "CSV",
"$ref": "parameter_type_csv.json#/definitions/parameter_type_csv"
},
{
"name": "Entity",
"$ref": "parameter_type_entity.json#/definitions/parameter_type_entity"
},
{
"name": "ForeignFile",
"$ref": "parameter_type_foreign_file.json#/definitions/parameter_type_foreign_file"
},
{
"name": "GIResult",
"$ref": "parameter_type_gi_result.json#/definitions/parameter_type_gi_result"
},
{
"name": "HTMLDocument",
"$ref": "parameter_type_html_document.json#/definitions/parameter_type_html_document"
},
{
"name": "Image",
"$ref": "parameter_type_image.json#/definitions/parameter_type_image"
},
{
"name": "ImagePairList",
"$ref": "parameter_type_image_pair_list.json#/definitions/parameter_type_image_pair_list"
},
{
"name": "ImageVOI",
"$ref": "parameter_type_image_voi.json#/definitions/parameter_type_image_voi"
},
{
"name": "Mesh",
"$ref": "parameter_type_mesh.json#/definitions/parameter_type_mesh"
},
{
"name": "RawProjection",
"$ref": "parameter_type_raw_projection.json#/definitions/parameter_type_raw_projection"
},
{
"name": "RegistrationResult",
"$ref": "parameter_type_registration_result.json#/definitions/parameter_type_registration_result"
},
{
"name": "ReportParameter",
"$ref": "parameter_type_chart_report.json#/definitions/parameter_type_report_parameter"
},
{
"name": "RotatedImageVOI",
"$ref": "parameter_type_rotated_image_voi.json#/definitions/parameter_type_rotated_image_voi"
},
{
"name": "Sample",
"$ref": "parameter_type_sample.json#/definitions/parameter_type_sample"
},
{
"name": "Sequence",
"$ref": "parameter_type_sequence.json#/definitions/parameter_type_sequence"
},
{
"name": "Snapshot",
"$ref": "parameter_type_snapshot.json#/definitions/parameter_type_snapshot"
},
{
"name": "SnapshotAnimation",
"$ref": "parameter_type_snapshot_animation.json#/definitions/parameter_type_snapshot_animation"
},
{
"name": "SnapshotMetadata",
"$ref": "parameter_type_snapshot_metadata.json#/definitions/parameter_type_snapshot_metadata"
},
{
"name": "Spectra",
"$ref": "parameter_type_spectra.json#/definitions/parameter_type_spectra"
},
{
"name": "UserDataFolder",
"$ref": "parameter_type_user_data_folder.json#/definitions/parameter_type_user_data_folder"
},
{
"name": "Video",
"$ref": "parameter_type_video.json#/definitions/parameter_type_video"
}
]
}
Custom Types¶
Custom types can be defined by creating a dependency package similar to Core.Type.Base
.
Overview¶
The most common core composite types are the following:
Image¶
An image dataset (typically 3D or 2D) in a supported file format like OMNI.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_source_name": {
"$ref": "parameter_source_name.json#/definitions/parameter_source_name"
},
"parameter_type_foreign_file": {
"$ref": "parameter_type_foreign_file.json#/definitions/parameter_type_foreign_file"
},
"parameter_type_image": {
"description": "Parameter type `Image`",
"type": "object",
"properties": {
"type": {
"const": "Image"
},
"source": {
"$ref": "#/definitions/parameter_source_name"
}
},
"anyOf": [
{
"properties": {
"type": {},
"source": {
"const": "swap"
},
"sample_index": {
"description": "The SNS DB sample index.",
"type": "integer"
},
"measurement_index": {
"description": "The SNS DB measurement index.",
"type": "integer"
},
"filename": {
"description": "The SNS image filename.",
"type": "string"
},
"project_serial": {
"description": "The SNS DB project serial.",
"type": "integer"
},
"size": {
"description": "The size of the image in pixels in the X, Y and Z dimension.",
"type": "array",
"items": {
"type": "integer"
}
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"sample_index",
"measurement_index",
"filename",
"project_serial",
"size"
]
},
{
"properties": {
"type": {},
"source": {
"const": "job"
},
"job_serial": {
"description": "The DB serial of the job that stored the image as its output.",
"type": "integer"
},
"filename": {
"description": "The filename of the image.",
"type": "string"
},
"filenames": {
"description": "Optional. Filenames of additional files.",
"type": "array",
"items": {
"type": "string"
}
},
"additional_files": {
"description": "Optional. References to additional files.",
"type": "array",
"items": {
"$ref": "#/definitions/parameter_type_foreign_file"
}
},
"size": {
"description": "The size of the image in pixels in the X, Y and Z dimension.",
"type": "array",
"items": {
"type": "integer"
}
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"job_serial",
"filename",
"size"
]
},
{
"properties": {
"type": {},
"source": {
"const": "userdata"
},
"virtualpath": {
"description": "The virtualpath of the image. Usually only used for @xfuserdata mappings.",
"type": "string"
},
"filename": {
"description": "The filename of the image.",
"type": "string"
},
"additional_files": {
"description": "Optional. References to additional files.",
"type": "array",
"items": {
"$ref": "#/definitions/parameter_type_foreign_file"
}
},
"size": {
"description": "The size of the image in pixels in the X, Y and Z dimension.",
"type": "array",
"items": {
"type": "integer"
}
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"virtualpath",
"filename",
"size"
]
}
]
}
}
}
ImageVOI¶
A Volume Of Interest in an image.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_type_image": {
"$ref": "parameter_type_image.json#/definitions/parameter_type_image"
},
"parameter_type_image_voi": {
"description": "Parameter type `ImageVOI`",
"type": "object",
"properties": {
"type": {
"const": "ImageVOI"
},
"pos": {
"description": "The position of the VOI within the image in image pixels in the X, Y and Z dimension.",
"type": "array",
"items": {
"type": "integer"
}
},
"size": {
"description": "The size of the VOI in image pixels in the X, Y and Z dimension.",
"type": "array",
"items": {
"type": "integer"
}
},
"image": {
"description": "The image which the VOI was defined for.",
"$ref": "#/definitions/parameter_type_image"
},
"name": {
"description": "Optional display name of the VOI.",
"type": "string"
},
"category": {
"description": "Optional category name of the VOI.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"pos",
"size",
"image"
]
}
}
}
RotatedImageVOI¶
A rotated Volume Of Interest contains a transformation matrix to rotate, translate, and scale the pixels in an image.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_type_image": {
"$ref": "parameter_type_image.json#/definitions/parameter_type_image"
},
"parameter_type_rotated_image_voi": {
"description": "Parameter type `RotatedImageVOI`",
"type": "object",
"properties": {
"type": {
"const": "RotatedImageVOI"
},
"size": {
"description": "The size of the VOI in pixels in the X, Y and Z dimension.",
"type": "array",
"items": {
"type": "integer"
}
},
"size_mm": {
"description": "The size of the VOI in mm in the X, Y and Z dimension.",
"type": "array",
"items": {
"type": "number"
}
},
"pos_mm": {
"description": "The position of the VOI within the image in mm in the X, Y and Z dimension.",
"type": "array",
"items": {
"type": "number"
}
},
"rotation": {
"description": "The 3x3 rotation matrix of the VOI.",
"type": "array",
"items": {
"type": "number"
}
},
"image": {
"description": "The image which the VOI was defined for.",
"$ref": "#/definitions/parameter_type_image"
},
"name": {
"description": "Optional display name of the VOI.",
"type": "string"
},
"category": {
"description": "Optional category name of the VOI.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"size",
"size_mm",
"pos_mm",
"rotation",
"image"
]
}
}
}
Foreign File¶
A file in any file format.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_source_name": {
"$ref": "parameter_source_name.json#/definitions/parameter_source_name"
},
"parameter_type_foreign_file": {
"description": "Parameter type `ForeignFile`",
"type": "object",
"properties": {
"type": {
"const": "ForeignFile"
},
"source": {
"$ref": "#/definitions/parameter_source_name"
}
},
"anyOf": [
{
"properties": {
"type": {},
"source": {
"const": "job"
},
"job_serial": {
"description": "The DB serial of the job that stored the foreign file as its output.",
"type": "integer"
},
"filename": {
"description": "The filename of the foreign file.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"job_serial",
"filename"
]
},
{
"properties": {
"type": {},
"source": {
"const": "userdata"
},
"virtualpath": {
"description": "The virtualpath of the foreign file. Usually only used for @xfuserdata mappings.",
"type": "string"
},
"filename": {
"description": "The filename of the foreign file.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"virtualpath",
"filename"
]
}
]
}
}
}
Userdata Folder¶
A directory mapped as User Data.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_source_name": {
"$ref": "parameter_source_name.json#/definitions/parameter_source_name"
},
"parameter_type_user_data_folder": {
"description": "Parameter type `UserDataFolder`",
"type": "object",
"properties": {
"type": {
"const": "UserDataFolder"
},
"source": {
"$ref": "#/definitions/parameter_source_name"
}
},
"anyOf": [
{
"properties": {
"type": {},
"source": {
"const": "userdata"
},
"virtualpath": {
"description": "The virtualpath of the user data folder. Only used for @xfuserdata mappings.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"virtualpath"
]
}
]
}
}
}
Sequence¶
A set of all values for a specific task input or output parameter.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_type_sequence": {
"description": "Parameter type `Sequence`",
"type": "object",
"properties": {
"type": {
"const": "Sequence"
},
"task_serial": {
"description": "The DB serial of the task that contains the sequence.",
"type": "integer"
},
"output_key": {
"description": "The key of the output sequence.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"task_serial",
"output_key"
]
}
}
}
Bitmap¶
A normal 2D color image file in a supported file format like .bmp, .jpg or .png.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_source_name": {
"$ref": "parameter_source_name.json#/definitions/parameter_source_name"
},
"parameter_type_bitmap": {
"description": "Parameter type `Bitmap`",
"type": "object",
"properties": {
"type": {
"const": "Bitmap"
},
"source": {
"$ref": "#/definitions/parameter_source_name"
}
},
"anyOf": [
{
"properties": {
"type": {},
"source": {
"const": "job"
},
"job_serial": {
"description": "The DB serial of the job that stored the bitmap as its output.",
"type": "integer"
},
"filename": {
"description": "The filename of the bitmap file (JPEG, PNG or TIFF).",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"job_serial",
"filename"
]
},
{
"properties": {
"type": {},
"source": {
"const": "userdata"
},
"virtualpath": {
"description": "The virtualpath of the bitmap. Usually only used for @xfuserdata mappings.",
"type": "string"
},
"filename": {
"description": "The filename of the bitmap.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"virtualpath",
"filename"
]
},
{
"properties": {
"type": {},
"source": {
"const": "task_config"
},
"task_serial": {
"description": "The DB serial of the task that stored the bitmap as its config.",
"type": "integer"
},
"filename": {
"description": "The filename of the bitmap file (JPEG, PNG or TIFF).",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"task_serial",
"filename"
]
}
]
}
}
}
CSV¶
A comma-separated-value text file.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_source_name": {
"$ref": "parameter_source_name.json#/definitions/parameter_source_name"
},
"parameter_type_csv": {
"description": "Parameter type `CSV`",
"type": "object",
"properties": {
"type": {
"const": "CSV"
},
"source": {
"$ref": "#/definitions/parameter_source_name"
}
},
"anyOf": [
{
"properties": {
"type": {},
"source": {
"const": "job"
},
"job_serial": {
"description": "The DB serial of the job that stored the CSV as its output.",
"type": "integer"
},
"filename": {
"description": "The filename of the file (CSV).",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"job_serial",
"filename"
]
},
{
"properties": {
"type": {},
"source": {
"const": "userdata"
},
"virtualpath": {
"description": "The virtualpath of the CSV. Usually only used for @xfuserdata mappings.",
"type": "string"
},
"filename": {
"description": "The filename of the file (CSV).",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"virtualpath",
"filename"
]
},
{
"properties": {
"type": {},
"source": {
"const": "task_config"
},
"task_serial": {
"description": "The DB serial of the task that stored the CSV as its config.",
"type": "integer"
},
"filename": {
"description": "The filename of the CSV file.",
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"task_serial",
"filename"
]
}
]
}
}
}
Mesh¶
A triangle mesh file in a supported file format like .stl or .ply.
{
"$schema": "http://json-schema.org/draft-07/schema#",
"definitions": {
"parameter_source_name": {
"$ref": "parameter_source_name.json#/definitions/parameter_source_name"
},
"parameter_type_foreign_file": {
"$ref": "parameter_type_foreign_file.json#/definitions/parameter_type_foreign_file"
},
"parameter_type_mesh": {
"description": "Parameter type `Mesh`",
"type": "object",
"properties": {
"type": {
"const": "Mesh"
},
"source": {
"$ref": "#/definitions/parameter_source_name"
}
},
"anyOf": [
{
"properties": {
"type": {},
"source": {
"const": "job"
},
"job_serial": {
"description": "The DB serial of the job that stored the mesh as its output.",
"type": "integer"
},
"filename": {
"description": "The filename of the mesh file (STL, PLY).",
"type": "string"
},
"filenames": {
"description": "Optional. Filenames of additional files.",
"type": "array",
"items": {
"type": "string"
}
},
"additional_files": {
"description": "Optional. References to additional files.",
"type": "array",
"items": {
"$ref": "#/definitions/parameter_type_foreign_file"
}
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"job_serial",
"filename"
]
},
{
"properties": {
"type": {},
"source": {
"const": "userdata"
},
"virtualpath": {
"description": "The virtualpath of the mesh. Usually only used for @xfuserdata mappings.",
"type": "string"
},
"filename": {
"description": "The filename of the mesh.",
"type": "string"
},
"additional_files": {
"description": "Optional. References to additional files.",
"type": "array",
"items": {
"$ref": "#/definitions/parameter_type_foreign_file"
}
}
},
"additionalProperties": false,
"required": [
"type",
"source",
"virtualpath",
"filename"
]
}
]
}
}
}