LCOV - code coverage report
Current view: top level - frmts/openjpeg - openjpegdataset.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 8 10 80.0 %
Date: 2024-05-03 15:49:35 Functions: 1 1 100.0 %

          Line data    Source code
       1             : /******************************************************************************
       2             :  *
       3             :  * Author:   Aaron Boxer, <boxerab at protonmail dot com>
       4             :  *
       5             :  ******************************************************************************
       6             :  * Copyright (c) 2023, Grok Image Compression Inc.
       7             :  *
       8             :  * Permission is hereby granted, free of charge, to any person obtaining a
       9             :  * copy of this software and associated documentation files (the "Software"),
      10             :  * to deal in the Software without restriction, including without limitation
      11             :  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
      12             :  * and/or sell copies of the Software, and to permit persons to whom the
      13             :  * Software is furnished to do so, subject to the following conditions:
      14             :  *
      15             :  * The above copyright notice and this permission notice shall be included
      16             :  * in all copies or substantial portions of the Software.
      17             :  *
      18             :  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
      19             :  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
      20             :  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
      21             :  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
      22             :  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
      23             :  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
      24             :  * DEALINGS IN THE SOFTWARE.
      25             :  ****************************************************************************/
      26             : 
      27             : #include "jp2opjlikedataset.h"
      28             : #include "jp2opjlikedataset.cpp"
      29             : 
      30             : #include "opjdatasetbase.h"
      31             : #include "openjpegdrivercore.h"
      32             : 
      33             : /************************************************************************/
      34             : /*                      GDALRegister_JP2OpenJPEG()                      */
      35             : /************************************************************************/
      36             : 
      37           8 : void GDALRegister_JP2OpenJPEG()
      38             : {
      39           8 :     if (!GDAL_CHECK_VERSION("JP2OpenJPEG driver"))
      40           0 :         return;
      41             : 
      42           8 :     if (GDALGetDriverByName(DRIVER_NAME) != nullptr)
      43           0 :         return;
      44             : 
      45           8 :     GDALDriver *poDriver = new GDALDriver();
      46           8 :     OPENJPEGDriverSetCommonMetadata(poDriver);
      47             : 
      48           8 :     poDriver->pfnOpen =
      49             :         JP2OPJLikeDataset<OPJCodecWrapper, JP2OPJDatasetBase>::Open;
      50           8 :     poDriver->pfnCreateCopy =
      51             :         JP2OPJLikeDataset<OPJCodecWrapper, JP2OPJDatasetBase>::CreateCopy;
      52             : 
      53           8 :     GetGDALDriverManager()->RegisterDriver(poDriver);
      54             : }

Generated by: LCOV version 1.14