# Interface `input`

The input interface for the `execute` method of tools. It provides the inputs to the Tool execution, such as the data to analyze and results from parent tools or referenced tools.

See also `output` for setting results of a tool or adding graphical overlays.

input:getImage()
  Return type:

    `Image`

  Get an intensity image.

input:getJobInfo()
  Return type:

    `string`, `string`

  Get the id and name of the current job.

input:getProviderData(dataType)
  Argument:

    - dataType (`Nova.Types.DataComponent`)

  Return type:

    `Image`

  Return the provider data of the specified type, if available.

input:getReferenceData(dataType)
  Argument:

    - dataType (`Nova.Types.DataComponent`)

  Return type:

    `Image`

  Return the reference data of the specified type, if available.

input:getResult(resultReference)
  Argument:

    - resultReference (`string`)

  Return type:

    `any`

  Return the value for the referenced result on the form `ToolClass:Num/ResultName`.

  To ensure the tool has executed, the `resultReference` argument should be from a `ResultReference`.

input:getTransform()
  Return type:

    `Transform`

  Deprecated use `input.getTransform2D` instead.

  Get the 2D transform to apply to regions (see `parameters.getRegion`).

  Using `input.getTransformedRegion` is often more practical.

input:getTransform2D()
  Return type:

    `Transform`

  Get the 2D transform to apply to regions (see `parameters.getRegion`).

  Using `input.getTransformedRegion` is often more practical.

input:getTransform3D()
  Return type:

    `Transform`

  Get the 3D transform to apply to regions.

  Using `input.getTransformedRegion` is often more practical.

input:getTransformedRegion()
  Return type:

    `Shape.Composite?`, `boolean`, `table?`

  Returns a `Shape.Composite` of the region shapes for the calling tool, transformed by the transform from a parent tool (if any).

  The second return value is a boolean that is true if all tool regions are negative. It is recommended to directly set a fail result in this case.

  The third result is a table with {minHeightRange, maxHeightRange} for the tool regions. It is only returned when the tool has registered support for 3D regions.

input:hasProviderData(dataType)
  Argument:

    - dataType (`Nova.Types.DataComponent`)

  Return type:

    `boolean`

  True if the input has provider data of the specified type.

input:hasReferenceData(dataType)
  Argument:

    - dataType (`Nova.Types.DataComponent`)

  Return type:

    `boolean`

  True if reference data has been stored for the current job.

input:isReferenceDataChanged()
  Return type:

    `boolean`

  True if the reference data has changed since the previous call to `execute`.

input:parentFail()
  Return type:

    `boolean`