.. index:: 
  !FaceIndexer.getTemplate Method
  
.. _id3_face_face_indexer_get_template_class_method:

===============================================================================
FaceIndexer.getTemplate Method
===============================================================================

Module: :ref:`FaceIndexer<id3_face_face_indexer_class>`

Definition
----------

Retrieves a template from the face indexer by ID.


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        get_template(self, id: str) -> FaceTemplate

      **Parameters**

        .. line-block::

          ``id`` str
          :guilabel:`in` ID of the required face template.


      **Returns**

        .. line-block::

          :ref:`FaceTemplate<id3_face_face_template_class>`
          The face template.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        FaceTemplate getTemplate(String? id)

      **Parameters**

        .. line-block::

          ``id`` String
          :guilabel:`in` ID of the required face template.


      **Returns**

        .. line-block::

          :ref:`FaceTemplate<id3_face_face_template_class>`
          The face template.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public FaceTemplate GetTemplate(string id)

      **Parameters**

        .. line-block::

          ``id`` string
          :guilabel:`in` ID of the required face template.


      **Returns**

        .. line-block::

          :ref:`FaceTemplate<id3_face_face_template_class>`
          The face template.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public FaceTemplate getTemplate(String id) throws FaceException

      **Parameters**

        .. line-block::

          ``id`` String
          :guilabel:`in` ID of the required face template.


      **Returns**

        .. line-block::

          :ref:`FaceTemplate<id3_face_face_template_class>`
          The face template.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public func getTemplate(id: String) throws -> FaceTemplate

      **Parameters**

        .. line-block::

          ``id`` String
          :guilabel:`in` ID of the required face template.


      **Returns**

        .. line-block::

          :ref:`FaceTemplate<id3_face_face_template_class>`
          The face template.

      **Exceptions**

        .. line-block::

          :ref:`FaceException<id3_face_face_exception>`
          An error has occurred during Face Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3FaceIndexer_GetTemplate (
            ID3_FACE_INDEXER hFaceIndexer, 
            const char * id, 
            ID3_FACE_TEMPLATE hFaceTemplate)

      **Parameters**

        .. line-block::

          ``hFaceIndexer`` :ref:`ID3_FACE_INDEXER<id3_face_face_indexer_class>`
          :guilabel:`in` Handle to the FaceIndexer object.

          ``id`` const char *
          :guilabel:`in` ID of the required face template.

          ``hFaceTemplate`` :ref:`ID3_FACE_TEMPLATE<id3_face_face_template_class>`
          :guilabel:`out` The face template.


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3FaceError<id3_face_face_error_enum>` file for the list of possible error codes.


