Skip to content
Commits on Source (30)
FILE(GLOB SOURCE_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp")
OSSIM_SETUP_APPLICATION(ossim-header-crawl INSTALL COMMAND_LINE COMPONENT_NAME ossim SOURCE_FILES ${SOURCE_FILES})
//*******************************************************************
// Copyright (C) 2000 ImageLinks Inc.
//
// License: See top level LICENSE.txt file.
//
// Author: Ken Melero
// Originally written by Oscar Kramer.
//
// Description: This app displays a binary file in a nice
// formatted view. Very helpful for finding offsets of
// binary headers.
//
//********************************************************************
#include <iostream>
#include <vector>
#include <map>
#include <fstream>
#include <ossim/base/ossimString.h>
#include <ossim/base/ossimFilename.h>
#include <memory>
#include <sstream>
using namespace std;
// first: header file name only, second: header file's "namespace" or full path if relative
typedef map<ossimFilename, ossimFilename> HeaderMap;
typedef vector<ossimFilename> FileList;
class CppHeaderCrawler
{
public:
CppHeaderCrawler();
// Mines the CMake output files for include paths and home directory
bool loadBuild(const ossimFilename &buildDir);
// Opens each source and header to determine external header dependencies
bool scanForHeaders();
// Copies all external headers to the sandbox output directory, preserving the relative namespace
bool copyHeaders(const ossimFilename &outDir);
private:
// Scans specified file for include files to record:
bool scanFile(const ossimFilename &file);
// Finds the path needed to prepend to the includeSpec to locate the existing include file.
// Returns empty string if not found:
ossimFilename findPath(const ossimFilename &includeSpec);
ossimFilename m_ossimDevHome; // = $OSSIM_DEV_HOME as specified in CMakeCache.txt
FileList m_includeDirs; // List of all include paths searched in build
FileList m_sourceNames; // List of all OSSIM source and header files accessed in build
HeaderMap m_includePathMap; // Contains existing include path for every header file
};
void usage(char* appname)
{
cout<<"\nUsage: " << appname << " <path/to/OSSIM_BUILD_DIR> <path-to-output-dir>\n" << endl;
cout<<" Utility app to copy all external header files on a system that are referenced by the \n"
<<" OSSIM build. The headers are copied into a \"sandbox\" directory (usually appended with \n"
<<" \"include\"), preserving namespaces. This is to enable sandbox builds. See the script in\n"
<<" ossim/scripts/ocpld.sh for copying the external libraries needed.\n"<<endl;
return;
}
int main(int argc, char** argv)
{
if (argc < 3)
{
usage(argv[0]);
return 1;
}
ossimFilename buildPath = argv[1];
ossimFilename destDir = argv[2];
CppHeaderCrawler crawler;
if (!crawler.loadBuild(buildPath))
return -1;
if (!crawler.scanForHeaders())
return -1;
if (!crawler.copyHeaders(destDir))
return -1;
return 0;
}
CppHeaderCrawler::CppHeaderCrawler()
{
}
bool CppHeaderCrawler::loadBuild(const ossimFilename &build_dir)
{
static const string OSSIM_DEV_HOME_STR = "OSSIM_DEV_HOME:";
ossimString line;
// Check environment for OSSIM_DEV_HOME:
const char* envVar = getenv("OSSIM_DEV_HOME");
if (envVar)
{
m_ossimDevHome = envVar;
}
else
{
// Checkout the CMakeCache.txt to mine it for OSSIM_DEV_HOME:
ossimFilename cmakeCacheFile = build_dir + "/CMakeCache.txt";
ifstream f(cmakeCacheFile.string());
if (f.fail())
{
cout << "Failed file open for CMake file: " << cmakeCacheFile << endl;
return false;
}
// Loop to read read one line at a time to find OSSIM_DEV_HOME:
while (getline(f, line))
{
if (!line.contains(OSSIM_DEV_HOME_STR))
continue;
m_ossimDevHome = line.after("=");
break;
}
f.close();
}
if (m_ossimDevHome.empty())
{
cout << "Could not determine OSSIM_DEV_HOME. This should not happen!" << endl;
return false;
}
// Now read the cmake-generated list files. First the include directories:
ossimFilename cmakeIncludeDirs (build_dir.dirCat("CMakeIncludeDirs.txt"));
ifstream f(cmakeIncludeDirs.string());
if (f.fail())
{
cout << "Failed file open for CMake file: " << cmakeIncludeDirs << endl;
return false;
}
while (getline(f, line))
{
if (!line.contains(m_ossimDevHome))
{
cout << "Adding include path <" << line << ">" << endl;
m_includeDirs.emplace_back(line);
}
}
f.close();
// Read list of sources and headers included in the build:
ossimFilename cmakeFilenames (build_dir.dirCat("CMakeFileNames.txt"));
f.open(cmakeFilenames.string());
if (f.fail())
{
cout << "Failed file open for CMake file: " << cmakeFilenames << endl;
return false;
}
while (getline(f, line))
{
cout << "Adding source/header file <" << line << ">" << endl;
m_sourceNames.emplace_back(line);
}
f.close();
return true;
}
bool CppHeaderCrawler::scanForHeaders()
{
// First find all files that match pattern:
for (auto &sourceName : m_sourceNames)
{
scanFile(sourceName);
}
return true;
}
bool CppHeaderCrawler::scanFile(const ossimFilename& sourceName)
{
static const ossimString INCLUDE_STRING = "#include ";
static const size_t SIZE_INCLUDE_STRING = INCLUDE_STRING.length();
// The file may be an absolute path or may need to be searched among include paths:
// Open one file:
ifstream f(sourceName.string());
if (f.fail())
{
cout << "Failed file open for: " << sourceName << endl;
return false;
}
cout << "Scanning file: " << sourceName << endl;
bool foundInclude = false;
int noIncludeCount = 0;
ossimString lineOfCode;
// Loop to read read one line at a time to check for includes:
while (getline(f, lineOfCode) && (noIncludeCount < 10))
{
ossimString substring(lineOfCode.substr(0, SIZE_INCLUDE_STRING));
if (substring != INCLUDE_STRING)
{
if (foundInclude)
noIncludeCount++;
continue;
}
foundInclude = true;
noIncludeCount = 0;
// Get the include file path/name. Determine if relative or "namespaced". Truly relative
// include spec need not be copied to destination directory since the shall be present with
// the source build anyway.
ossimString includeSpec = lineOfCode.after(INCLUDE_STRING);
includeSpec.trim();
if (includeSpec.empty())
continue;
if (includeSpec[0] == '"')
{
// Relative. Some people are sloppy and use quoted header file spec even when it is really
// namespaced, so need to search relative first:
includeSpec = includeSpec.after("\"").before("\""); // stop before second quote (in case comments follow)
ossimFilename pathFile = sourceName.path().dirCat(includeSpec);
if (pathFile.exists())
continue;
}
else
{
includeSpec = includeSpec.after("<").before(">"); // stop before second quote (in case comments follow)
}
// Search the namespaced include spec list if already entered:
auto entry = m_includePathMap.find(includeSpec);
if (entry != m_includePathMap.end())
continue;
// Exclude copying headers that are in the source tree (not external):
auto sourcePath = m_sourceNames.begin();
for (; sourcePath != m_sourceNames.end(); ++sourcePath)
{
if (sourcePath->contains(includeSpec))
break;
}
if (sourcePath!=m_sourceNames.end())
continue;
// First time this external header has been encountered, Find it on the system and save the
// associated include path and namespace portion:
ossimFilename path = findPath(includeSpec);
if (!path.empty())
{
cout << "Inserting " << includeSpec << endl;
m_includePathMap.emplace(includeSpec, path);
}
// Now recursion into the rabbit hole of header dependencies:
ossimFilename fullPathFile = path.dirCat(includeSpec);
if (fullPathFile.ext().empty())
continue; // System include should be on target already
scanFile(fullPathFile);
}
f.close();
return true;
}
bool CppHeaderCrawler::copyHeaders(const ossimFilename& outputDir)
{
ossimFilename path, existingLocation, newLocation;
for (auto &header : m_includePathMap)
{
// Check existence of header on system:
existingLocation = header.second.dirCat(header.first);
if (!existingLocation.isFile())
{
cout << "ERROR: Could not find <" << existingLocation << ">. Header was not copied." << endl;
continue;
}
// Copy the file to the output directory:
newLocation = outputDir.dirCat(header.first);
ossimFilename newDir (newLocation.path());
ossimFilename newFile(newLocation.file());
if (!newDir.createDirectory())
{
cout << "ERROR: Could not create directory <" << newDir << ">. Check permissions." << endl;
return false;
}
existingLocation.copyFileTo(newLocation);
cout << "Copied <" << header.first << ">"<< endl;
}
return true;
}
ossimFilename CppHeaderCrawler::findPath(const ossimFilename &file)
{
ossimFilename fullPath, result;
for (auto &path: m_includeDirs)
{
fullPath = path.dirCat(file);
if (fullPath.exists())
{
result = path;
break;
}
}
return result;
}
//*******************************************************************
//
// License: LGPL
// License: MIT
//
// See LICENSE.txt file in the top level directory for more details.
//
......
......@@ -35,6 +35,9 @@ INCLUDE(OssimVersion)
INCLUDE(OssimUtilities)
INCLUDE(OssimCommonVariables)
FILE(REMOVE ${CMAKE_INCLUDE_DIRS_FILE})
FILE(REMOVE ${CMAKE_FILENAMES_FILE})
IF(NOT APPLE)
cmake_minimum_required(VERSION 2.6)
ELSE(NOT APPLE)
......
......@@ -86,6 +86,7 @@ if (MSP_INCLUDE_DIRS)
# These are optional. Include only if present:
FIND_MSP_LIBRARY(MSPsupportdata DUMMY_ARG)
FIND_MSP_LIBRARY(MSPHardCopyService DUMMY_ARG)
FIND_MSP_LIBRARY(MSPmiisd DUMMY_ARG)
if( LIBS_OK )
set(MSP_FOUND "YES")
......
......@@ -32,9 +32,12 @@
find_path(OPENCV_INCLUDE_DIR opencv/cv.hpp PATHS ${OPENCV_HOME}/include)
macro(FIND_OPENCV_LIBRARY MYLIBRARY MYLIBRARYNAME)
# Force first look in OPENCV_HOME, then use CMAKE paths if not found
find_library( ${MYLIBRARY}
NAMES "${MYLIBRARYNAME}${OPENCV_RELEASE_POSTFIX}"
PATHS ${OPENCV_HOME}/lib ${OPENCV_HOME}/share/OpenCV/3rdparty/lib )
PATHS ${OPENCV_HOME}/lib ${OPENCV_HOME}/share/OpenCV/3rdparty/lib
NO_DEFAULT_PATHS)
find_library( ${MYLIBRARY} NAMES "${MYLIBRARYNAME}${OPENCV_RELEASE_POSTFIX}")
endmacro(FIND_OPENCV_LIBRARY MYLIBRARY MYLIBRARYNAME)
# Required
......
......@@ -23,6 +23,7 @@ FIND_PATH(OPENJPEG_INCLUDE_DIR openjpeg.h
openjpeg
openjpeg-1.5
openjpeg-2.1
openjpeg-2.3
DOC "Location of OpenJPEG Headers"
)
FIND_LIBRARY(MINIZIP_LIBRARY NAMES ${MINIZIP_NAMES} )
......
......@@ -218,7 +218,6 @@ MACRO(OSSIM_ADD_COMMON_SETTINGS)
SET(INSTALL_FRAMEWORK_DIR "Frameworks")
SET(INSTALL_RUNTIME_DIR "bin")
SET(INSTALL_INCLUDE_DIR "include")
set(INSTALL_LIBRARY_DIR lib${LIBSUFFIX} CACHE PATH "Installation directory for libraries")
set(INSTALL_ARCHIVE_DIR lib${LIBSUFFIX} CACHE PATH "Installation directory for archive")
mark_as_advanced(LIBSUFFIX)
......@@ -280,6 +279,8 @@ MACRO(OSSIM_ADD_COMMON_SETTINGS)
OPTION(BUILD_OMS "Set to ON to build the oms api library." ON)
OPTION(BUILD_OSSIM_WMS "Set to ON to build the wms api library." ON)
SET(CMAKE_INCLUDE_DIRS_FILE "${CMAKE_BINARY_DIR}/CMakeIncludeDirs.txt")
SET(CMAKE_FILENAMES_FILE "${CMAKE_BINARY_DIR}/CMakeFileNames.txt")
ENDMACRO(OSSIM_ADD_COMMON_SETTINGS)
......
......@@ -200,6 +200,9 @@ MACRO(OSSIM_SETUP_APPLICATION)
SETUP_LINK_LIBRARIES()
OSSIM_SAVE_INCLUDE_DIRECTORIES()
OSSIM_SAVE_FILENAMES()
IF(APPLICATION_INSTALL)
IF(APPLE)
INSTALL(TARGETS ${TARGET_TARGETNAME} RUNTIME DESTINATION ${INSTALL_RUNTIME_DIR} BUNDLE DESTINATION ${INSTALL_RUNTIME_DIR} COMPONENT ${APPLICATION_COMPONENT_NAME})
......@@ -211,6 +214,7 @@ MACRO(OSSIM_SETUP_APPLICATION)
SET_TARGET_PROPERTIES(${TARGET_TARGETNAME} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${BUILD_RUNTIME_DIR}")
ENDMACRO(OSSIM_SETUP_APPLICATION)
#####################################################################################################
......@@ -337,6 +341,10 @@ MACRO(OSSIM_LINK_LIBRARY)
ARCHIVE DESTINATION ${INSTALL_ARCHIVE_DIR} COMPONENT ${LINK_COMPONENT_NAME}-dev)
ENDIF(LINK_INSTALL_HEADERS)
ENDIF(LINK_INSTALL_LIB)
OSSIM_SAVE_INCLUDE_DIRECTORIES()
OSSIM_SAVE_FILENAMES()
ENDMACRO(OSSIM_LINK_LIBRARY)
MACRO(OSSIM_ADD_COMMON_MAKE_UNINSTALL)
......@@ -358,3 +366,33 @@ MACRO(OSSIM_ADD_COMMON_MAKE_UNINSTALL)
ENDIF(EXISTS ${OSSIM_CMAKE_UNINSTALL_CONFIG})
# ENDIF(NOT TEST_UNINSTALL)
ENDMACRO(OSSIM_ADD_COMMON_MAKE_UNINSTALL)
####################################################################################################
# Writes all include directory paths to a central file for later parsing dependencies
####################################################################################################
MACRO(OSSIM_SAVE_INCLUDE_DIRECTORIES)
GET_DIRECTORY_PROPERTY(include_dir_list INCLUDE_DIRECTORIES)
FOREACH(item ${include_dir_list})
FILE(APPEND ${CMAKE_INCLUDE_DIRS_FILE} "${item}\n" )
ENDFOREACH()
ENDMACRO(OSSIM_SAVE_INCLUDE_DIRECTORIES)
####################################################################################################
# Caches all source file names to a central file for later parsing dependencies
####################################################################################################
MACRO(OSSIM_SAVE_FILENAMES)
#GET_DIRECTORY_PROPERTY(lib_sources LINK_SOURCES)
FOREACH(item ${LINK_SOURCE_FILES})
FILE(APPEND ${CMAKE_FILENAMES_FILE} "${item}\n" )
ENDFOREACH()
#GET_DIRECTORY_PROPERTY(app_sources APPLICATION_SOURCES)
FOREACH(item ${APPLICATION_SOURCE_FILES})
FILE(APPEND ${CMAKE_FILENAMES_FILE} "${CMAKE_CURRENT_SOURCE_DIR}/${item}\n" )
ENDFOREACH()
FOREACH(item ${LINK_HEADERS})
FILE(APPEND ${CMAKE_FILENAMES_FILE} "${item}\n" )
ENDFOREACH()
ENDMACRO(OSSIM_SAVE_FILENAMES)
OSSIM for Debian
----------------
The ossim subdirectory in the upstream tarball doesn't contain the
build system. This is included in the separate ossim_package_support
subdirectory which is excluded from the repacked upstream tarball.
When the ossim package is updated to a new upstream release, the cmake
patch needs to be updated to include the recent files from the
CMakeModules directory.
ossim (2.4.0-1~exp1) experimental; urgency=medium
* Team upload.
* New upstream release.
* Drop GCC 8 patch, included upstream.
-- Bas Couwenberg <sebastic@debian.org> Wed, 30 May 2018 07:03:08 +0200
ossim (2.3.2-2) unstable; urgency=medium
* Team upload.
* Strip trailing whitespace from rules file.
* Add upstream patch to fix FTBFS with GCC 8.
(closes: #897829)
-- Bas Couwenberg <sebastic@debian.org> Tue, 29 May 2018 15:50:41 +0200
ossim (2.3.2-1) unstable; urgency=medium
* Team upload.
* New upstream release.
* Bump Standards-Version to 4.1.4, no changes.
* Refresh patches.
* Update spelling-errors.patch for new typos.
-- Bas Couwenberg <sebastic@debian.org> Tue, 01 May 2018 16:44:41 +0200
ossim (2.3.1-1) unstable; urgency=medium
* Team upload.
* New upstream release.
* Update Vcs-* URLs for Salsa.
* Remove obsolete README.source.
-- Bas Couwenberg <sebastic@debian.org> Thu, 05 Apr 2018 07:22:08 +0200
ossim (2.3.0-4) unstable; urgency=medium
* Team upload.
* Fix OTB versions in Breaks.
-- Bas Couwenberg <sebastic@debian.org> Thu, 08 Mar 2018 07:36:17 +0100
ossim (2.3.0-3) unstable; urgency=medium
* Team upload.
* Add Breaks for OTB libraries that depend on libossim1.
See: #892212
-- Bas Couwenberg <sebastic@debian.org> Wed, 07 Mar 2018 10:05:01 +0100
ossim (2.3.0-2) unstable; urgency=medium
* Team upload.
* Drop shlibs file for libossim1, rely on dh_makeshlibs -V.
-- Bas Couwenberg <sebastic@debian.org> Tue, 06 Mar 2018 20:50:04 +0100
ossim (2.3.0-1) unstable; urgency=medium
* Team upload.
* Move from experimental to unstable.
-- Bas Couwenberg <sebastic@debian.org> Tue, 06 Mar 2018 10:51:52 +0100
ossim (2.3.0-1~exp1) experimental; urgency=medium
* Team upload.
......
......@@ -14,9 +14,9 @@ Build-Depends: cmake (>= 2.8),
libpng-dev,
libtiff-dev,
zlib1g-dev
Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/ossim.git
Vcs-Git: https://anonscm.debian.org/git/pkg-grass/ossim.git -b experimental
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/debian-gis-team/ossim
Vcs-Git: https://salsa.debian.org/debian-gis-team/ossim.git -b experimental
Homepage: https://trac.osgeo.org/ossim/
Package: libossim1
......@@ -24,7 +24,9 @@ Architecture: any
Section: libs
Depends: ${shlibs:Depends},
${misc:Depends}
Breaks: libossim1v5 (<< 1.8.20.3)
Breaks: libossim1v5 (<< 1.8.20.3),
libotbossimadapters-6.4-1 (<= 6.4.0+dfsg-1),
libotbossimplugins-6.4-1 (<= 6.4.0+dfsg-1)
Replaces: libossim1v5 (<< 1.8.20.3)
Description: OSSIM library -- shared library
Open Source Software Image Map (OSSIM) is a high performance engine for
......
libossim 1 libossim1 (>= 1.8)
......@@ -88,8 +88,8 @@ ossimImageMosaic. Default: ossimImageMosaic.
Example \fB\-\-combiner\-type\fR ossimImageMosaic
.TP
\fB\-\-contrast\fR
<constrast>
Apply constrast to input image(s). Valid range:
<contrast>
Apply contrast to input image(s). Valid range:
\fB\-1\fR.0 to 1.0
.TP
\fB\-\-cut\-bbox\-ll\fR
......
......@@ -9,6 +9,8 @@ Description: Fix spelling errors.
* prefered -> preferred
* repaced -> replaced
* explicitely -> explicitly
* constrast -> contrast
* seperated -> separated
Author: Bas Couwenberg <sebastic@debian.org>
--- a/src/base/ossimDatumFactory.inc
......@@ -99,7 +101,7 @@ Author: Bas Couwenberg <sebastic@debian.org>
return outStr;
--- a/src/util/ossimChipperUtil.cpp
+++ b/src/util/ossimChipperUtil.cpp
@@ -207,7 +207,7 @@ void ossimChipperUtil::addArguments(ossi
@@ -208,11 +208,11 @@ void ossimChipperUtil::addArguments(ossi
au->addCommandLineOption("--central-meridian","<central_meridian_in_decimal_degrees>\nNote if set this will be used for the central meridian of the projection. This can be used to lock the utm zone.");
......@@ -108,6 +110,38 @@ Author: Bas Couwenberg <sebastic@debian.org>
au->addCommandLineOption("--color-table","<color-table.kwl>\nhillshade or color-relief option - Keyword list containing color table for color-relief option.");
- au->addCommandLineOption( "--contrast", "<constrast>\nApply constrast to input image(s). Valid range: -1.0 to 1.0" );
+ au->addCommandLineOption( "--contrast", "<contrast>\nApply contrast to input image(s). Valid range: -1.0 to 1.0" );
au->addCommandLineOption("--cut-bbox-xywh", "<x>,<y>,<width>,<height>\nSpecify a comma separated bounding box.");
@@ -245,7 +245,7 @@ void ossimChipperUtil::addArguments(ossi
au->addCommandLineOption("--exaggeration", "<factor>\nMultiplier for elevation values when computing surface normals. Has the effect of lengthening shadows for oblique lighting.\nRange: .0001 to 50000, Default = 1.0");
- au->addCommandLineOption("--fullres-xys", "<full res center x>,<full res center y>,<scale>[,<scale>]\nSpecify a full resolution x,y point (Used as pivot and center cut) and scale, comma seperated with no spaces. If two scales are specified then first is x and second is y else x and y are set to equal scales");
+ au->addCommandLineOption("--fullres-xys", "<full res center x>,<full res center y>,<scale>[,<scale>]\nSpecify a full resolution x,y point (Used as pivot and center cut) and scale, comma separated with no spaces. If two scales are specified then first is x and second is y else x and y are set to equal scales");
au->addCommandLineOption("-h or --help", "Display this help and exit.");
@@ -1881,7 +1881,7 @@ ossimRefPtr<ossimSingleImageChain> ossim
setupChainHistogram( ic );
}
- // Brightness constrast setup:
+ // Brightness contrast setup:
if ( hasBrightnesContrastOperation() )
{
// Assumption bright contrast filter in chain:
@@ -2066,7 +2066,7 @@ ossimRefPtr<ossimSingleImageChain> ossim
setupChainHistogram( ic , std::make_shared<ossimSrcRecord>(rec));
}
- // Brightness constrast setup:
+ // Brightness contrast setup:
if ( hasBrightnesContrastOperation() )
{
// Assumption bright contrast filter in chain:
--- a/src/util/ossimHillshadeTool.cpp
+++ b/src/util/ossimHillshadeTool.cpp
@@ -233,7 +233,7 @@ void ossimHillshadeTool::setUsage(ossimA
......@@ -174,3 +208,27 @@ Author: Bas Couwenberg <sebastic@debian.org>
ossimGpt origin;
if (!getProjectionOrigin(origin))
origin = m_aoiGroundRect.midPoint();
--- a/include/ossim/imaging/ossimSingleImageChain.h
+++ b/include/ossim/imaging/ossimSingleImageChain.h
@@ -473,7 +473,7 @@ public:
void setBrightnessContrastFlag(bool flag);
/**
- * @brief Get the brightness constrast flag.
+ * @brief Get the brightness contrast flag.
* @return true or false.
*/
bool getBrightnessContrastFlag() const;
--- a/share/ossim/templates/ossim_preferences_template
+++ b/share/ossim/templates/ossim_preferences_template
@@ -687,8 +687,8 @@ tfrd_iamp_file: $(OSSIM_INSTALL_PREFIX)/
// allows on to specify configuration options and parsing for the hdf5 plugin
// In this example we have only the Radiance file supported for VIIRS data
// to get a listing of dataset use the ossim-info -d on any hdf5 dataset file
-// and look at the top for the dataset comma seperated list of dataset paths.
-// You can add a comma seperated list for renderable_datasets and only those will show
+// and look at the top for the dataset comma separated list of dataset paths.
+// You can add a comma separated list for renderable_datasets and only those will show
// up in an ossim-info
//
hdf5.options.max_recursion_level: 8
......@@ -61,4 +61,3 @@ override_dh_install:
override_dh_makeshlibs:
dh_makeshlibs -V
//---
// File: ossimFileInfoInterface.h
//
// License: MIT
//
// Description: Class ossimFileInfoInterface.
//
// Interface class for file info things. Written for stream code from url,
// e.g. AWS ossim::S3IStream.
//
//---
// $Id$
#ifndef ossimFileInfoInterface_HEADER
#define ossimFileInfoInterface_HEADER 1
#include <ossim/base/ossimConstants.h>
/** @class ossimFileInfoInterface */
class ossimFileInfoInterface
{
public:
/** @brief virtual destructor. */
virtual ~ossimFileInfoInterface(){}
/**
* @brief Pure virtual file size method. Derived classed must implement.
* @return File size in bytes.
*/
virtual ossim_int64 getFileSize() const = 0;
};
#endif /* #ifndef ossimFileInfoInterface_HEADER */
......@@ -8,6 +8,7 @@
#define ossimRefPtr_HEADER
#include <ossim/base/ossimConstants.h>
#include <stddef.h>
#include <cstddef>
template<class T> class ossimRefPtr
{
......@@ -100,20 +101,20 @@ template<typename _Tp1, typename _Tp2> inline bool
operator==(const ossimRefPtr<_Tp1>& __a, const ossimRefPtr<_Tp2>& __b) noexcept
{ return __a.get() == __b.get(); }
template<typename _Tp> inline bool operator==(const ossimRefPtr<_Tp>& __a, nullptr_t) noexcept
template<typename _Tp> inline bool operator==(const ossimRefPtr<_Tp>& __a, std::nullptr_t) noexcept
{ return !__a; }
template<typename _Tp> inline bool operator==(nullptr_t, const ossimRefPtr<_Tp>& __a) noexcept
template<typename _Tp> inline bool operator==(std::nullptr_t, const ossimRefPtr<_Tp>& __a) noexcept
{ return !__a; }
template<typename _Tp1, typename _Tp2> inline bool
operator!=(const ossimRefPtr<_Tp1>& __a, const ossimRefPtr<_Tp2>& __b) noexcept
{ return __a.get() != __b.get(); }
template<typename _Tp> inline bool operator!=(const ossimRefPtr<_Tp>& __a, nullptr_t) noexcept
template<typename _Tp> inline bool operator!=(const ossimRefPtr<_Tp>& __a, std::nullptr_t) noexcept
{ return (bool)__a; }
template<typename _Tp> inline bool operator!=(nullptr_t, const ossimRefPtr<_Tp>& __a) noexcept
template<typename _Tp> inline bool operator!=(std::nullptr_t, const ossimRefPtr<_Tp>& __a) noexcept
{ return (bool)__a; }
......
......@@ -16,6 +16,7 @@
#include <ossim/base/ossimIpt.h>
#include <ossim/base/ossimOutputSource.h>
#include <ossim/imaging/ossimPixelFlipper.h>
#include <ossim/imaging/ossimMemoryImageSource.h>
#include <vector>
class ossimFilename;
......@@ -123,6 +124,7 @@ protected:
ossimIpt computeImageSize(ossim_uint32 rlevel, ossimImageData* tile) const;
ossimRefPtr<ossimPixelFlipper> m_flipper;
ossimRefPtr<ossimMemoryImageSource> m_memoryImage;
vector<ossim_uint8 *> m_buffers;
vector<ossimIpt> m_bufferSizes;
ossim_uint32 m_startingResLevel;
......
//----------------------------------------------------------------------------
//
// License: MIT
//
// See LICENSE.txt file in the top level directory for more details.
//
// Description: Factory class declaration for codec(encoder/decoder).
//
//----------------------------------------------------------------------------
// $Id$
#ifndef ossimNitfCodecFactory_HEADER
#define ossimNitfCodecFactory_HEADER
#include <ossim/imaging/ossimCodecBase.h>
#include <ossim/support_data/ossimNitfImageHeader.h>
#include <mutex>
/**
* This is a convenience class that is used by the NITF handler to create the proper keywordlist
* from the TREs and then calls the CodecRegistry to actuall return and allocate a new codec
*/
class ossimNitfCodecFactory
{
public:
~ossimNitfCodecFactory();
static ossimNitfCodecFactory* instance();
ossimCodecBase* createCodec(ossimRefPtr<ossimNitfImageHeader> imageHeader);
protected:
static std::mutex m_mutex;
static ossimNitfCodecFactory* m_instance;
ossimNitfCodecFactory();
};
#endif