Skip to content
Commits on Source (8)
......@@ -16,10 +16,8 @@ using namespace std;
#include <ossim/base/ossimStdOutProgress.h>
#include <ossim/base/ossimTimer.h>
#include <ossim/base/ossimKeywordlist.h>
#include <ossim/base/ossimString.h>
#include <ossim/util/ossimToolRegistry.h>
#include <ossim/base/ossimException.h>
#include <ossim/base/ossimNotify.h>
#define CINFO ossimNotify(ossimNotifyLevel_INFO)
#define CWARN ossimNotify(ossimNotifyLevel_WARN)
......@@ -160,15 +158,11 @@ int main(int argc, char *argv[])
} while (false);
}
catch (const ossimException& e)
catch (const exception& e)
{
ossimNotify(ossimNotifyLevel_FATAL)<<e.what()<<endl;
CFATAL<<e.what()<<endl;
exit(1);
}
catch( ... )
{
CFATAL << "Caught unknown exception!" << endl;
}
if (status_ok)
exit(0);
......
......@@ -2,16 +2,12 @@
#include <ossim/base/ossimNotifyContext.h>
#include <ossim/base/ossimArgumentParser.h>
#include <ossim/base/ossimApplicationUsage.h>
#include <ossim/base/ossimTrace.h>
#include <ossim/base/ossimKeywordNames.h>
#include <ossim/base/ossimRefPtr.h>
#include <ossim/imaging/ossimImageGeometry.h>
#include <ossim/imaging/ossimImageHandler.h>
#include <ossim/imaging/ossimImageHandlerRegistry.h>
#include <ossim/projection/ossimProjectionFactoryRegistry.h>
#include <ossim/projection/ossimProjection.h>
#include <ossim/projection/ossimRpcSolver.h>
#include <sstream>
#include <ossim/base/ossimXmlDocument.h>
using namespace std;
......@@ -182,8 +178,6 @@ int main(int argc, char* argv[])
ossimNotify(ossimNotifyLevel_INFO) << "\nSolving for RPC coefficients..." << std::endl;
ossimRefPtr<ossimRpcSolver> solver = new ossimRpcSolver(true, false);
bool converged = solver->solve(imageRect, geom.get(), error);
double meanResidual = solver->getRmsError();
double maxResidual = solver->getMaxError();
rpc = solver->getRpcModel();
}
......
......@@ -34,14 +34,13 @@ find_path(OPENCV_INCLUDE_DIR opencv/cv.hpp PATHS ${OPENCV_HOME}/include)
macro(FIND_OPENCV_LIBRARY MYLIBRARY MYLIBRARYNAME)
find_library( ${MYLIBRARY}
NAMES "${MYLIBRARYNAME}${OPENCV_RELEASE_POSTFIX}"
PATHS ${OPENCV_HOME}/lib)
PATHS ${OPENCV_HOME}/lib ${OPENCV_HOME}/share/OpenCV/3rdparty/lib )
endmacro(FIND_OPENCV_LIBRARY MYLIBRARY MYLIBRARYNAME)
# Required
FIND_OPENCV_LIBRARY(OPENCV_CORE_LIBRARY opencv_core)
FIND_OPENCV_LIBRARY(OPENCV_FEATURES2D_LIBRARY opencv_features2d)
FIND_OPENCV_LIBRARY(OPENCV_FLANN_LIBRARY opencv_flann)
FIND_OPENCV_LIBRARY(OPENCV_HIGHGUI_LIBRARY opencv_highgui)
FIND_OPENCV_LIBRARY(OPENCV_IMGPROC_LIBRARY opencv_imgproc)
FIND_OPENCV_LIBRARY(OPENCV_ML_LIBRARY opencv_ml)
FIND_OPENCV_LIBRARY(OPENCV_OBJDETECT_LIBRARY opencv_objdetect)
......@@ -49,22 +48,16 @@ FIND_OPENCV_LIBRARY(OPENCV_XFEATURES2D_LIBRARY opencv_xfeatures2d)
FIND_OPENCV_LIBRARY(OPENCV_PHOTO_LIBRARY opencv_photo)
FIND_OPENCV_LIBRARY(OPENCV_VIDEO_LIBRARY opencv_video)
# Optional
FIND_OPENCV_LIBRARY(OPENCV_IMGCODECS_LIBRARY opencv_imgcodecs)
FIND_OPENCV_LIBRARY(OPENCV_CUDAARITHM_LIBRARY opencv_cudaarithm)
FIND_OPENCV_LIBRARY(OPENCV_CUDAIMGPROC_LIBRARY opencv_cudaimgproc)
FIND_OPENCV_LIBRARY(OPENCV_CUDEV_LIBRARY opencv_cudev)
set(OPENCV_LIBRARIES ${OPENCV_OBJDETECT_LIBRARY}
${OPENCV_CORE_LIBRARY}
${OPENCV_VIDEO_LIBRARY}
${OPENCV_PHOTO_LIBRARY}
${OPENCV_ML_LIBRARY}
${OPENCV_IMGPROC_LIBRARY}
${OPENCV_FLANN_LIBRARY}
${OPENCV_FEATURES2D_LIBRARY}
${OPENCV_XFEATURES2D_LIBRARY}
${OPENCV_FLANN_LIBRARY}
${OPENCV_HIGHGUI_LIBRARY}
${OPENCV_IMGPROC_LIBRARY}
${OPENCV_ML_LIBRARY}
${OPENCV_PHOTO_LIBRARY}
${OPENCV_VIDEO_LIBRARY})
${OPENCV_CORE_LIBRARY}
)
set(OPENCV_FOUND "NO")
if ( OPENCV_INCLUDE_DIR AND
......@@ -72,7 +65,6 @@ if ( OPENCV_INCLUDE_DIR AND
OPENCV_FEATURES2D_LIBRARY AND
OPENCV_XFEATURES2D_LIBRARY AND
OPENCV_FLANN_LIBRARY AND
OPENCV_HIGHGUI_LIBRARY AND
OPENCV_IMGPROC_LIBRARY AND
OPENCV_ML_LIBRARY AND
OPENCV_OBJDETECT_LIBRARY AND
......@@ -84,11 +76,35 @@ else()
message( "${OPENCV_LIBRARIES}" )
endif()
if (OPENCV_FOUND)
FIND_OPENCV_LIBRARY(OPENCV_IPPICV_LIBRARY ippicv)
if ( OPENCV_IPPICV_LIBRARY )
set( OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_IPPICV_LIBRARY} )
else()
message( WARNING "Could not find libippicv needed by OpenCV." )
endif()
FIND_OPENCV_LIBRARY(OPENCV_ILMIMF_LIBRARY IlmImf)
if ( OPENCV_ILMIMF_LIBRARY )
set( OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_ILMIMF_LIBRARY} )
else()
message( WARNING "Could not find IlmImf needed by OpenCV." )
endif()
FIND_OPENCV_LIBRARY(OPENCV_LIBTIFF_LIBRARY libtiff)
if ( OPENCV_LIBTIFF_LIBRARY )
set( OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_LIBTIFF_LIBRARY} )
else()
message( WARNING "Could not find libtiff needed by OpenCV." )
endif()
# Optional
FIND_OPENCV_LIBRARY(OPENCV_IMGCODECS_LIBRARY opencv_imgcodecs)
FIND_OPENCV_LIBRARY(OPENCV_CUDAARITHM_LIBRARY opencv_cudaarithm)
FIND_OPENCV_LIBRARY(OPENCV_CUDAIMGPROC_LIBRARY opencv_cudaimgproc)
FIND_OPENCV_LIBRARY(OPENCV_CUDEV_LIBRARY opencv_cudev)
FIND_OPENCV_LIBRARY(OPENCV_HIGHGUI_LIBRARY opencv_highgui)
set(OPENCV_GPU_FOUND "NO")
if ( OPENCV_FOUND AND
OPENCV_CUDAARITHM_LIBRARY AND
OPENCV_CUDAIMGPROC_LIBRARY AND
OPENCV_CUDEV_LIBRARY)
if ( OPENCV_CUDAARITHM_LIBRARY AND OPENCV_CUDAIMGPROC_LIBRARY AND OPENCV_CUDEV_LIBRARY)
set(OPENCV_GPU_FOUND "YES")
set(OPENCV_LIBRARIES ${OPENCV_LIBRARIES}
${OPENCV_CUDAARITHM_LIBRARY}
......@@ -99,13 +115,25 @@ else()
endif()
set(OPENCV_IMGCODECS_FOUND "NO")
if(OPENCV_FOUND AND OPENCV_IMGCODECS_LIBRARY)
if(OPENCV_IMGCODECS_LIBRARY)
set(OPENCV_IMGCODECS_FOUND "YES")
set(OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_IMGCODECS_LIBRARY})
else()
message( "Could not find optional OpenCV Image Codecs Library" )
endif()
set(OPENCV_HIGHGUI_FOUND 0)
if(OPENCV_HIGHGUI_LIBRARY)
set(OPENCV_HIGHGUI_FOUND 1)
set(OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_HIGHGUI_LIBRARY})
else()
message( "Could not find optional OpenCV HighGui Library" )
endif()
# Unfortunately, OpenCV inter-library dependency is so complicated, we just list the libs twice:
set(OPENCV_LIBRARIES ${OPENCV_LIBRARIES} ${OPENCV_LIBRARIES} )
endif()
if(OPENCV_FOUND)
message( STATUS "OPENCV_INCLUDE_DIR = ${OPENCV_INCLUDE_DIR}" )
message( STATUS "OPENCV_LIBRARIES = ${OPENCV_LIBRARIES}" )
......
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.
* New upstream release.
* Refresh patches.
-- Bas Couwenberg <sebastic@debian.org> Mon, 05 Mar 2018 19:46:24 +0100
ossim (2.2.2-1) unstable; urgency=medium
* Team upload.
......
......@@ -143,7 +143,7 @@ Author: Bas Couwenberg <sebastic@debian.org>
<< "\n Example:"
--- a/apps/ossim-rpcgen/ossim-rpcgen.cpp
+++ b/apps/ossim-rpcgen/ossim-rpcgen.cpp
@@ -42,7 +42,7 @@ int main(int argc, char* argv[])
@@ -38,7 +38,7 @@ int main(int argc, char* argv[])
argumentParser.getApplicationName() + " takes an input image and generates a "
"corresponding RPC geometry in a variety of formats. If a bounding box is specified, the "
"default output filename (based on the input filename) will be appended with the bbox spec"
......
......@@ -164,20 +164,19 @@ public:
bool operator==(const JsonParam& p) const { return (p._name == _name); }
void setValue(const Json::Value& json_node);
void setValue(void* value);
void resetValue();
/** Outputs JSON to output stream provided */
friend std::ostream& operator<<(std::ostream& out, const JsonParam& obj);
private:
void setValue(void* value);
void resetValue();
ossimString _name;
ossimString _label;
ossimString _descr;
ParamType _type;
void* _value;
std::vector<ossimString> _allowedValues; // only used for multiple-choice string parameters
};
......
......@@ -26,9 +26,9 @@ class OSSIMDLLEXPORT ossimPointBlock: public ossimDataObject
public:
typedef std::vector< ossimRefPtr<ossimPointRecord> > PointList;
ossimPointBlock(ossimSource* owner=0, ossim_uint32 fields=0);
explicit ossimPointBlock(ossimSource* owner=0, ossim_uint32 fields=0);
virtual ~ossimPointBlock();
~ossimPointBlock();
/** Returns allocated size. The pointList may contain only null points if not assigned */
virtual ossim_uint32 size() const { return (ossim_uint32)m_pointList.size(); }
......@@ -80,7 +80,7 @@ public:
virtual void initialize() {};
protected:
ossimPointBlock(const ossimPointBlock& rhs);
ossimPointBlock(const ossimPointBlock& rhs) {}
void scanForMinMax() const;
ossimPointRecord m_nullPCR;
......
......@@ -69,8 +69,8 @@ public:
* corner of the tile to grab from the image.
* Satisfies pure virtual from TileSource class.
*/
virtual ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
ossim_uint32 resLevel=0);
ossimRefPtr<ossimImageData> getTile(const ossimIrect& rect,
ossim_uint32 resLevel=0) override;
/**
* Method to get a tile.
......@@ -82,14 +82,14 @@ public:
* is undefined so caller should handle appropriately with makeBlank or
* whatever.
*/
virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
bool getTile(ossimImageData* result, ossim_uint32 resLevel=0) override;
/**
* @brief Gets bands.
* Satisfies ossimImageSource::getNumberOfInputBands pure virtual.
* @retrun Number of bands.
*/
virtual ossim_uint32 getNumberOfInputBands() const;
ossim_uint32 getNumberOfInputBands() const override;
/**
* @brief Gets lines.
......@@ -98,7 +98,7 @@ public:
* Default = 0
* @return The number of lines for specified reduced resolution level.
*/
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const;
ossim_uint32 getNumberOfLines(ossim_uint32 resLevel = 0) const override;
/**
* @brief Gets samples.
......@@ -107,7 +107,7 @@ public:
* Default = 0
* @return The number of samples for specified reduced resolution level.
*/
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const;
ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel = 0) const override;
/**
* @brief Gets tile width.
......@@ -117,7 +117,7 @@ public:
* returns the output tile width which can be different than the internal
* image tile width on disk.
*/
virtual ossim_uint32 getImageTileWidth() const;
ossim_uint32 getImageTileWidth() const override;
/**
* @brief Gets tile height.
......@@ -127,16 +127,16 @@ public:
* returns the output tile width which can be different than the internal
* image tile width on disk.
*/
virtual ossim_uint32 getImageTileHeight() const;
ossim_uint32 getImageTileHeight() const override;
/** @return The width of the output tile. */
virtual ossim_uint32 getTileWidth() const;
ossim_uint32 getTileWidth() const override;
/** @returns The height of the output tile. */
virtual ossim_uint32 getTileHeight() const;
ossim_uint32 getTileHeight() const override;
/** @return The output pixel type of the tile source. */
ossimScalarType getOutputScalarType() const;
ossimScalarType getOutputScalarType() const override;
/**
* @brief Gets entry list.
......@@ -146,51 +146,51 @@ public:
* will be needed to rasterize that data channel as well.
* @param entryList This is the list to initialize with entry indexes.
*/
virtual void getEntryList(std::vector<ossim_uint32>& entryList) const;
void getEntryList(std::vector<ossim_uint32>& entryList) const override;
virtual void getEntryNames(std::vector<ossimString>& entryNames) const;
void getEntryNames(std::vector<ossimString>& entryNames) const override;
/** @return The current entry number. */
virtual ossim_uint32 getCurrentEntry() const;
ossim_uint32 getCurrentEntry() const override;
/**
* @param entryIdx Entry number to select.
* @return true if it was able to set the current entry and false otherwise.
*/
virtual bool setCurrentEntry(ossim_uint32 entryIdx);
bool setCurrentEntry(ossim_uint32 entryIdx) override;
/** @return "point-cloud" */
virtual ossimString getShortName() const;
ossimString getShortName() const override;
/** @return "ossim point cloud to image renderer" */
virtual ossimString getLongName() const;
ossimString getLongName() const override;
/**
* Returns the image geometry object associated with this tile source or
* NULL if non defined. The geometry contains full-to-local image
* transform as well as projection (image-to-world).
*/
virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
ossimRefPtr<ossimImageGeometry> getImageGeometry() override;
/** @return Min pixel value. */
virtual double getMinPixelValue(ossim_uint32 band=0) const;
double getMinPixelValue(ossim_uint32 band) const override;
/** @return Min pixel value. */
virtual double getMaxPixelValue(ossim_uint32 band=0) const;
double getMaxPixelValue(ossim_uint32 band) const override;
/** @return Min pixel value. */
virtual double getNullPixelValue(ossim_uint32 band=0) const;
double getNullPixelValue(ossim_uint32 band) const override;
/** @return The total number of decimation levels. */
virtual ossim_uint32 getNumberOfDecimationLevels() const;
ossim_uint32 getNumberOfDecimationLevels() const override;
virtual bool saveState(ossimKeywordlist& kwl, const char* prefix=0) const;
bool saveState(ossimKeywordlist& kwl, const char* prefix) const override;
virtual bool loadState(const ossimKeywordlist& kwl, const char* prefix=0);
bool loadState(const ossimKeywordlist& kwl, const char* prefix) override;
virtual void getValidImageVertices(std::vector<ossimIpt>& validVertices,
ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER,
ossim_uint32 resLevel=0) const;
void getValidImageVertices(std::vector<ossimIpt>& validVertices,
ossimVertexOrdering ordering,
ossim_uint32 resLevel) const override;
/**
* The reader properties are:
......@@ -201,8 +201,8 @@ public:
* -- the active component ("component") as string with possible values
* "intensity", "highest", "lowest", "returns", or "rgb", respectively (case insensitive)
*/
void setProperty(ossimRefPtr<ossimProperty> property);
ossimRefPtr<ossimProperty> getProperty(const ossimString& name) const;
void setProperty(ossimRefPtr<ossimProperty> property) override;
ossimRefPtr<ossimProperty> getProperty(const ossimString& name) const override;
/**
* Permits backdoor for setting the input point cloud handler object. Useful for debug
......@@ -223,7 +223,9 @@ protected:
PcrBucket() : m_bucket(0), m_numSamples(0) {}
PcrBucket(const ossim_float32* init_value, ossim_uint32 numBands);
PcrBucket(const ossim_float32& R, const ossim_float32& G, const ossim_float32& B);
PcrBucket(const ossim_float32& init_value);
explicit PcrBucket(const ossim_float32& init_value);
~PcrBucket();
ossim_float32* m_bucket;
int m_numSamples;
......
......@@ -20,46 +20,24 @@
#include <vector>
class ossimImageData;
class ossimPointCloudUtil;
class ossimPointCloudTool;
class OSSIMDLLEXPORT ossimPointCloudUtilityFilter : public ossimImageSourceFilter
{
public:
ossimPointCloudUtilityFilter( ossimPointCloudUtil* pc_util);
ossimPointCloudUtilityFilter( ossimPointCloudTool* pc_util);
virtual ~ossimPointCloudUtilityFilter() {}
virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel=0);
virtual bool getTile(ossimImageData* result, ossim_uint32 resLevel);
ossimScalarType getOutputScalarType() const { return OSSIM_FLOAT32; }
;
virtual ossim_uint32 getNumberOfOutputBands() const { return 1; }
virtual ossimRefPtr<ossimImageGeometry> getImageGeometry();
protected:
class PcrBucket
{
public:
PcrBucket() : m_bucket(0), m_numSamples(0) {}
PcrBucket(const ossim_float32* init_value, ossim_uint32 numBands);
PcrBucket(const ossim_float32& R, const ossim_float32& G, const ossim_float32& B);
PcrBucket(const ossim_float32& init_value);
~PcrBucket();
ossim_float32* m_bucket;
int m_numSamples;
};
void initTile();
void addSample(std::map<ossim_int32, PcrBucket*>& accumulator,
ossim_int32 index,
const ossimPointRecord* sample);
void normalize(std::map<ossim_int32, PcrBucket*>& accumulator);
ossim_uint32 componentToFieldCode() const;
ossimRefPtr<ossimPointCloudUtil> m_util;
ossimRefPtr<ossimPointCloudTool> m_util;
TYPE_DATA
};
......
......@@ -83,6 +83,7 @@ public:
ossimRpcSolver(bool useElevation=false,
bool useHeightAboveMSLFlag=false);
virtual ~ossimRpcSolver(){}
/**
* This will convert any projector to an RPC model
......@@ -112,6 +113,13 @@ public:
ossimImageGeometry* geom,
const double& pixel_tolerance=0.5);
/**
* Performs iterative solve using the other solve method, but uses an image filename to
* initialize, and computes RPC over entire image rect.
*/
bool solve(const ossimFilename& imageFilename,
const double& pixel_tolerance=0.5);
/**
* takes associated image points and ground points
* and solves the coefficents for the rational polynomial for
......@@ -145,8 +153,6 @@ public:
void setValidImageRect(const ossimIrect& imageRect);
protected:
virtual ~ossimRpcSolver(){}
virtual void solveInitialCoefficients(NEWMAT::ColumnVector& coeff,
const std::vector<double>& f,
const std::vector<double>& x,
......@@ -189,7 +195,6 @@ protected:
ossimRefPtr<ossimImageGeometry> theRefGeom;
ossimRefPtr<ossimRpcModel> theRpcModel;
};
#endif
......@@ -107,6 +107,7 @@ public:
const ossimFilename& getOverviewPath() const { return m_overviewPath; }
const ossimFilename& getHistogramPath() const { return m_histogramPath; }
const ossimFilename& getMaskPath() const { return m_maskPath; }
const ossimFilename& getGeomPath() const { return m_geomPath; }
void setFilename(const ossimFilename& f);
void setEntryIndex(ossim_int32 i);
......@@ -114,6 +115,7 @@ public:
void setMask(const ossimFilename& f) { m_maskPath = f; }
void setHistogram(const ossimFilename& f) { m_histogramPath = f; }
void setHistogramOp(const ossimString& s) { m_histogramOp = s; }
void setGeom(const ossimFilename& f);
void setBands(const std::vector<ossim_uint32>& v) { m_bandList = v; }
void setWeight(const double& weight) { m_weight = weight; }
void setRgbDataBool(bool isRgbData) { m_isRgbData = isRgbData; }
......@@ -152,6 +154,7 @@ private:
ossimFilename m_overviewPath;
ossimFilename m_histogramPath;
ossimFilename m_maskPath;
ossimFilename m_geomPath;
//! The following data members allow users to render vector data
bool m_isVectorData;
......
......@@ -489,7 +489,8 @@ private:
* @param chain Chain to set up.
* @return true on success, false on error.
*/
bool setupChainHistogram( ossimRefPtr<ossimSingleImageChain>& chain) const;
bool setupChainHistogram( ossimRefPtr<ossimSingleImageChain>& chain,
std::shared_ptr<ossimSrcRecord> srcRecordPtr=0) const;
/**
* @brief Sets entry for a chain.
......
......@@ -141,7 +141,7 @@ public:
/**
* @brief Sets key OVERVIEW_TYPE_KW.
*
* Available types depens on plugins. Know types:
* Available types depends on plugins. Known types:
* ossim_tiff_box ( defualt )
* ossim_tiff_nearest
* ossim_kakadu_nitf_j2k ( kakadu plugin )
......
......@@ -469,6 +469,16 @@ public:
*/
std::ostream& outputHeight(const ossimGpt& gpt, std::ostream& out) const;
/** @brief Prints supported image file extensions to stdout. */
void printExtensions() const;
/**
* @brief Prints supported image file extensions to stream.
* @param out Output to write to out.
* @return stream
*/
std::ostream& printExtensions(std::ostream& out) const;
/** @brief Prints loaded plugins to stdout. */
void printPlugins() const;
......
......@@ -10,10 +10,8 @@
#ifndef ossimPointCloudUtil_HEADER
#define ossimPointCloudUtil_HEADER
#include <ossim/base/ossimObject.h>
#include <ossim/util/ossimTool.h>
#include <ossim/base/ossimRefPtr.h>
#include <ossim/base/ossimProcessInterface.h>
#include <ossim/base/ossimListenerManager.h>
#include <ossim/base/ossimFilename.h>
#include <ossim/base/ossimIrect.h>
#include <ossim/base/ossimArgumentParser.h>
......@@ -25,41 +23,22 @@
/**
* Utility class for generating point-cloud-derived image products
*/
class OSSIMDLLEXPORT ossimPointCloudUtil : public ossimObject,
public ossimProcessInterface,
public ossimListenerManager
class OSSIMDLLEXPORT ossimPointCloudTool : public ossimTool
{
friend class ossimPointCloudUtilityFilter;
public:
ossimPointCloudUtil();
virtual ~ossimPointCloudUtil();
ossimPointCloudTool();
~ossimPointCloudTool();
/**
* Initializes from command line arguments.
*/
bool initialize(ossimArgumentParser& ap);
bool initialize(ossimArgumentParser& ap) override;
void loadJSON(const Json::Value& json_request) override;
void saveJSON(Json::Value& json) const override;
virtual bool execute() override;
/*
* Initializes after parameter set-methods have been called (in lieu of argument parser init)
*/
protected:
bool initialize();
/**
* Returns true if successful
*/
virtual bool execute();
/**
* Sets the nominal output resolution in meters
*/
void setGSD(const double& meters_per_pixel);
virtual ossimObject* getObject() { return this; }
virtual const ossimObject* getObject() const { return this; }
virtual ossimListenerManager* getManager() { return this; };
protected:
void usage(ossimArgumentParser& ap);
void addArguments(ossimArgumentParser& ap);
bool loadPC();
......
......@@ -19,7 +19,7 @@
#include <ossim/base/ossimTrace.h>
using namespace std;
static ossimTrace traceDebug("ossimRectanglePartitioner:degug");
static ossimTrace traceDebug("ossimRectanglePartitioner:debug");
ossimRectanglePartitioner::ossimRectanglePartitioner()
{
......
......@@ -915,18 +915,16 @@ bool ossimFilterResampler::loadState(const ossimKeywordlist& kwl,
theScaleFactor.y = ossimString(lookup).toDouble();
}
ossimString minify;
lookup = kwl.find(prefix, "minify_type");
if (lookup)
{
minify = lookup;
setMinifyFilterType(lookup);
}
ossimString magnify;
lookup = kwl.find(prefix, "magnify_type");
if (lookup)
{
magnify = lookup;
setMagnifyFilterType(lookup);
}
if(fabs(theScaleFactor.x) <= FLT_EPSILON)
......@@ -941,9 +939,6 @@ bool ossimFilterResampler::loadState(const ossimKeywordlist& kwl,
theInverseScaleFactor.x = 1.0/theScaleFactor.x;
theInverseScaleFactor.y = 1.0/theScaleFactor.y;
setFilterType(getFilterType(minify),
getFilterType(magnify));
return true;
}
......
......@@ -303,12 +303,14 @@ bool ossimImageHandler::initVertices(const char* file)
kwl->add("connection_string", file, true);
if (!instream)
{
if(m_state) m_state->setValidVertices(kwl);
//if(m_state)
// m_state->setValidVertices(kwl);
return false;
}
kwl->parseStream(*instream);
if(m_state) m_state->setValidVertices(kwl);
if(m_state && kwl->getSize())
m_state->setValidVertices(kwl);
}
if (kwl->getErrorStatus() != ossimErrorCodes::OSSIM_OK)
......@@ -843,6 +845,11 @@ bool ossimImageHandler::hasOverviews() const
bool ossimImageHandler::openOverview(const ossimFilename& overview_file)
{
bool result = false;
if (traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "ossimImageHandler::openOverview(overview_file): ...entered!";
}
closeOverview();
if (overview_file != theImageFile) // Make sure we don't open ourselves.
......@@ -907,14 +914,11 @@ bool ossimImageHandler::openOverview(const ossimFilename& overview_file)
event.setObjectList(theOverview.get());
fireEvent(event);
}
else
{
if(m_state)
{
// create a null state to save the fact that we did not find any overviews
m_state->setOverviewState(std::make_shared<ossim::ImageHandlerState>());
}
}
if (traceDebug())
{
ossimNotify(ossimNotifyLevel_DEBUG)
<< "ossimImageHandler::openOverview(overview_file): ...leaving!";
}
return result;
......@@ -949,8 +953,6 @@ bool ossimImageHandler::openOverview()
if(theOverview)
{
result = true;
//---
// Set the owner in case the overview reader needs to get something
// from the it like min/max/null.
......@@ -1019,7 +1021,6 @@ bool ossimImageHandler::openOverview()
<< "\n";
}
}
if ( !result )
{
if (overviewFilename.empty() || (overviewFilename.exists() == false) )
......@@ -1045,6 +1046,7 @@ bool ossimImageHandler::openOverview()
{
overviewFilename = theSupplementaryDirectory;
overviewFilename = overviewFilename.dirCat( getFilename().file() );
}
if ( getNumberOfEntries() > 1 )
......@@ -1560,7 +1562,6 @@ void ossimImageHandler::setSupplementaryDirectory(const ossimFilename& dir)
theSupplementaryDirectory = dir;
else
theSupplementaryDirectory = dir.path();
// A change in supplementary directory presents an opportunity to find the OVR that could not be
// opened previously, as well as other support data items:
if (!theOverview.valid())
......
......@@ -17,7 +17,7 @@
#include <ossim/base/ossimTrace.h>
#include <ossim/base/ossimProperty.h>
static ossimTrace traceDebug("ossimImageSourceFilter:degug");
static ossimTrace traceDebug("ossimImageSourceFilter:debug");
RTTI_DEF2(ossimImageSourceFilter, "ossimImageSourceFilter", ossimImageSource, ossimConnectableObjectListener)
......