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

.. js:class:: MeasureManager

   This class provides an interface to measurement management related functions of the viewer.
   
   
   Index
   =====
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~MeasureManager.viewer`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :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`
   
   




Accessors
=========

.. js:method:: MeasureManager.viewer

   .. rst-class:: sig-pretty-signature
   
      | *get* viewer(): :js:class:`~IWebViewer`
   
   **Returns**\ : :js:class:`~IWebViewer`
   





Methods
=======

.. js:method:: MeasureManager.addMeasurement

   .. rst-class:: sig-pretty-signature
   
      | addMeasurement(**measureItem**\ : :js:class:`MeasureMarkup <Operators.Markup.Measure.MeasureMarkup>`\ ): *string*
   
   Adds a new Measurement to the Measure Manager
   
   **Parameters**
   
      **measureItem**\ : :js:class:`MeasureMarkup <Operators.Markup.Measure.MeasureMarkup>`
   
   
   **Returns**\ : *string*
   



.. js:method:: MeasureManager.exportMarkup

   .. rst-class:: sig-pretty-signature
   
      | exportMarkup(): *object*\ []
   
   **Returns**\ : *object*\ []
   
      JSON Array with measurement markup
   
   



.. js:method:: MeasureManager.finalizeMeasurement

   .. rst-class:: sig-pretty-signature
   
      | finalizeMeasurement(**measureItem**\ : :js:class:`MeasureMarkup <Operators.Markup.Measure.MeasureMarkup>`\ ): *void*
   
   Triggers a measurementCreated callback
   
   **Parameters**
   
      **measureItem**\ : :js:class:`MeasureMarkup <Operators.Markup.Measure.MeasureMarkup>`
   
   
   **Returns**\ : *void*
   



.. js:method:: MeasureManager.getAllMeasurements

   .. rst-class:: sig-pretty-signature
   
      | getAllMeasurements(): :js:class:`MeasureMarkup <Operators.Markup.Measure.MeasureMarkup>`\ []
   
   Return an array of measurement items.
   
   **Returns**\ : :js:class:`MeasureMarkup <Operators.Markup.Measure.MeasureMarkup>`\ []
   
      array of all measurement items.
   
   



.. js:method:: MeasureManager.getMeasurementColor

   .. rst-class:: sig-pretty-signature
   
      | getMeasurementColor(): :js:class:`~Color`
   
   Gets the current measurement color.
   
   **Returns**\ : :js:class:`~Color`
   
      color current measurement color.
   
   



.. js:method:: MeasureManager.getMeasurementEdgeColor

   .. rst-class:: sig-pretty-signature
   
      | getMeasurementEdgeColor(): :js:class:`~Color`
   
   Gets the current measurement edge color.
   
   **Returns**\ : :js:class:`~Color`
   
      color current measurement edge color.
   
   



.. js:method:: MeasureManager.loadData

   .. rst-class:: sig-pretty-signature
   
      | loadData(**measurementDataJson**\ : *any*\ []): *Promise*
   
   Loads JSON markup data
   
   **Parameters**
   
      **measurementDataJson**\ : *any*\ []
   
   
   **Returns**\ : *Promise*
   



.. js:method:: MeasureManager.removeAllMeasurements

   .. rst-class:: sig-pretty-signature
   
      | removeAllMeasurements(): *void*
   
   Removes all measurement items.
   
   **Returns**\ : *void*
   



.. js:method:: MeasureManager.removeLastMeasurement

   .. rst-class:: sig-pretty-signature
   
      | removeLastMeasurement(): *void*
   
   Removes the most recently added measurement item.
   
   **Returns**\ : *void*
   



.. js:method:: MeasureManager.removeMeasurement

   .. rst-class:: sig-pretty-signature
   
      | removeMeasurement(**measureItem**\ : :js:class:`MeasureMarkup <Operators.Markup.Measure.MeasureMarkup>`\ ): *void*
   
   Removes an existing measurement item.
   
   **Parameters**
   
      **measureItem**\ : :js:class:`MeasureMarkup <Operators.Markup.Measure.MeasureMarkup>`
   
   
   **Returns**\ : *void*
   



.. js:method:: MeasureManager.setMeasurementColor

   .. rst-class:: sig-pretty-signature
   
      | setMeasurementColor(**color**\ : :js:class:`~Color`\ ): *void*
   
   Sets the current measurement color.
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
         the measurement color to set.
   
   
   
   **Returns**\ : *void*
   



.. js:method:: MeasureManager.setMeasurementEdgeColor

   .. rst-class:: sig-pretty-signature
   
      | setMeasurementEdgeColor(**color**\ : :js:class:`~Color`\ ): *void*
   
   Sets the current measurement edge color.
   
   **Parameters**
   
      **color**\ : :js:class:`~Color`
   
         the measurement edge color to set.
   
   
   
   **Returns**\ : *void*
   





