Commit ac6a0e82 authored by Cyrille Valladeau's avatar Cyrille Valladeau

MRG

parents c6d784e9 bf77983b
......@@ -23,7 +23,7 @@ PURPOSE. See the above copyright notices for more information.
#include "otbImageLayerGenerator.h"
#include "otbImageLayer.h"
#include "otbImageView.h"
#include <FL/Fl.h>
#include <FL/Fl.H>
#include "otbImageWidgetController.h"
#include "otbWidgetResizingActionHandler.h"
#include "otbChangeScaledExtractRegionActionHandler.h"
......
......@@ -24,7 +24,7 @@
namespace itk
{
/** /class FFTComplexConjugateToRealImageFilter
/** \class FFTComplexConjugateToRealImageFilter
* /brief
*
* \ingroup
......
......@@ -24,7 +24,7 @@
namespace itk
{
/** /class FFTRealToComplexConjugateImageFilter
/** \class FFTRealToComplexConjugateImageFilter
* /brief
*
* \ingroup
......
......@@ -23,7 +23,7 @@
namespace itk
{
/** /class FFTWRealToComplexConjugateImageFilter
/** \class FFTWRealToComplexConjugateImageFilter
* /brief
*
* \ingroup
......
......@@ -24,7 +24,7 @@
namespace itk{
/** /class IsolatedWatershedImageFilter
/** \class IsolatedWatershedImageFilter
* \brief Isolate watershed basins using two seeds
*
* IsolatedWatershedImageFilter labels pixels with ReplaceValue1 that
......
......@@ -25,7 +25,7 @@
namespace itk
{
/** /class FFTWComplexToComplexImageFilter
/** \class FFTWComplexToComplexImageFilter
* /brief Implements an API to enable the Fourier transform or the inverse
* Fourier transform of images with complex valued voxels to be computed using
* either FFTW from MIT or the FFTW interface in Intel MKL.
......@@ -34,7 +34,7 @@ namespace itk
*
* \author Simon K. Warfield simon.warfield@childrens.harvard.edu
*
* \note Attribution Notice. This research work was made possible by
* \note Attribution Notice. This research work was made possible by
* Grant Number R01 RR021885 (PI Simon K. Warfield, Ph.D.) from
* the National Center for Research Resources (NCRR), a component of the
* National Institutes of Health (NIH). Its contents are solely the
......@@ -95,8 +95,8 @@ protected:
fftwf_destroy_plan(m_Plan);
}
}
/**
/**
* these methods should be defined in every FFT filter class
*/
virtual void GenerateData(); // generates output from input
......
......@@ -2,7 +2,7 @@ PROJECT(otbossim)
SET(OSSIM_MAJOR_VERSION_NUMBER "1")
SET(OSSIM_MINOR_VERSION_NUMBER "7")
SET(OSSIM_PATCH_VERSION_NUMBER "9")
SET(OSSIM_PATCH_VERSION_NUMBER "15")
SET(OSSIM_RELEASE_NUMBER "?")
SET(OSSIM_VERSION "${OSSIM_MAJOR_VERSION_NUMBER}-${OSSIM_MINOR_VERSION_NUMBER}-${OSSIM_PATCH_VERSION_NUMBER}" )
......
......@@ -3,11 +3,11 @@
* License: See top level LICENSE.txt file.
*
* Author: Ken Melero
*
*
* Description: Common file for global constants.
*
**************************************************************************
* $Id$
* $Id: ossimConstants.h 13590 2008-09-24 12:35:43Z gpotts $
*/
#ifndef ossimConstants_HEADER
#define ossimConstants_HEADER
......@@ -16,7 +16,7 @@
extern "C" {
#endif
#ifdef __cplusplus
#ifdef __cplusplus
#include <cfloat>
#else
#include <float.h>
......@@ -48,7 +48,7 @@ extern "C" {
# define OSSIM_DLL
# define OSSIMDLLEXPORT_DATA(type) type
# define OSSIM_DLL_DATA(type) type
# define OSSIMDLLEXPORT_CTORFN
# define OSSIMDLLEXPORT_CTORFN
#elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(_MSC_VER) || defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
# define OSSIMEXPORT __declspec(dllexport)
# define OSSIMIMPORT __declspec(dllimport)
......@@ -242,7 +242,7 @@ typedef double ossim_float64;
typedef long long ossim_int64;
typedef unsigned long long ossim_uint64;
typedef signed long long ossim_sint64;
typedef ossim_int32 ossimErrorCode;
enum ossimVertexOrdering
......@@ -268,7 +268,7 @@ enum ossimPixelType
*/
enum ossimScalarType
{
OSSIM_SCALAR_UNKNOWN = 0,
OSSIM_SCALAR_UNKNOWN = 0,
OSSIM_UINT8 = 1, /**< 8 bit unsigned integer */
OSSIM_SINT8 = 2, /**< 8 bit signed integer */
OSSIM_UINT16 = 3, /**< 16 bit unsigned integer */
......
......@@ -6,7 +6,7 @@
// Author: Garrett Potts
//
//*************************************************************************
// $Id: ossimDate.h 12992 2008-06-05 18:09:11Z gpotts $
// $Id: ossimDate.h 13732 2008-10-17 19:47:43Z gpotts $
#ifndef ossimDate_HEADER
#define ossimDate_HEADER
#include <ctime>
......@@ -162,7 +162,8 @@ public:
double getFractionalSecond()const;
ossimLocalTm& setHour(int h);
ossimLocalTm& setMin(int m);
ossimLocalTm& setSec(int s);
ossimLocalTm& setSec(int s);
ossimLocalTm& setFloatSec(double s);
ossimLocalTm& setFractionalSecond(double fractS);
/**
......@@ -172,15 +173,15 @@ public:
time_t getTicks()const;
time_t getEpoc()const;
void addSeconds(ossim_float64 n);
void addMinutes(ossim_float64 n);
void addHours(ossim_float64 n);
void addDays(ossim_float64 n);
ossim_float64 deltaInSeconds(const ossimLocalTm& d)const;
ossim_float64 deltaInMinutes(const ossimLocalTm& d)const;
ossim_float64 delatInHours(const ossimLocalTm& d)const;
ossim_float64 deltaInDays(const ossimLocalTm& d)const;
void addSeconds(ossim_float64 n);
void addMinutes(ossim_float64 n);
void addHours(ossim_float64 n);
void addDays(ossim_float64 n);
ossim_float64 deltaInSeconds(const ossimLocalTm& d)const;
ossim_float64 deltaInMinutes(const ossimLocalTm& d)const;
ossim_float64 delatInHours(const ossimLocalTm& d)const;
ossim_float64 deltaInDays(const ossimLocalTm& d)const;
/**
* Will not adjust for timezone. The passed in value is based on seconds.
*/
......@@ -191,6 +192,8 @@ public:
*/
void setTimeGivenEpoc(time_t ticks);
bool setIso8601(const std::string& timeString, bool shiftToGmtOffsetZero=false);
ossimRefPtr<ossimXmlNode> saveXml()const;
bool loadXml(ossimRefPtr<ossimXmlNode> dateNode);
......
......@@ -10,7 +10,7 @@
// for Geotrans datum. For more thorough description of each function
// look at the datum.h file.
//*******************************************************************
// $Id: ossimDatum.h 9968 2006-11-29 14:01:53Z gpotts $
// $Id: ossimDatum.h 13560 2008-09-10 11:42:57Z gpotts $
#ifndef ossimDatum_HEADER
#define ossimDatum_HEADER
#include <ossim/base/ossimConstants.h>
......@@ -21,7 +21,18 @@
class OSSIMDLLEXPORT ossimDatum
{
public:
ossimDatum(const ossimString &code, const ossimString &name,
/**
* @param code new datum code. (input)
* @param name Name of the new datum (input)
* @param SigmaX Standard error in X in meters (input)
* @param SigmaY Standard error in Y in meters (input)
* @param SigmaZ Standard error in Z in meters (input)
* @param southLatitude Southern edge of validity rectangle in radians(input)
* @param northLatitude Northern edge of validity rectangle in radians(input)
* @param westLongitude Western edge of validity rectangle in radians (input)
* @param eastLongitude Eastern edge of validity rectangle in radians (input)
*/
ossimDatum(const ossimString &code, const ossimString &name,
const ossimEllipsoid* anEllipsoid,
ossim_float64 sigmaX, ossim_float64 sigmaY, ossim_float64 sigmaZ,
ossim_float64 westLongitude, ossim_float64 eastLongitude,
......
......@@ -9,11 +9,11 @@
// This is the DatumFactory class. You give it a code and it will
// construct a Datum class. It returns NULL if no code was found.
//*******************************************************************
// $Id: ossimDatumFactory.h 12078 2007-11-26 14:35:57Z dburken $
// $Id: ossimDatumFactory.h 13302 2008-07-25 19:10:39Z gpotts $
#ifndef ossimDatumFactory_HEADER
#define ossimDatumFactory_HEADER
#include <list>
#include <vector>
#include <map>
#include <ossim/base/ossimDatumFactoryInterface.h>
......@@ -45,8 +45,8 @@ public:
static ossimDatumFactory* instance();
const ossimDatum* wgs84()const{return theWgs84Datum;}
const ossimDatum* wgs72()const{return theWgs72Datum;}
std::list<ossimString> getList()const;
virtual void getList(std::list<ossimString>& list)const;
std::vector<ossimString> getList()const;
virtual void getList(std::vector<ossimString>& list)const;
void writeCStructure(const ossimFilename& file);
protected:
static ossimDatumFactory* theInstance;
......
......@@ -40,7 +40,7 @@ public:
*
* @param list The list to add to.
*/
virtual void getList(std::list<ossimString>& list) const = 0;
virtual void getList(std::vector<ossimString>& list) const = 0;
};
#endif /* #ifndef ossimDatumFactoryInterface_HEADER */
......@@ -13,7 +13,6 @@
#define ossimDatumFactoryRegistry_HEADER
#include <vector>
#include <list>
#include <ossim/base/ossimConstants.h> /* for OSSIM_DLL macro */
#include <OpenThreads/ReadWriteMutex>
......@@ -57,9 +56,9 @@ public:
*
* @param list The list to add to.
*/
void getList(std::list<ossimString>& list) const;
void getList(std::vector<ossimString>& list) const;
private:
protected:
/** hidden from use default constructor */
ossimDatumFactoryRegistry();
......@@ -72,7 +71,7 @@ private:
const ossimDatumFactoryRegistry& rhs);
/** Single static instance of this class. */
static ossimDatumFactoryRegistry* theInstance;
//static ossimDatumFactoryRegistry* theInstance;
mutable OpenThreads::ReadWriteMutex theFactoryListMutex;
std::vector<ossimDatumFactoryInterface*> theFactoryList;
......
......@@ -13,7 +13,7 @@
// Container class for four double points representing a rectangle.
//
//*******************************************************************
// $Id: ossimDrect.h 11346 2007-07-23 12:59:48Z gpotts $
// $Id: ossimDrect.h 13672 2008-10-03 15:06:47Z gpotts $
#ifndef ossimDrect_HEADER
#define ossimDrect_HEADER
......@@ -451,15 +451,16 @@ public:
/*!
* Returns true if "pt" falls within rectangle. Fall on an edge is also
* considered to be within.
* considered to be within. The edge is expanded by epsilon value so any value
* within epsilon is inside
*/
bool pointWithin(const ossimDpt& pt) const;
bool pointWithin(const ossimDpt& pt, double epsilon=0.0) const;
/*!
* Returns true if "pt" falls within rectangle. Fall on an edge is also
* considered to be within.
*/
bool pointWithin(const ossimFpt& pt) const;
bool pointWithin(const ossimFpt& pt, double epsilon=0.0) const;
/*!
* Returns true if any portion of an input rectangle "rect" intersects
......@@ -695,36 +696,37 @@ inline void ossimDrect::set_lly(ossim_float64 y)
//*******************************************************************
// Inline Method: ossimDrect::pointWithin(const ossimDpt& pt)
//*******************************************************************
inline bool ossimDrect::pointWithin(const ossimDpt& pt) const
inline bool ossimDrect::pointWithin(const ossimDpt& pt, double epsilon) const
{
if (theOrientMode == OSSIM_LEFT_HANDED)
return ((pt.x >= ul().x) &&
(pt.x <= ur().x) &&
(pt.y >= ul().y) &&
(pt.y <= ll().y));
else
return ((pt.x >= ul().x) &&
(pt.x <= ur().x) &&
(pt.y <= ul().y) &&
(pt.y >= ll().y));
{
return ((pt.x >= (ul().x-epsilon)) &&
(pt.x <= (ur().x+epsilon)) &&
(pt.y >= (ul().y-epsilon)) &&
(pt.y <= (ll().y+epsilon)));
}
return ((pt.x >= (ul().x-epsilon)) &&
(pt.x <= (ur().x+epsilon)) &&
(pt.y <= (ul().y+epsilon)) &&
(pt.y >= (ll().y-epsilon)));
}
//*******************************************************************
// Inline Method: ossimDrect::pointWithin(const ossimFpt& pt)
//*******************************************************************
inline bool ossimDrect::pointWithin(const ossimFpt& pt) const
inline bool ossimDrect::pointWithin(const ossimFpt& pt, double epsilon) const
{
if (theOrientMode == OSSIM_LEFT_HANDED)
{
return ( (pt.x >= ul().x) &&
(pt.x <= ur().x) &&
(pt.y >= ul().y) &&
(pt.y <= ll().y) );
return ((pt.x >= (ul().x-epsilon)) &&
(pt.x <= (ur().x+epsilon)) &&
(pt.y >= (ul().y-epsilon)) &&
(pt.y <= (ll().y+epsilon)));
}
return ((pt.x >= ul().x) &&
(pt.x <= ur().x) &&
(pt.y <= ul().y) &&
(pt.y >= ll().y));
return ((pt.x >= (ul().x-epsilon)) &&
(pt.x <= (ur().x+epsilon)) &&
(pt.y <= (ul().y+epsilon)) &&
(pt.y >= (ll().y-epsilon)));
}
//*******************************************************************
......
......@@ -7,7 +7,7 @@
//
//
//*************************************************************************
// $Id: ossimEvent.h 9968 2006-11-29 14:01:53Z gpotts $
// $Id: ossimEvent.h 13362 2008-08-01 14:02:32Z gpotts $
#ifndef ossimEvent_HEADER
#define ossimEvent_HEADER
#include <ossim/base/ossimEventIds.h>
......@@ -16,7 +16,12 @@
class OSSIMDLLEXPORT ossimEvent : public ossimObject
{
public:
enum PropagationType
{
PROPAGATION_NONE = 0,
PROPAGATION_INPUT = 1,
PROPAGATION_OUTPUT = 2
};
/**
* @param object The object associated with the event if any.
*
......@@ -34,15 +39,27 @@ public:
void setConsumedFlag(bool flag=true);
void consume();
/**
* This is the originating object that originally
* produced the event.
*/
const ossimObject* getObject()const;
ossimObject* getObject();
const ossimObject* getCurrentObject()const;
ossimObject* getCurrentObject();
void setObject(ossimObject* object);
void setCurrentObject(ossimObject* object);
void setPropagationType(PropagationType type);
bool isPropagatingToOutputs()const;
bool isPropagatingToInputs()const;
protected:
ossimObject* theObject;
ossimObject* theCurrentObject;
long theId;
bool theIsConsumedFlag;
PropagationType thePropagationType;
TYPE_DATA
};
......
......@@ -13,7 +13,7 @@
// Height is relative to the ellipsoid in meters.
//
//*******************************************************************
// $Id: ossimGpt.h 11495 2007-08-06 09:16:43Z dburken $
// $Id: ossimGpt.h 13238 2008-07-25 01:14:42Z gpotts $
#ifndef gpt_HEADER
#define gpt_HEADER
......@@ -24,10 +24,10 @@
#include <ossim/base/ossimDatumFactory.h>
#include <ossim/base/ossimString.h>
class OSSIMDLLEXPORT ossimDatum;
class OSSIMDLLEXPORT ossimEcefPoint;
class ossimDatum;
class ossimEcefPoint;
class OSSIMDLLEXPORT ossimGpt
class OSSIM_DLL ossimGpt
{
public:
/**
......
......@@ -8,7 +8,7 @@
// Author: Garrett Potts
//
//*************************************************************************
// $Id: ossimGrect.h 11955 2007-10-31 16:10:22Z gpotts $
// $Id: ossimGrect.h 13357 2008-07-31 12:45:29Z gpotts $
#ifndef ossimGrect_HEADER
#define ossimGrect_HEADER
#include <vector>
......@@ -64,10 +64,10 @@ public:
* Takes the upper left and lower right ground
* points
*/
ossimGrect(const double ulLat,
const double ulLon,
const double lrLat,
const double lrLon,
ossimGrect(double ulLat,
double ulLon,
double lrLat,
double lrLon,
const ossimDatum* aDatum=ossimDatumFactory::instance()->wgs84())
:
theUlCorner(ulLat, ulLon,0, aDatum),
......
......@@ -19,7 +19,7 @@
//
// File : gzstream.h
// Revision : $Revision: 13050 $
// Revision_date : $Date: 2008-06-19 20:07:35 +0200 (Thu, 19 Jun 2008) $
// Revision_date : $Date: 2008-06-20 02:07:35 +0800 (Fri, 20 Jun 2008) $
// Author(s) : Deepak Bandyopadhyay, Lutz Kettner
//
// Standard streambuf implementation following Nicolai Josuttis, "The
......@@ -68,7 +68,7 @@ public:
/* std::ios_base::out); */
private:
struct PrivateData;
struct PrivateData;
int flush_buffer();
static const int bufferSize = 303; // 47+256 size of data buff
......
......@@ -6,7 +6,7 @@
// Author: Garrett Potts
//
//*************************************************************************
// $Id: ossimObjectFactoryRegistry.h 9094 2006-06-13 19:12:40Z dburken $
// $Id: ossimObjectFactoryRegistry.h 13508 2008-08-27 15:51:38Z gpotts $
#ifndef ossimObjectFactoryRegistry_HEADER
#define ossimObjectFactoryRegistry_HEADER
#include <vector>
......@@ -57,11 +57,10 @@ public:
const ossimString& baseType)const;
protected:
ossimObjectFactoryRegistry(){}//hide
ossimObjectFactoryRegistry();//hide
ossimObjectFactoryRegistry(const ossimObjectFactoryRegistry&):ossimObject(){}//hide
void operator =(const ossimObjectFactoryRegistry&){}//hide
static ossimObjectFactoryRegistry* theInstance;
std::vector<ossimObjectFactory*> theFactoryList;
ossimObjectFactory* findFactory(ossimObjectFactory* factory)const;
......
......@@ -5,24 +5,27 @@
#ifndef ossimReferenced_HEADER
#define ossimReferenced_HEADER
#include <ossim/base/ossimConstants.h>
#include <OpenThreads/ScopedLock>
#include <OpenThreads/Mutex>
class OSSIMDLLEXPORT ossimReferenced
{
public:
ossimReferenced()
: theRefCount(0)
: theRefMutex(new OpenThreads::Mutex),
theRefCount(0)
{}
ossimReferenced(const ossimReferenced&)
: theRefCount(0)
{}
: theRefMutex(new OpenThreads::Mutex),
theRefCount(0)
{}
inline ossimReferenced& operator = (const ossimReferenced&) { return *this; }
/*! increment the reference count by one, indicating that
this object has another pointer which is referencing it.*/
inline void ref() const { ++theRefCount; }
inline void ref() const;
/*! decrement the reference count by one, indicating that
a pointer to this object is referencing it. If the
......@@ -36,7 +39,18 @@ class OSSIMDLLEXPORT ossimReferenced
should only be called if the user knows exactly who will
be resonsible for, one should prefer unref() over unref_nodelete()
as the later can lead to memory leaks.*/
inline void unref_nodelete() const { --theRefCount; }
inline void unref_nodelete() const
{
if (theRefMutex)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(*theRefMutex);
--theRefCount;
}
else
{
--theRefCount;
}
}
/*! return the number pointers currently referencing this object. */
inline int referenceCount() const { return theRefCount; }
......@@ -44,16 +58,50 @@ class OSSIMDLLEXPORT ossimReferenced
protected:
virtual ~ossimReferenced();
mutable OpenThreads::Mutex* theRefMutex;
mutable int theRefCount;
};