The APIs in this section are used to parse a TIFF file and retrieve meta data. Meta data such as image dimensions, samples per pixel may be used to allocate output buffers on device memory. nvtiffStreamParseFromFile() """"""""""""""""""""""""""" Parses the TIFF file and stores the meta data in :code:`nvtiffStream_t` . **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamParseFromFile(const char *fname, nvtiffStream_t tiff_stream) **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - const char *fname - Input - Host - tiff file name on disk * - nvtiffStream_t tiff_stream - Input/Output - Host - tiff stream handle **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamPrint() """""""""""""""""""" Prints to standard output, the TIFF file meta data stored in :code:`nvtiffStream_t`. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamPrint(nvtiffStream_t tiff_stream) **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetFileInfo() """"""""""""""""""""""""""" Retrieves the image information defined in :ref:`nvtifffileinformation-label`. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamGetFileInfo(nvtiffStream_t tiff_stream, nvtiffFileInfo_t *file_info) **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - nvtiffFileInfo_t *file_info - Input/Output - Host - pointer to nvtiffFileInfo_t **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetNumImages() """"""""""""""""""""""""""" Retrieves the number of images stored in a TIFF file. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamGetNumImages(nvtiffStream_t tiff_stream, uint32_t *num_images) **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - uint32_t *num_images - Output - Host - Pointer to buffer containing number of images **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetImageInfo() """"""""""""""""""""""""""" Retrieves the image information of a given image stored in a TIFF file. Refer to :ref:`nvtiffimageinformation-label` for details on what information is retrieved. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamGetImageInfo(nvtiffStream_t tiff_stream, uint32_t image_id, nvtiffImageInfo_t *image_info) **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - uint32_t image_id - Input - Host - Image index * - nvtiffImageInfo_t *image_info - Output - Host - Pointer to nvtiffImageInfo_t **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetGeoKeyInfo() """"""""""""""""""""""""""" Retrieves the information about a geo key defined in :ref:`nvtiffgeokeys-label`. This information is useful in retrieving the values associated with the geo key. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamGetGeoKeyInfo(nvtiffStream_t tiff_stream, nvtiffGeoKey_t key, uint32_t *size, uint32_t *count, nvtiffGeoKeyDataType_t* type) **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - nvtiffGeoKey_t key - Input - Host - GeoTIFF key * - uint32_t *size - Output - Host - Pointer to size of each value (in bytes) stored in key * - uint32_t *count - Output - Host - Pointer to number of values stored in key * - nvtiffGeoKeyDataType_t *type - Output - Host - Pointer to datatype of values stored in key **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetNumberOfGeoKeys() """"""""""""""""""""""""""""""""" Retrieves the list of geokeys present in a TIFF file and their count. This information is later useful in retrieving the values associated with each geo key. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamGetNumberOfGeoKeys(nvtiffStream_t tiff_stream, nvtiffGeoKey_t* key, uint32_t *num_keys) **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - nvtiffGeoKey_t *key - Output - Host - Pointer to user allocated buffer for storing all geokeys in TIFF file (can be :code:`nullptr`, in which case only :code:`num_keys` is returned) * - uint32_t *num_keys - Output - Host - Pointer to number of geokeys stored in TIFF file **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetTagInfo() """""""""""""""""""""""""" Retrieves the information about a TIFF tag defined in :ref:`nvtifftags-label`. This information is later useful in retrieving the values associated with the TIFF tag. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamGetTagInfo(nvtiffStream_t tiff_stream, uint32_t image_id, nvtiffTag_t tiff_tag, nvtiffTagDataType_t *tag_type, uint32_t *size, uint32_t *count); **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - uint32_t image_id - Input - Host - image index * - nvtiffTag_t tiff_tag - Input - Host - tiff tag * - nvtiffTagDataType_t *tag_type, - Output - Host - Pointer to buffer containing the datatype of :code:`tiff_tag`. See :ref:`nvtifftagdatatype-label` for which datatypes are supported. * - uint32_t *size - Output - Host - Pointer to buffer containing size of individual values in :code:`tiff_tag` * - uint32_t *count - Output - Host - Pointer to buffer containing number of values in :code:`tiff_tag` **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetTagValue() """""""""""""""""""""""""" Retrieves the values stored in a TIFF tag. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamGetTagValue(nvtiffStream_t tiff_stream, uint32_t image_id, nvtiffTag_t tiff_tag, void *tag_value, uint32_t count); **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - uint32_t image_id - Input - Host - image index * - nvtiffTag_t tiff_tag - Input - Host - tiff tag * - void *tag_value - Output - Host - Pointer to buffer containing values associated with :code:`tiff_tag` * - uint32_t *count - Output - Host - Pointer to buffer containing number of values in :code:`tiff_tag` **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetGeoKey() """""""""""""""""""""""" Retrieves the values associated with a given geo key stored in a TIFF file. **Signature**: .. code-block:: cpp nvtiffStatus_t nvtiffStreamGetGeoKey(nvtiffStream_t tiff_stream, nvtiffGeoKey_t key, void *val, uint32_t count); **Parameters:** .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - nvtiffGeoKey_t key - Input - Host - geo key for which information is retrieved * - void *val - Output - Host - Pointer to user allocated buffer for storing values associated with :code:`key` * - uint32_t count - Input - Host - Number of values copied (for geo key of type :code:`NVTIFF_GEOKEY_TYPE_ASCII`, this is ignored. For geo key of type :code:`NVTIFF_GEOKEY_TYPE_SHORT`, :code:`count=1` is implied) **Returns:** :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetGeoKeyASCII() """""""""""""""""""""""""""""" Retrieves the values associated with geo key having ASCII values. **Signature**: .. code-block:: cpp nvtiffStatus_t NVTIFFAPI nvtiffStreamGetGeoKeyASCII(nvtiffStream_t tiff_stream, nvtiffGeoKey_t key, char* szStr, uint32_t szStrMaxLen) **Parameters**: .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - nvtiffGeoKey_t key - Input - Host - geo key for which information is retrieved * - char *szStr - Output - Host - Pointer to user allocated buffer containing key values * - uint32_t szStrMaxLen - Input - Host - Size of the user allocated buffer :code:`szStr` **Returns**: :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetGeoKeySHORT() """""""""""""""""""""""""""""" Retrieves the values associated with geo key having SHORT values. **Signature**: .. code-block:: cpp nvtiffStatus_t NVTIFFAPI nvtiffStreamGetGeoKeySHORT(nvtiffStream_t tiff_stream, nvtiffGeoKey_t key, unsigned short *val, uint32_t index, uint32_t count) **Parameters**: .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - nvtiffGeoKey_t key - Input - Host - geo key for which information is retrieved * - unsigned short *val - Output - Host - Pointer to user allocated buffer containing key values * - uint32_t count - Input - Host - Number of values which are required to be copied to :code:`val` * - uint32_t index - Input - Host - Index of the starting value to be copied to :code:`val` **Returns**: :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label` nvtiffStreamGetGeoKeyDOUBLE() """""""""""""""""""""""""""""" Retrieves the values associated with geo key having DOUBLE values. **Signature**: .. code-block:: cpp nvtiffStatus_t NVTIFFAPI nvtiffStreamGetGeoKeyDOUBLE(nvtiffStream_t tiff_stream, nvtiffGeoKey_t key, double *val, uint32_t index, uint32_t count) **Parameters**: .. list-table:: :header-rows: 1 :widths: 15 10 10 20 * - Parameter - Input/Output - Memory - Description * - nvtiffStream_t tiff_stream - Input - Host - tiff stream handle * - nvtiffGeoKey_t key - Input - Host - geo key for which information is retrieved * - double *val - Output - Host - Pointer to user allocated buffer containing key values * - uint32_t count - Input - Host - Number of values which are required to be copied to :code:`val` * - uint32_t index - Input - Host - Index of the starting value to be copied to :code:`val` **Returns**: :code:`nvtiffStatus_t` - An error code as specified in :ref:`nvtiffapireturncodesv2-label`