Commit 9a0e038a authored by Marvin Smith's avatar Marvin Smith

Fixed compile warning from redefined macro.

parent 91fbe00c
...@@ -51,7 +51,6 @@ if(HAVE_OPENEXR) ...@@ -51,7 +51,6 @@ if(HAVE_OPENEXR)
endif() endif()
if(HAVE_GDAL) if(HAVE_GDAL)
add_definitions(-DHAVE_GDAL)
include_directories(SYSTEM ${GDAL_INCLUDE_DIR}) include_directories(SYSTEM ${GDAL_INCLUDE_DIR})
list(APPEND GRFMT_LIBS ${GDAL_LIBRARY}) list(APPEND GRFMT_LIBS ${GDAL_LIBRARY})
endif() endif()
......
...@@ -39,10 +39,16 @@ ...@@ -39,10 +39,16 @@
// //
//M*/ //M*/
#include "precomp.hpp" #include "precomp.hpp"
#include "grfmt_gdal.hpp"
// GDAL Macros
#include "cvconfig.h"
#ifdef HAVE_GDAL #ifdef HAVE_GDAL
// Our Header
#include "grfmt_gdal.hpp"
/// C++ Standard Libraries /// C++ Standard Libraries
#include <iostream> #include <iostream>
#include <stdexcept> #include <stdexcept>
...@@ -196,7 +202,10 @@ GdalDecoder::~GdalDecoder(){ ...@@ -196,7 +202,10 @@ GdalDecoder::~GdalDecoder(){
/** /**
* Convert data range * Convert data range
*/ */
double range_cast( const GDALDataType& gdalType, const int& cvDepth, const double& value ){ double range_cast( const GDALDataType& gdalType,
const int& cvDepth,
const double& value )
{
// uint8 -> uint8 // uint8 -> uint8
if( gdalType == GDT_Byte && cvDepth == CV_8U ){ if( gdalType == GDT_Byte && cvDepth == CV_8U ){
......
...@@ -42,16 +42,15 @@ ...@@ -42,16 +42,15 @@
#ifndef __GRFMT_GDAL_HPP__ #ifndef __GRFMT_GDAL_HPP__
#define __GRFMT_GDAL_HPP__ #define __GRFMT_GDAL_HPP__
/// OpenCV FMT Base Type
#include "grfmt_base.hpp"
/// Macro to make sure we specified GDAL in CMake /// Macro to make sure we specified GDAL in CMake
#ifdef HAVE_GDAL #ifdef HAVE_GDAL
/// C++ Libraries /// C++ Libraries
#include <iostream> #include <iostream>
/// OpenCV Libraries
#include "grfmt_base.hpp"
#include "precomp.hpp"
/// Geospatial Data Abstraction Library /// Geospatial Data Abstraction Library
#include <gdal/cpl_conv.h> #include <gdal/cpl_conv.h>
#include <gdal/gdal_priv.h> #include <gdal/gdal_priv.h>
...@@ -61,6 +60,13 @@ ...@@ -61,6 +60,13 @@
/// Start of CV Namespace /// Start of CV Namespace
namespace cv { namespace cv {
/**
* Convert GDAL Pixel Range to OpenCV Pixel Range
*/
double range_cast( const GDALDataType& gdalType,
const int& cvDepth,
const double& value );
/** /**
* Convert GDAL Palette Interpretation to OpenCV Pixel Type * Convert GDAL Palette Interpretation to OpenCV Pixel Type
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment