# MeasureManager

class MeasureManager()

  This class provides an interface to measurement management related functions of the viewer.

Methods

- `addMeasurement()`

- `exportMarkup()`

- `finalizeMeasurement()`

- `getAllMeasurements()`

- `getMeasurementColor()`

- `getMeasurementEdgeColor()`

- `loadData()`

- `removeAllMeasurements()`

- `removeLastMeasurement()`

- `removeMeasurement()`

- `setMeasurementColor()`

- `setMeasurementEdgeColor()`

## Methods

### addMeasurement

MeasureManager.addMeasurement(measureItem)
  Arguments

    - measureItem (`MeasureMarkup()`) – None

  Adds a new Measurement to the Measure Manager

  Return type

    string

### exportMarkup

MeasureManager.exportMarkup()
  Returns

    JSON Array with measurement markup

  Return type

    [object]

### finalizeMeasurement

MeasureManager.finalizeMeasurement(measureItem)
  Arguments

    - measureItem (`MeasureMarkup()`) – None

  Triggers a measurementCreated callback

  Return type

    void

### getAllMeasurements

MeasureManager.getAllMeasurements()

  Return an array of measurement items.

  Returns

    array of all measurement items.

  Return type

    [MeasureMarkup]

### getMeasurementColor

MeasureManager.getMeasurementColor()

  Gets the current measurement color.

  Returns

    color current measurement color.

  Return type

    Color

### getMeasurementEdgeColor

MeasureManager.getMeasurementEdgeColor()

  Gets the current measurement edge color.

  Returns

    color current measurement edge color.

  Return type

    Color

### loadData

MeasureManager.loadData(measurementDataJson)
  Arguments

    - measurementDataJson (`[any]()`) – None

  Loads JSON markup data

  Return type

    Promise <[boolean]>

### removeAllMeasurements

MeasureManager.removeAllMeasurements()

  Removes all measurement items.

  Return type

    void

### removeLastMeasurement

MeasureManager.removeLastMeasurement()

  Removes the most recently added measurement item.

  Return type

    void

### removeMeasurement

MeasureManager.removeMeasurement(measureItem)
  Arguments

    - measureItem (`MeasureMarkup()`) – None

  Removes an existing measurement item.

  Return type

    void

### setMeasurementColor

MeasureManager.setMeasurementColor(color)
  Arguments

    - color (`Color()`) – the measurement color to set.

  Sets the current measurement color.

  Return type

    void

### setMeasurementEdgeColor

MeasureManager.setMeasurementEdgeColor(color)
  Arguments

    - color (`Color()`) – the measurement edge color to set.

  Sets the current measurement edge color.

  Return type

    void