.. role:: ts-api-decorator

##############
MeasureManager
##############

.. container:: ts-api-section

   .. js:class:: MeasureManager

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



.. container:: api-index-section

   .. rubric:: Methods

   .. rst-class:: api-index-list-item api-kind-method api-parent-kind-class

   * :js:meth:`~MeasureManager.addMeasurement`
   * :js:meth:`~MeasureManager.exportMarkup`
   * :js:meth:`~MeasureManager.finalizeMeasurement`
   * :js:meth:`~MeasureManager.getAllMeasurements`
   * :js:meth:`~MeasureManager.getMeasurementColor`
   * :js:meth:`~MeasureManager.getMeasurementEdgeColor`
   * :js:meth:`~MeasureManager.loadData`
   * :js:meth:`~MeasureManager.removeAllMeasurements`
   * :js:meth:`~MeasureManager.removeLastMeasurement`
   * :js:meth:`~MeasureManager.removeMeasurement`
   * :js:meth:`~MeasureManager.setMeasurementColor`
   * :js:meth:`~MeasureManager.setMeasurementEdgeColor`





------------

Methods
=======

.. rst-class:: ts-api-section

addMeasurement
--------------

.. js:method:: MeasureManager.addMeasurement( measureItem)

   :param measureItem: None
   :type measureItem: MeasureMarkup


   Adds a new Measurement to the Measure Manager


   :rtype: string

.. rst-class:: ts-api-section

exportMarkup
------------

.. js:method:: MeasureManager.exportMarkup()





   :returns: JSON Array with measurement markup


   :rtype: [object]

.. rst-class:: ts-api-section

finalizeMeasurement
-------------------

.. js:method:: MeasureManager.finalizeMeasurement( measureItem)

   :param measureItem: None
   :type measureItem: MeasureMarkup


   Triggers a measurementCreated callback


   :rtype: void

.. rst-class:: ts-api-section

getAllMeasurements
------------------

.. js:method:: MeasureManager.getAllMeasurements()



   Return an array of measurement items.

   :returns: array of all measurement items.


   :rtype: [MeasureMarkup]

.. rst-class:: ts-api-section

getMeasurementColor
-------------------

.. js:method:: MeasureManager.getMeasurementColor()



   Gets the current measurement color.

   :returns: color current measurement color.


   :rtype: Color

.. rst-class:: ts-api-section

getMeasurementEdgeColor
-----------------------

.. js:method:: MeasureManager.getMeasurementEdgeColor()



   Gets the current measurement edge color.

   :returns: color current measurement edge color.


   :rtype: Color

.. rst-class:: ts-api-section

loadData
--------

.. js:method:: MeasureManager.loadData( measurementDataJson)

   :param measurementDataJson: None
   :type measurementDataJson: [any]


   Loads JSON markup data


   :rtype: Promise <[boolean]>

.. rst-class:: ts-api-section

removeAllMeasurements
---------------------

.. js:method:: MeasureManager.removeAllMeasurements()



   Removes all measurement items.


   :rtype: void

.. rst-class:: ts-api-section

removeLastMeasurement
---------------------

.. js:method:: MeasureManager.removeLastMeasurement()



   Removes the most recently added measurement item.


   :rtype: void

.. rst-class:: ts-api-section

removeMeasurement
-----------------

.. js:method:: MeasureManager.removeMeasurement( measureItem)

   :param measureItem: None
   :type measureItem: MeasureMarkup


   Removes an existing measurement item.


   :rtype: void

.. rst-class:: ts-api-section

setMeasurementColor
-------------------

.. js:method:: MeasureManager.setMeasurementColor( color)

   :param color: the measurement color to set.
   :type color: Color


   Sets the current measurement color.


   :rtype: void

.. rst-class:: ts-api-section

setMeasurementEdgeColor
-----------------------

.. js:method:: MeasureManager.setMeasurementEdgeColor( color)

   :param color: the measurement edge color to set.
   :type color: Color


   Sets the current measurement edge color.


   :rtype: void

