accessor.hxx | accessor.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
/* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */ | /* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED */ | |||
/* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ | /* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ | |||
/* */ | /* */ | |||
/************************************************************************/ | /************************************************************************/ | |||
#ifndef VIGRA_ACCESSOR_HXX | #ifndef VIGRA_ACCESSOR_HXX | |||
#define VIGRA_ACCESSOR_HXX | #define VIGRA_ACCESSOR_HXX | |||
#include "vigra/metaprogramming.hxx" | ||||
#include "vigra/numerictraits.hxx" | #include "vigra/numerictraits.hxx" | |||
#include "vigra/tuple.hxx" | #include "vigra/tuple.hxx" | |||
namespace vigra { | namespace vigra { | |||
/** \addtogroup DataAccessors Data Accessors | /** \addtogroup DataAccessors Data Accessors | |||
Basic templates to encapsulate access to the data of an iterator. | Basic templates to encapsulate access to the data of an iterator. | |||
Data accessors are used to allow for flexible access to the data | Data accessors are used to allow for flexible access to the data | |||
skipping to change at line 165 | skipping to change at line 166 | |||
} | } | |||
/** Write the current data item. The type <TT>V</TT> of the passed | /** Write the current data item. The type <TT>V</TT> of the passed | |||
in <TT>value</TT> is automatically converted to <TT>VALUETYPE</ TT>. | in <TT>value</TT> is automatically converted to <TT>VALUETYPE</ TT>. | |||
In case of a conversion floating point -> intergral this includ es rounding and clipping. | In case of a conversion floating point -> intergral this includ es rounding and clipping. | |||
*/ | */ | |||
template <class V, class ITERATOR> | template <class V, class ITERATOR> | |||
void set(V const & value, ITERATOR const & i) const | void set(V const & value, ITERATOR const & i) const | |||
{ *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); } | { *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); } | |||
/* This overload is needed to make the accessor work with a std::ba | ||||
ck_inserter */ | ||||
template <class V, class ITERATOR> | ||||
void set(V const & value, ITERATOR & i) const | ||||
{ *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); } | ||||
/** Write the data item at an offset (can be 1D or 2D or higher ord er difference).. | /** Write the data item at an offset (can be 1D or 2D or higher ord er difference).. | |||
The type <TT>V</TT> of the passed | The type <TT>V</TT> of the passed | |||
in <TT>value</TT> is automatically converted to <TT>VALUETYPE</ TT>. | in <TT>value</TT> is automatically converted to <TT>VALUETYPE</ TT>. | |||
In case of a conversion floating point -> intergral this includ es rounding and clipping. | In case of a conversion floating point -> intergral this includ es rounding and clipping. | |||
*/ | */ | |||
template <class V, class ITERATOR, class DIFFERENCE> | template <class V, class ITERATOR, class DIFFERENCE> | |||
void set(V const & value, ITERATOR const & i, DIFFERENCE const & diff) const | void set(V const & value, ITERATOR const & i, DIFFERENCE const & diff) const | |||
{ | { | |||
i[diff]= detail::RequiresExplicitCast<VALUETYPE>::cast(value); | i[diff]= detail::RequiresExplicitCast<VALUETYPE>::cast(value); | |||
} | } | |||
skipping to change at line 228 | skipping to change at line 234 | |||
return detail::RequiresExplicitCast<VALUETYPE>::cast(i[diff]); | return detail::RequiresExplicitCast<VALUETYPE>::cast(i[diff]); | |||
} | } | |||
/** Write the current data item. The type <TT>V</TT> of the passed | /** Write the current data item. The type <TT>V</TT> of the passed | |||
in <TT>value</TT> is automatically converted to <TT>VALUETYPE</ TT>. | in <TT>value</TT> is automatically converted to <TT>VALUETYPE</ TT>. | |||
In case of a conversion floating point -> intergral this includ es rounding and clipping. | In case of a conversion floating point -> intergral this includ es rounding and clipping. | |||
*/ | */ | |||
template <class V, class ITERATOR> | template <class V, class ITERATOR> | |||
void set(V value, ITERATOR const & i) const | void set(V value, ITERATOR const & i) const | |||
{ *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); } | { *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); } | |||
/* This overload is needed to make the accessor work with a std::ba | ||||
ck_inserter */ | ||||
template <class V, class ITERATOR> | ||||
void set(V value, ITERATOR & i) const | ||||
{ *i = detail::RequiresExplicitCast<VALUETYPE>::cast(value); } | ||||
/** Write the data item at an offset (can be 1D or 2D or higher ord er difference).. | /** Write the data item at an offset (can be 1D or 2D or higher ord er difference).. | |||
The type <TT>V</TT> of the passed | The type <TT>V</TT> of the passed | |||
in <TT>value</TT> is automatically converted to <TT>VALUETYPE</ TT>. | in <TT>value</TT> is automatically converted to <TT>VALUETYPE</ TT>. | |||
In case of a conversion floating point -> intergral this includ es rounding and clipping. | In case of a conversion floating point -> intergral this includ es rounding and clipping. | |||
*/ | */ | |||
template <class V, class ITERATOR, class DIFFERENCE> | template <class V, class ITERATOR, class DIFFERENCE> | |||
void set(V value, ITERATOR const & i, DIFFERENCE const & diff) const | void set(V value, ITERATOR const & i, DIFFERENCE const & diff) const | |||
{ | { | |||
i[diff]= detail::RequiresExplicitCast<VALUETYPE>::cast(value); | i[diff]= detail::RequiresExplicitCast<VALUETYPE>::cast(value); | |||
} | } | |||
skipping to change at line 495 | skipping to change at line 506 | |||
/** Write the data item at an offset (can be 1D or 2D or higher ord er difference).. | /** Write the data item at an offset (can be 1D or 2D or higher ord er difference).. | |||
The type <TT>V</TT> of the passed | The type <TT>V</TT> of the passed | |||
in <TT>value</TT> is automatically converted to <TT>value_type< /TT>. | in <TT>value</TT> is automatically converted to <TT>value_type< /TT>. | |||
In case of a conversion floating point -> intergral this includ es rounding and clipping. | In case of a conversion floating point -> intergral this includ es rounding and clipping. | |||
*/ | */ | |||
template <class V, class ITERATOR, class DIFFERENCE> | template <class V, class ITERATOR, class DIFFERENCE> | |||
void set(V value, ITERATOR const & i, DIFFERENCE const & diff) const | void set(V value, ITERATOR const & i, DIFFERENCE const & diff) const | |||
{ | { | |||
i[diff][index_]= detail::RequiresExplicitCast<value_type>::cast(val ue); | i[diff][index_]= detail::RequiresExplicitCast<value_type>::cast(val ue); | |||
} | } | |||
/** Reset the index to the given number. | ||||
*/ | ||||
void setIndex(int i) | ||||
{ | ||||
index_ = i; | ||||
} | ||||
}; | }; | |||
/********************************************************/ | /********************************************************/ | |||
/* */ | /* */ | |||
/* VectorElementAccessor */ | /* VectorElementAccessor */ | |||
/* */ | /* */ | |||
/********************************************************/ | /********************************************************/ | |||
/** \brief Accessor for one component of a vector. | /** \brief Accessor for one component of a vector. | |||
skipping to change at line 621 | skipping to change at line 639 | |||
*i = 10; | *i = 10; | |||
} | } | |||
} | } | |||
\endcode | \endcode | |||
*/ | */ | |||
template <class SEQUENCE> | template <class SEQUENCE> | |||
class SequenceAccessor | class SequenceAccessor | |||
: public StandardAccessor<SEQUENCE> | : public StandardAccessor<SEQUENCE> | |||
{ | { | |||
public: | public: | |||
/** the sequence's value_type | /** the sequence's value_type | |||
*/ | */ | |||
typedef typename SEQUENCE::value_type component_type; | typedef typename SEQUENCE::value_type component_type; | |||
/** the sequence's iterator type | #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION | |||
*/ | typedef typename | |||
If<typename TypeTraits<SEQUENCE>::isConst, | ||||
typename SEQUENCE::const_iterator, | ||||
typename SEQUENCE::iterator>::type | ||||
iterator; | ||||
#else | ||||
/** the sequence's iterator type | ||||
*/ | ||||
typedef typename SEQUENCE::iterator iterator; | typedef typename SEQUENCE::iterator iterator; | |||
#endif | ||||
/** get begin iterator for sequence at given iterator position | /** get begin iterator for sequence at given iterator position | |||
*/ | */ | |||
template <class ITERATOR> | template <class ITERATOR> | |||
iterator begin(ITERATOR const & i) const | iterator begin(ITERATOR const & i) const | |||
{ | { | |||
return (*i).begin(); | return (*i).begin(); | |||
} | } | |||
/** get end iterator for sequence at given iterator position | /** get end iterator for sequence at given iterator position | |||
*/ | */ | |||
template <class ITERATOR> | template <class ITERATOR> | |||
iterator end(ITERATOR const & i) const | iterator end(ITERATOR const & i) const | |||
{ | { | |||
return (*i).end(); | return (*i).end(); | |||
} | } | |||
/** get begin iterator for sequence at an offset | /** get begin iterator for sequence at an offset | |||
of given iterator position | of given iterator position | |||
*/ | */ | |||
template <class ITERATOR, class DIFFERENCE> | template <class ITERATOR, class DIFFERENCE> | |||
iterator begin(ITERATOR const & i, DIFFERENCE const & diff) const | iterator begin(ITERATOR const & i, DIFFERENCE const & diff) const | |||
{ | { | |||
return i[diff].begin(); | return i[diff].begin(); | |||
} | } | |||
/** get end iterator for sequence at a 2D difference vector | /** get end iterator for sequence at a 2D difference vector | |||
of given iterator position | of given iterator position | |||
*/ | */ | |||
template <class ITERATOR, class DIFFERENCE> | template <class ITERATOR, class DIFFERENCE> | |||
iterator end(ITERATOR const & i, DIFFERENCE const & diff) const | iterator end(ITERATOR const & i, DIFFERENCE const & diff) const | |||
{ | { | |||
return i[diff].end(); | return i[diff].end(); | |||
} | } | |||
/** get size of sequence at given iterator position | /** get size of sequence at given iterator position | |||
*/ | */ | |||
template <class ITERATOR> | template <class ITERATOR> | |||
unsigned int size(ITERATOR const & i) const { return (*i).size(); } | unsigned int size(ITERATOR const & i) const { return (*i).size(); } | |||
/** get size of sequence at 2D difference vector of given iterator posi | /** get size of sequence at 2D difference vector of given iterator | |||
tion | position | |||
*/ | */ | |||
template <class ITERATOR, class DIFFERENCE> | template <class ITERATOR, class DIFFERENCE> | |||
unsigned int size(ITERATOR const & i, DIFFERENCE const & diff) const | unsigned int size(ITERATOR const & i, DIFFERENCE const & diff) const | |||
{ return i[diff].size(); } | { return i[diff].size(); } | |||
}; | }; | |||
/********************************************************/ | /********************************************************/ | |||
/* */ | /* */ | |||
/* VectorAccessor */ | /* VectorAccessor */ | |||
/* */ | /* */ | |||
/********************************************************/ | /********************************************************/ | |||
End of changes. 14 change blocks. | ||||
20 lines changed or deleted | 48 lines changed or added | |||
array_vector.hxx | array_vector.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2002-2004 by Ullrich Koethe */ | /* Copyright 2002-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
basicgeometry.hxx | basicgeometry.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
basicimage.hxx | basicimage.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 561 | skipping to change at line 561 | |||
pallocator_(alloc) | pallocator_(alloc) | |||
{ | { | |||
vigra_precondition((size.x >= 0) && (size.y >= 0), | vigra_precondition((size.x >= 0) && (size.y >= 0), | |||
"BasicImage::BasicImage(Diff2D size): " | "BasicImage::BasicImage(Diff2D size): " | |||
"size.x and size.y must be >= 0.\n"); | "size.x and size.y must be >= 0.\n"); | |||
resize(size.x, size.y, value_type()); | resize(size.x, size.y, value_type()); | |||
} | } | |||
/** construct image of size width*height and initialize every | /** construct image of size width*height and initialize every | |||
pixel with given data (use this constructor, if | pixel with the value \a d (use this constructor, if | |||
value_type doesn't have a default constructor). | value_type doesn't have a default constructor). | |||
Use the specified allocator. | Use the specified allocator. | |||
*/ | */ | |||
BasicImage(int width, int height, value_type const & d, Alloc const & a lloc = Alloc()) | BasicImage(int width, int height, value_type const & d, Alloc const & a lloc = Alloc()) | |||
: data_(0), | : data_(0), | |||
width_(0), | width_(0), | |||
height_(0), | height_(0), | |||
allocator_(alloc), | allocator_(alloc), | |||
pallocator_(alloc) | pallocator_(alloc) | |||
{ | { | |||
skipping to change at line 597 | skipping to change at line 597 | |||
allocator_(alloc), | allocator_(alloc), | |||
pallocator_(alloc) | pallocator_(alloc) | |||
{ | { | |||
vigra_precondition((size.x >= 0) && (size.y >= 0), | vigra_precondition((size.x >= 0) && (size.y >= 0), | |||
"BasicImage::BasicImage(Diff2D const & size, value_type const & v): " | "BasicImage::BasicImage(Diff2D const & size, value_type const & v): " | |||
"size.x and size.y must be >= 0.\n"); | "size.x and size.y must be >= 0.\n"); | |||
resize(size.x, size.y, d); | resize(size.x, size.y, d); | |||
} | } | |||
/** construct image of size width*height and copy the data from the | ||||
given C-style array \a d. Use the specified allocator. | ||||
*/ | ||||
BasicImage(int width, int height, const_pointer d, Alloc const & alloc | ||||
= Alloc()) | ||||
: data_(0), | ||||
width_(0), | ||||
height_(0), | ||||
allocator_(alloc), | ||||
pallocator_(alloc) | ||||
{ | ||||
vigra_precondition((width >= 0) && (height >= 0), | ||||
"BasicImage::BasicImage(int width, int height, const_pointer ) | ||||
: " | ||||
"width and height must be >= 0.\n"); | ||||
resizeCopy(width, height, d); | ||||
} | ||||
/** construct image of size size.x x size.y and copy the data from | ||||
the | ||||
given C-style array. Use the specified allocator. | ||||
*/ | ||||
explicit BasicImage(difference_type const & size, const_pointer d, Allo | ||||
c const & alloc = Alloc()) | ||||
: data_(0), | ||||
width_(0), | ||||
height_(0), | ||||
allocator_(alloc), | ||||
pallocator_(alloc) | ||||
{ | ||||
vigra_precondition((size.x >= 0) && (size.y >= 0), | ||||
"BasicImage::BasicImage(Diff2D const & size, const_pointer): " | ||||
"size.x and size.y must be >= 0.\n"); | ||||
resizeCopy(size.x, size.y, d); | ||||
} | ||||
/** copy rhs image | /** copy rhs image | |||
*/ | */ | |||
BasicImage(const BasicImage & rhs) | BasicImage(const BasicImage & rhs) | |||
: data_(0), | : data_(0), | |||
width_(0), | width_(0), | |||
height_(0), | height_(0), | |||
allocator_(rhs.allocator_), | allocator_(rhs.allocator_), | |||
pallocator_(rhs.pallocator_) | pallocator_(rhs.pallocator_) | |||
{ | { | |||
resizeCopy(rhs); | resizeCopy(rhs); | |||
skipping to change at line 655 | skipping to change at line 689 | |||
} | } | |||
} | } | |||
/** reset image to specified size and initialize it with | /** reset image to specified size and initialize it with | |||
given data (use this if value_type doesn't have a default | given data (use this if value_type doesn't have a default | |||
constructor, dimensions must not be negative, | constructor, dimensions must not be negative, | |||
old data are kept if new size matches old size) | old data are kept if new size matches old size) | |||
*/ | */ | |||
void resize(int width, int height, value_type const & d); | void resize(int width, int height, value_type const & d); | |||
/** resize image to given size and initialize by copying data | ||||
from the C-style arra \a data. | ||||
*/ | ||||
void resizeCopy(int width, int height, const_pointer data); | ||||
/** resize image to size of other image and copy it's data | /** resize image to size of other image and copy it's data | |||
*/ | */ | |||
void resizeCopy(const BasicImage & rhs); | void resizeCopy(const BasicImage & rhs) | |||
{ | ||||
resizeCopy(rhs.width(), rhs.height(), rhs.data_); | ||||
} | ||||
/** swap the internal data with the rhs image in constant time | /** swap the internal data with the rhs image in constant time | |||
*/ | */ | |||
void swap( BasicImage & rhs ); | void swap( BasicImage & rhs ); | |||
/** width of Image | /** width of Image | |||
*/ | */ | |||
int width() const | int width() const | |||
{ | { | |||
return width_; | return width_; | |||
skipping to change at line 939 | skipping to change at line 981 | |||
height_ = height; | height_ = height; | |||
} | } | |||
else if(width*height > 0) // keep size, re-init data | else if(width*height > 0) // keep size, re-init data | |||
{ | { | |||
std::fill_n(data_, width*height, d); | std::fill_n(data_, width*height, d); | |||
} | } | |||
} | } | |||
template <class PIXELTYPE, class Alloc> | template <class PIXELTYPE, class Alloc> | |||
void | void | |||
BasicImage<PIXELTYPE, Alloc>::resizeCopy(const BasicImage & rhs) | BasicImage<PIXELTYPE, Alloc>::resizeCopy(int width, int height, const_point er data) | |||
{ | { | |||
if (width_ != rhs.width() || height_ != rhs.height()) // change size? | int newsize = width*height; | |||
if (width_ != width || height_ != height) // change size? | ||||
{ | { | |||
value_type * newdata = 0; | value_type * newdata = 0; | |||
value_type ** newlines = 0; | value_type ** newlines = 0; | |||
if(rhs.width()*rhs.height() > 0) | if(newsize > 0) | |||
{ | { | |||
if (rhs.width()*rhs.height() != width_*height_) // different si zes, must reallocate | if (newsize != width_*height_) // different sizes, must realloc ate | |||
{ | { | |||
newdata = allocator_.allocate(rhs.width()*rhs.height()); | newdata = allocator_.allocate(newsize); | |||
std::uninitialized_copy(rhs.begin(), rhs.end(), newdata); | std::uninitialized_copy(data, data + newsize, newdata); | |||
newlines = initLineStartArray(newdata, rhs.width(), rhs.hei | newlines = initLineStartArray(newdata, width, height); | |||
ght()); | ||||
deallocate(); | deallocate(); | |||
} | } | |||
else // need only to reshape | else // need only to reshape | |||
{ | { | |||
newdata = data_; | newdata = data_; | |||
std::copy(rhs.begin(), rhs.end(), newdata); | std::copy(data, data + newsize, newdata); | |||
newlines = initLineStartArray(newdata, rhs.width(), rhs.hei | newlines = initLineStartArray(newdata, width, height); | |||
ght()); | ||||
pallocator_.deallocate(lines_, height_); | pallocator_.deallocate(lines_, height_); | |||
} | } | |||
} | } | |||
else | else | |||
{ | { | |||
deallocate(); | deallocate(); | |||
} | } | |||
data_ = newdata; | data_ = newdata; | |||
lines_ = newlines; | lines_ = newlines; | |||
width_ = rhs.width(); | width_ = width; | |||
height_ = rhs.height(); | height_ = height; | |||
} | } | |||
else if(rhs.width()*rhs.height() > 0) // keep size, copy data | else if(newsize > 0) // keep size, copy data | |||
{ | { | |||
std::copy(rhs.begin(), rhs.end(), data_); | std::copy(data, data + newsize, data_); | |||
} | } | |||
} | } | |||
template <class PIXELTYPE, class Alloc> | template <class PIXELTYPE, class Alloc> | |||
void | void | |||
BasicImage<PIXELTYPE, Alloc>::swap( BasicImage<PIXELTYPE, Alloc>& rhs ) | BasicImage<PIXELTYPE, Alloc>::swap( BasicImage<PIXELTYPE, Alloc>& rhs ) | |||
{ | { | |||
if (&rhs!=this) | if (&rhs!=this) | |||
{ | { | |||
std::swap( data_, rhs.data_ ); | std::swap( data_, rhs.data_ ); | |||
End of changes. 14 change blocks. | ||||
18 lines changed or deleted | 63 lines changed or added | |||
basicimageview.hxx | basicimageview.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
bordertreatment.hxx | bordertreatment.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
boundarytensor.hxx | boundarytensor.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
codec.hxx | codec.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2001-2002 by Gunnar Kedenburg */ | /* Copyright 2001-2002 by Gunnar Kedenburg */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
colorconversions.hxx | colorconversions.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
combineimages.hxx | combineimages.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
config.hxx | config.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
contourcirculator.hxx | contourcirculator.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
convolution.hxx | convolution.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
copyimage.hxx | copyimage.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
cornerdetection.hxx | cornerdetection.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
diff2d.hxx | diff2d.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2003 by Hans Meine */ | /* Copyright 1998-2003 by Hans Meine */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
distancetransform.hxx | distancetransform.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
edgedetection.hxx | edgedetection.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
error.hxx | error.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 59 | skipping to change at line 59 | |||
\code | \code | |||
vigra_precondition(PREDICATE, MESSAGE); | vigra_precondition(PREDICATE, MESSAGE); | |||
vigra_postcondition(PREDICATE, MESSAGE); | vigra_postcondition(PREDICATE, MESSAGE); | |||
vigra_invariant(PREDICATE, MESSAGE); | vigra_invariant(PREDICATE, MESSAGE); | |||
\endcode | \endcode | |||
The MESSAGE is passed to the exception and can be retrieved via | The MESSAGE is passed to the exception and can be retrieved via | |||
the overloaded member function '<TT>exception.what()</TT>'. If the comp iler | the overloaded member function '<TT>exception.what()</TT>'. If the comp iler | |||
flag '<TT>NDEBUG</TT>' is <em>not</em> defined, the file name and line number of | flag '<TT>NDEBUG</TT>' is <em>not</em> defined, the file name and line number of | |||
the error are automatically included in the message. | the error are automatically included in the message. The macro | |||
The following macro | \code | |||
vigra_assert(PREDICATE, MESSAGE); | ||||
\endcode | ||||
is identical to <tt>vigra_precondition()</tt> except that it is complet | ||||
ely removed | ||||
when '<TT>NDEBUG</TT>' is defined. This is useful for test that are onl | ||||
y needed during | ||||
debugging, such as array index bound checking. The following macro | ||||
\code | \code | |||
vigra_fail(MESSAGE); | vigra_fail(MESSAGE); | |||
\endcode | \endcode | |||
unconditionally throws a '<TT>std::runtime_error</TT>' constructed from the message | unconditionally throws a '<TT>std::runtime_error</TT>' constructed from the message | |||
(along with file name and line number, if NDEBUG is not set). | (along with file name and line number, if NDEBUG is not set). | |||
<b> Usage:</b> | <b> Usage:</b> | |||
skipping to change at line 227 | skipping to change at line 233 | |||
inline | inline | |||
void throw_runtime_error(std::string message, char const * file, int line) | void throw_runtime_error(std::string message, char const * file, int line) | |||
{ | { | |||
char what_[1100]; | char what_[1100]; | |||
sprintf(what_, "\n%.900s\n(%.100s:%d)\n", message.c_str(), file, line); | sprintf(what_, "\n%.900s\n(%.100s:%d)\n", message.c_str(), file, line); | |||
throw std::runtime_error(what_); | throw std::runtime_error(what_); | |||
} | } | |||
#define vigra_precondition(PREDICATE, MESSAGE) vigra::throw_precondition_er ror((PREDICATE), MESSAGE, __FILE__, __LINE__) | #define vigra_precondition(PREDICATE, MESSAGE) vigra::throw_precondition_er ror((PREDICATE), MESSAGE, __FILE__, __LINE__) | |||
#define vigra_assert(PREDICATE, MESSAGE) vigra_precondition(PREDICATE, MESS | ||||
AGE) | ||||
#define vigra_postcondition(PREDICATE, MESSAGE) vigra::throw_postcondition_ error((PREDICATE), MESSAGE, __FILE__, __LINE__) | #define vigra_postcondition(PREDICATE, MESSAGE) vigra::throw_postcondition_ error((PREDICATE), MESSAGE, __FILE__, __LINE__) | |||
#define vigra_invariant(PREDICATE, MESSAGE) vigra::throw_invariant_error((P REDICATE), MESSAGE, __FILE__, __LINE__) | #define vigra_invariant(PREDICATE, MESSAGE) vigra::throw_invariant_error((P REDICATE), MESSAGE, __FILE__, __LINE__) | |||
#define vigra_fail(MESSAGE) vigra::throw_runtime_error(MESSAGE, __FILE__, _ _LINE__) | #define vigra_fail(MESSAGE) vigra::throw_runtime_error(MESSAGE, __FILE__, _ _LINE__) | |||
#else // NDEBUG | #else // NDEBUG | |||
inline | inline | |||
void throw_invariant_error(bool predicate, char const * message) | void throw_invariant_error(bool predicate, char const * message) | |||
skipping to change at line 279 | skipping to change at line 287 | |||
inline | inline | |||
void throw_postcondition_error(bool predicate, std::string message) | void throw_postcondition_error(bool predicate, std::string message) | |||
{ | { | |||
if(!predicate) | if(!predicate) | |||
throw vigra::PostconditionViolation(message.c_str()); | throw vigra::PostconditionViolation(message.c_str()); | |||
} | } | |||
#define vigra_precondition(PREDICATE, MESSAGE) vigra::throw_precondition_er ror((PREDICATE), MESSAGE) | #define vigra_precondition(PREDICATE, MESSAGE) vigra::throw_precondition_er ror((PREDICATE), MESSAGE) | |||
#define vigra_assert(PREDICATE, MESSAGE) | ||||
#define vigra_postcondition(PREDICATE, MESSAGE) vigra::throw_postcondition_ error((PREDICATE), MESSAGE) | #define vigra_postcondition(PREDICATE, MESSAGE) vigra::throw_postcondition_ error((PREDICATE), MESSAGE) | |||
#define vigra_invariant(PREDICATE, MESSAGE) vigra::throw_invariant_error((P REDICATE), MESSAGE) | #define vigra_invariant(PREDICATE, MESSAGE) vigra::throw_invariant_error((P REDICATE), MESSAGE) | |||
#define vigra_fail(MESSAGE) throw std::runtime_error(MESSAGE) | #define vigra_fail(MESSAGE) throw std::runtime_error(MESSAGE) | |||
#endif // NDEBUG | #endif // NDEBUG | |||
} // namespace vigra | } // namespace vigra | |||
End of changes. 5 change blocks. | ||||
3 lines changed or deleted | 16 lines changed or added | |||
fftw.hxx | fftw.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
fftw3.hxx | fftw3.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 1414 | skipping to change at line 1414 | |||
ImageArray<DestImage> &results) | ImageArray<DestImage> &results) | |||
{ | { | |||
int w= srcLowerRight.x - srcUpperLeft.x; | int w= srcLowerRight.x - srcUpperLeft.x; | |||
// test for right memory layout (fftw expects a 2*width*height floats a rray) | // test for right memory layout (fftw expects a 2*width*height floats a rray) | |||
if (&(*(srcUpperLeft + Diff2D(w, 0))) == &(*(srcUpperLeft + Diff2D(0, 1 )))) | if (&(*(srcUpperLeft + Diff2D(w, 0))) == &(*(srcUpperLeft + Diff2D(0, 1 )))) | |||
applyFourierFilterFamilyImpl(srcUpperLeft, srcLowerRight, sa, | applyFourierFilterFamilyImpl(srcUpperLeft, srcLowerRight, sa, | |||
filters, results); | filters, results); | |||
else | else | |||
{ | { | |||
int h = srcLowerRight.y - srcUpperLeft.y; | ||||
FFTWComplexImage workImage(w, h); | FFTWComplexImage workImage(w, h); | |||
copyImage(srcIterRange(srcUpperLeft, srcLowerRight, sa), | copyImage(srcIterRange(srcUpperLeft, srcLowerRight, sa), | |||
destImage(workImage)); | destImage(workImage)); | |||
FFTWComplexImage const & cworkImage = workImage; | FFTWComplexImage const & cworkImage = workImage; | |||
applyFourierFilterFamilyImpl(cworkImage.upperLeft(), cworkImage.low erRight(), cworkImage.accessor(), | applyFourierFilterFamilyImpl(cworkImage.upperLeft(), cworkImage.low erRight(), cworkImage.accessor(), | |||
filters, results); | filters, results); | |||
} | } | |||
} | } | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added | |||
flatmorphology.hxx | flatmorphology.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
functorexpression.hxx | functorexpression.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
functortraits.hxx | functortraits.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2005 by Ullrich Koethe */ | /* Copyright 1998-2005 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
gaussians.hxx | gaussians.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
imagecontainer.hxx | imagecontainer.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
imageinfo.hxx | imageinfo.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2001 by Ullrich Koethe */ | /* Copyright 1998-2001 by Ullrich Koethe */ | |||
/* Copyright 2001-2002 by Gunnar Kedenburg */ | /* Copyright 2001-2002 by Gunnar Kedenburg */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
imageiterator.hxx | imageiterator.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
imageiteratoradapter.hxx | imageiteratoradapter.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
impex.hxx | impex.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2001-2002 by Gunnar Kedenburg */ | /* Copyright 2001-2002 by Gunnar Kedenburg */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
initimage.hxx | initimage.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
inspectimage.hxx | inspectimage.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
interpolating_accessor.hxx | interpolating_accessor.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
iteratoradapter.hxx | iteratoradapter.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
iteratortags.hxx | iteratortags.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2003 by Ullrich Koethe */ | /* Copyright 1998-2003 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
iteratortraits.hxx | iteratortraits.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
labelimage.hxx | labelimage.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
localminmax.hxx | localminmax.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
mathutil.hxx | mathutil.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 122 | skipping to change at line 122 | |||
<b>\#include</b> "<a href="mathutil_8hxx-source.html">vigra/mathutil.hx x</a>"<br> | <b>\#include</b> "<a href="mathutil_8hxx-source.html">vigra/mathutil.hx x</a>"<br> | |||
Namespace: vigra | Namespace: vigra | |||
*/ | */ | |||
template <class T> | template <class T> | |||
inline | inline | |||
typename NumericTraits<T>::Promote sq(T t) | typename NumericTraits<T>::Promote sq(T t) | |||
{ | { | |||
return t*t; | return t*t; | |||
} | } | |||
#ifdef VIGRA_NO_HYPOT | ||||
/*! Compute the Euclidean distance. | ||||
The hypot() function returns the sqrt(a*a + b*b). | ||||
It is implemented in a way that minimizes round-off error. | ||||
<b>\#include</b> "<a href="mathutil_8hxx-source.html">vigra/mathutil.hx | ||||
x</a>"<br> | ||||
Namespace: vigra | ||||
*/ | ||||
template <class T> | ||||
T hypot(T a, T b) | ||||
{ | ||||
T absa = abs(a), absb = abs(b); | ||||
if (absa > absb) | ||||
return absa * VIGRA_CSTD::sqrt(1.0 + sq(absb/absa)); | ||||
else | ||||
return absb == NumericTraits<T>::zero() | ||||
? NumericTraits<T>::zero() | ||||
: absb * VIGRA_CSTD::sqrt(1.0 + sq(absa/absb)); | ||||
} | ||||
#else | ||||
using ::hypot; | ||||
#endif | ||||
/*! The sign function. | ||||
Returns 1, 0, or -1 depending on the signm of \a t. | ||||
<b>\#include</b> "<a href="mathutil_8hxx-source.html">vigra/mathutil.hx | ||||
x</a>"<br> | ||||
Namespace: vigra | ||||
*/ | ||||
template <class T> | ||||
T sign(T t) | ||||
{ | ||||
return t > NumericTraits<T>::zero() | ||||
? NumericTraits<T>::one() | ||||
: t < NumericTraits<T>::zero() | ||||
? -NumericTraits<T>::one() | ||||
: NumericTraits<T>::zero(); | ||||
} | ||||
/*! The binary sign function. | ||||
Transfers the sign of \a t2 to \a t1. | ||||
<b>\#include</b> "<a href="mathutil_8hxx-source.html">vigra/mathutil.hx | ||||
x</a>"<br> | ||||
Namespace: vigra | ||||
*/ | ||||
template <class T1, class T2> | ||||
T1 sign(T1 t1, T2 t2) | ||||
{ | ||||
return t2 >= NumericTraits<T2>::zero() | ||||
? abs(t1) | ||||
: -abs(t1); | ||||
} | ||||
//@} | //@} | |||
} // namespace vigra | } // namespace vigra | |||
#endif /* VIGRA_MATHUTIL_HXX */ | #endif /* VIGRA_MATHUTIL_HXX */ | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 63 lines changed or added | |||
memory.hxx | memory.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2002-2003 by Ullrich Koethe, Hans Meine */ | /* Copyright 2002-2003 by Ullrich Koethe, Hans Meine */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
metaprogramming.hxx | metaprogramming.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 85 | skipping to change at line 85 | |||
"<a href="multi__array_8hxx-source.html">vigra/multi_array.hxx</a>" | "<a href="multi__array_8hxx-source.html">vigra/multi_array.hxx</a>" | |||
Namespace: vigra | Namespace: vigra | |||
*/ | */ | |||
struct UnstridedArrayTag {}; | struct UnstridedArrayTag {}; | |||
template<class T> | template<class T> | |||
class TypeTraits | class TypeTraits | |||
{ | { | |||
public: | public: | |||
typedef VigraFalseType isConst; | ||||
typedef VigraFalseType isPOD; | typedef VigraFalseType isPOD; | |||
typedef VigraFalseType isBuiltinType; | typedef VigraFalseType isBuiltinType; | |||
}; | }; | |||
#ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION | #ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION | |||
template<class T> | template<class T> | |||
class TypeTraits<T const> | ||||
: public TypeTraits<T> | ||||
{ | ||||
public: | ||||
typedef VigraTrueType isConst; | ||||
}; | ||||
template<class T> | ||||
class TypeTraits<T *> | class TypeTraits<T *> | |||
{ | { | |||
public: | public: | |||
typedef VigraFalseType isConst; | ||||
typedef VigraTrueType isPOD; | typedef VigraTrueType isPOD; | |||
typedef VigraTrueType isBuiltinType; | typedef VigraTrueType isBuiltinType; | |||
}; | }; | |||
template<class T> | template<class T> | |||
class TypeTraits<T const *> | class TypeTraits<T const *> | |||
{ | { | |||
public: | public: | |||
typedef VigraFalseType isConst; | ||||
typedef VigraTrueType isPOD; | typedef VigraTrueType isPOD; | |||
typedef VigraTrueType isBuiltinType; | typedef VigraTrueType isBuiltinType; | |||
}; | }; | |||
#endif // NO_PARTIAL_TEMPLATE_SPECIALIZATION | #endif // NO_PARTIAL_TEMPLATE_SPECIALIZATION | |||
#define VIGRA_TYPE_TRAITS(type) \ | #define VIGRA_TYPE_TRAITS(type) \ | |||
template<> \ | template<> \ | |||
class TypeTraits<type> \ | class TypeTraits<type> \ | |||
{ \ | { \ | |||
public: \ | public: \ | |||
typedef VigraFalseType isConst; \ | ||||
typedef VigraTrueType isPOD; \ | typedef VigraTrueType isPOD; \ | |||
typedef VigraTrueType isBuiltinType; \ | typedef VigraTrueType isBuiltinType; \ | |||
}; | }; | |||
VIGRA_TYPE_TRAITS(char) | VIGRA_TYPE_TRAITS(char) | |||
VIGRA_TYPE_TRAITS(signed char) | VIGRA_TYPE_TRAITS(signed char) | |||
VIGRA_TYPE_TRAITS(unsigned char) | VIGRA_TYPE_TRAITS(unsigned char) | |||
VIGRA_TYPE_TRAITS(short) | VIGRA_TYPE_TRAITS(short) | |||
VIGRA_TYPE_TRAITS(unsigned short) | VIGRA_TYPE_TRAITS(unsigned short) | |||
VIGRA_TYPE_TRAITS(int) | VIGRA_TYPE_TRAITS(int) | |||
skipping to change at line 135 | skipping to change at line 147 | |||
VIGRA_TYPE_TRAITS(long) | VIGRA_TYPE_TRAITS(long) | |||
VIGRA_TYPE_TRAITS(unsigned long) | VIGRA_TYPE_TRAITS(unsigned long) | |||
VIGRA_TYPE_TRAITS(float) | VIGRA_TYPE_TRAITS(float) | |||
VIGRA_TYPE_TRAITS(double) | VIGRA_TYPE_TRAITS(double) | |||
VIGRA_TYPE_TRAITS(long double) | VIGRA_TYPE_TRAITS(long double) | |||
#undef VIGRA_TYPE_TRAITS | #undef VIGRA_TYPE_TRAITS | |||
//@} | //@} | |||
#ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION | ||||
template <class L, class R> | template <class L, class R> | |||
struct And; | struct And; | |||
template <> | template <> | |||
struct And<VigraFalseType, VigraFalseType> | struct And<VigraFalseType, VigraFalseType> | |||
{ | { | |||
typedef VigraFalseType result; | typedef VigraFalseType result; | |||
static const bool boolResult = false; | ||||
}; | }; | |||
template <> | template <> | |||
struct And<VigraFalseType, VigraTrueType> | struct And<VigraFalseType, VigraTrueType> | |||
{ | { | |||
typedef VigraFalseType result; | typedef VigraFalseType result; | |||
static const bool boolResult = false; | ||||
}; | }; | |||
template <> | template <> | |||
struct And<VigraTrueType, VigraFalseType> | struct And<VigraTrueType, VigraFalseType> | |||
{ | { | |||
typedef VigraFalseType result; | typedef VigraFalseType result; | |||
static const bool boolResult = false; | ||||
}; | }; | |||
template <> | template <> | |||
struct And<VigraTrueType, VigraTrueType> | struct And<VigraTrueType, VigraTrueType> | |||
{ | { | |||
typedef VigraTrueType result; | typedef VigraTrueType result; | |||
static const bool boolResult = true; | ||||
}; | }; | |||
template <class L, class R> | template <class L, class R> | |||
struct Or; | struct Or; | |||
template <> | template <> | |||
struct Or<VigraFalseType, VigraFalseType> | struct Or<VigraFalseType, VigraFalseType> | |||
{ | { | |||
typedef VigraFalseType result; | typedef VigraFalseType result; | |||
static const bool boolResult = false; | ||||
}; | }; | |||
template <> | template <> | |||
struct Or<VigraTrueType, VigraFalseType> | struct Or<VigraTrueType, VigraFalseType> | |||
{ | { | |||
typedef VigraTrueType result; | typedef VigraTrueType result; | |||
static const bool boolResult = true; | ||||
}; | }; | |||
template <> | template <> | |||
struct Or<VigraFalseType, VigraTrueType> | struct Or<VigraFalseType, VigraTrueType> | |||
{ | { | |||
typedef VigraTrueType result; | typedef VigraTrueType result; | |||
static const bool boolResult = true; | ||||
}; | }; | |||
template <> | template <> | |||
struct Or<VigraTrueType, VigraTrueType> | struct Or<VigraTrueType, VigraTrueType> | |||
{ | { | |||
typedef VigraTrueType result; | typedef VigraTrueType result; | |||
static const bool boolResult = true; | ||||
}; | }; | |||
#ifndef NO_PARTIAL_TEMPLATE_SPECIALIZATION | ||||
template <class PREDICATE, class TRUECASE, class FALSECASE> | template <class PREDICATE, class TRUECASE, class FALSECASE> | |||
struct If; | struct If; | |||
template <class TRUECASE, class FALSECASE> | template <class TRUECASE, class FALSECASE> | |||
struct If<VigraTrueType, TRUECASE, FALSECASE> | struct If<VigraTrueType, TRUECASE, FALSECASE> | |||
{ | { | |||
typedef TRUECASE type; | typedef TRUECASE type; | |||
}; | }; | |||
template <class TRUECASE, class FALSECASE> | template <class TRUECASE, class FALSECASE> | |||
skipping to change at line 221 | skipping to change at line 241 | |||
{ | { | |||
typedef TRUECASE type; | typedef TRUECASE type; | |||
}; | }; | |||
template <class TRUECASE, class FALSECASE> | template <class TRUECASE, class FALSECASE> | |||
struct IfBool<false, TRUECASE, FALSECASE> | struct IfBool<false, TRUECASE, FALSECASE> | |||
{ | { | |||
typedef FALSECASE type; | typedef FALSECASE type; | |||
}; | }; | |||
template <class L, class R> | ||||
struct IsSameType | ||||
{ | ||||
typedef VigraFalseType result; | ||||
static const bool boolResult = false; | ||||
}; | ||||
template <class T> | ||||
struct IsSameType<T, T> | ||||
{ | ||||
typedef VigraTrueType result; | ||||
static const bool boolResult = true; | ||||
}; | ||||
template <class DERIVED, class BASE> | template <class DERIVED, class BASE> | |||
struct IsDerivedFrom | struct IsDerivedFrom | |||
{ | { | |||
typedef char falseResult[1]; | typedef char falseResult[1]; | |||
typedef char trueResult[2]; | typedef char trueResult[2]; | |||
static falseResult * test(...) { return 0; } | static falseResult * testIsDerivedFrom(...); | |||
static trueResult * test(BASE const *) { return 0; } | static trueResult * testIsDerivedFrom(BASE const *); | |||
enum { resultSize = sizeof(*test((DERIVED const *)0)) }; | enum { resultSize = sizeof(*testIsDerivedFrom((DERIVED const *)0)) }; | |||
static const bool boolResult = (resultSize == 2); | ||||
typedef typename | typedef typename | |||
IfBool<(resultSize == 2), VigraTrueType, VigraFalseType>::type | IfBool<boolResult, VigraTrueType, VigraFalseType>::type | |||
result; | result; | |||
}; | }; | |||
#endif // NO_PARTIAL_TEMPLATE_SPECIALIZATION | #endif // NO_PARTIAL_TEMPLATE_SPECIALIZATION | |||
} // namespace vigra | } // namespace vigra | |||
#endif /* VIGRA_METAPROGRAMMING_HXX */ | #endif /* VIGRA_METAPROGRAMMING_HXX */ | |||
End of changes. 21 change blocks. | ||||
7 lines changed or deleted | 42 lines changed or added | |||
multi_array.hxx | multi_array.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2003 by Gunnar Kedenburg */ | /* Copyright 2003 by Gunnar Kedenburg */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* ( Version 1.3.0, Sep 10 2004 ) */ | /* ( Version 1.3.0, Sep 10 2004 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
skipping to change at line 162 | skipping to change at line 162 | |||
template <> | template <> | |||
struct MultiIteratorChooser <UnstridedArrayTag> | struct MultiIteratorChooser <UnstridedArrayTag> | |||
{ | { | |||
template <unsigned int N, class T, class REFERENCE, class POINTER> | template <unsigned int N, class T, class REFERENCE, class POINTER> | |||
struct Traverser | struct Traverser | |||
{ | { | |||
typedef MultiIterator <N, T, REFERENCE, POINTER> type; | typedef MultiIterator <N, T, REFERENCE, POINTER> type; | |||
}; | }; | |||
}; | }; | |||
template <class DestIterator, class Shape, class T, int N> | ||||
void | ||||
initMultiArrayData(DestIterator d, Shape const & shape, T const & init, Met | ||||
aInt<N>) | ||||
{ | ||||
DestIterator dend = d + shape[N]; | ||||
for(; d != dend; ++d) | ||||
{ | ||||
initMultiArrayData(d.begin(), shape, init, MetaInt<N-1>()); | ||||
} | ||||
} | ||||
template <class DestIterator, class Shape, class T> | ||||
void | ||||
initMultiArrayData(DestIterator d, Shape const & shape, T const & init, Met | ||||
aInt<0>) | ||||
{ | ||||
DestIterator dend = d + shape[0]; | ||||
for(; d != dend; ++d) | ||||
{ | ||||
*d = init; | ||||
} | ||||
} | ||||
template <class SrcIterator, class Shape, class DestIterator, int N> | ||||
void | ||||
copyMultiArrayData(SrcIterator s, Shape const & shape, DestIterator d, Meta | ||||
Int<N>) | ||||
{ | ||||
SrcIterator send = s + shape[N]; | ||||
for(; s != send; ++s, ++d) | ||||
{ | ||||
copyMultiArrayData(s.begin(), shape, d.begin(), MetaInt<N-1>()); | ||||
} | ||||
} | ||||
template <class SrcIterator, class Shape, class DestIterator> | ||||
void | ||||
copyMultiArrayData(SrcIterator s, Shape const & shape, DestIterator d, Meta | ||||
Int<0>) | ||||
{ | ||||
SrcIterator send = s + shape[0]; | ||||
for(; s != send; ++s, ++d) | ||||
{ | ||||
*d = *s; | ||||
} | ||||
} | ||||
template <class SrcIterator, class Shape, class T, class ALLOC, int N> | ||||
void | ||||
uninitializedCopyMultiArrayData(SrcIterator s, Shape const & shape, T * & d | ||||
, ALLOC & a, MetaInt<N>) | ||||
{ | ||||
SrcIterator send = s + shape[N]; | ||||
for(; s != send; ++s) | ||||
{ | ||||
uninitializedCopyMultiArrayData(s.begin(), shape, d, a, MetaInt<N-1 | ||||
>()); | ||||
} | ||||
} | ||||
template <class SrcIterator, class Shape, class T, class ALLOC> | ||||
void | ||||
uninitializedCopyMultiArrayData(SrcIterator s, Shape const & shape, T * & d | ||||
, ALLOC & a, MetaInt<0>) | ||||
{ | ||||
SrcIterator send = s + shape[0]; | ||||
for(; s != send; ++s, ++d) | ||||
{ | ||||
a.construct(d, *s); | ||||
} | ||||
} | ||||
} // namespace detail | } // namespace detail | |||
/********************************************************/ | /********************************************************/ | |||
/* */ | /* */ | |||
/* MultiArrayView */ | /* MultiArrayView */ | |||
/* */ | /* */ | |||
/********************************************************/ | /********************************************************/ | |||
// forward declaration | // forward declaration | |||
template <unsigned int N, class T, class C = UnstridedArrayTag> | template <unsigned int N, class T, class C = UnstridedArrayTag> | |||
skipping to change at line 282 | skipping to change at line 348 | |||
/** the strides (offset of a sample to the next) for every dimensio n | /** the strides (offset of a sample to the next) for every dimensio n | |||
are stored here. | are stored here. | |||
*/ | */ | |||
difference_type m_stride; | difference_type m_stride; | |||
/** pointer to the image. | /** pointer to the image. | |||
*/ | */ | |||
pointer m_ptr; | pointer m_ptr; | |||
private: | ||||
/** traverse an array element-by-element by using a difference_type | ||||
* object as access coordinates. | ||||
*/ | ||||
bool inc_navigator (difference_type &nav) | ||||
{ | ||||
// essentially, this is nothing more than incrementing a number | ||||
// in radix representation up to a certain limit, the shape. | ||||
int carry = 1; | ||||
for (unsigned int d = 0; d < actual_dimension; ++d) { | ||||
if (nav [d] + carry < m_shape [d]) { | ||||
nav [d] += carry; | ||||
return true; | ||||
} else { | ||||
nav [d] = 0; | ||||
} | ||||
} | ||||
return false; | ||||
} | ||||
public: | public: | |||
/** default constructor: create an empty image of size 0. | /** default constructor: create an empty image of size 0. | |||
*/ | */ | |||
MultiArrayView () | MultiArrayView () | |||
: m_shape (0), m_stride (0), m_ptr (0) | : m_shape (0), m_stride (0), m_ptr (0) | |||
{} | {} | |||
/** construct from shape and pointer | /** construct from shape and pointer | |||
*/ | */ | |||
skipping to change at line 406 | skipping to change at line 451 | |||
return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_str ide[3]*u]; | return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_str ide[3]*u]; | |||
} | } | |||
/** 5D const array access. Use only if N == 5. | /** 5D const array access. Use only if N == 5. | |||
*/ | */ | |||
const_reference operator() (int x, int y, int z, int u, int v) const | const_reference operator() (int x, int y, int z, int u, int v) const | |||
{ | { | |||
return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_str ide[3]*u + m_stride[4]*v]; | return m_ptr [m_stride[0]*x + m_stride[1]*y + m_stride[2]*z + m_str ide[3]*u + m_stride[4]*v]; | |||
} | } | |||
#if 0 | /** Init with a constant. | |||
/** shape assignment. | ||||
*/ | */ | |||
template <class CN> | template <class U> | |||
reference operator= (const MultiArrayView <N, T, CN>& rhs) | void init(const U & init); | |||
{ | ||||
assert (shape () == rhs.shape ()); | /** Copy the data of the right-hand array (array shapes must match) | |||
difference_type nav; | . | |||
if (shape () != nav) | */ | |||
(*this) [nav] = rhs [nav]; | template <class U, class CN> | |||
while (inc_navigator (nav)) | void copy(const MultiArrayView <N, U, CN>& rhs); | |||
(*this) [nav] = rhs [nav]; | ||||
} | ||||
#endif /* #if 0 */ | ||||
#ifndef NO_OUT_OF_LINE_MEMBER_TEMPLATES | ||||
/** bind the M outmost dimensions to certain indices. | /** bind the M outmost dimensions to certain indices. | |||
this reduces the dimensionality of the image to | this reduces the dimensionality of the image to | |||
max { 1, N-M } | max { 1, N-M } | |||
*/ | */ | |||
template <unsigned int M> | template <unsigned int M> | |||
MultiArrayView <N-M, T, C> bindOuter (const TinyVector <int, M> &d) con st; | MultiArrayView <N-M, T, C> bindOuter (const TinyVector <int, M> &d) con st; | |||
/** bind the M innermost dimensions to certain indices. | /** bind the M innermost dimensions to certain indices. | |||
this reduces the dimensionality of the image to | this reduces the dimensionality of the image to | |||
max { 1, N-M } | max { 1, N-M } | |||
skipping to change at line 444 | skipping to change at line 483 | |||
MultiArrayView <N-M, T, StridedArrayTag> | MultiArrayView <N-M, T, StridedArrayTag> | |||
bindInner (const TinyVector <int, M> &d) const; | bindInner (const TinyVector <int, M> &d) const; | |||
/** bind dimension M to index d. | /** bind dimension M to index d. | |||
this reduces the dimensionality of the image to | this reduces the dimensionality of the image to | |||
max { 1, N-1 } | max { 1, N-1 } | |||
*/ | */ | |||
template <unsigned int M> | template <unsigned int M> | |||
MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type > | MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type > | |||
bind (int d) const; | bind (int d) const; | |||
#else | ||||
template <unsigned int M> | ||||
MultiArrayView <N-M, T, C> bindOuter (const TinyVector <int, M> &d) con | ||||
st | ||||
{ | ||||
return bindOuterImpl(*this, d); | ||||
} | ||||
template <unsigned int M> | ||||
MultiArrayView <N-M, T, StridedArrayTag> | ||||
bindInner (const TinyVector <int, M> &d) const | ||||
{ | ||||
return bindInnerImpl(*this, d); | ||||
} | ||||
template <unsigned int M> | ||||
MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type > | ||||
bind (int d) const | ||||
{ | ||||
return bindImpl<M>(*this, d); | ||||
} | ||||
#endif | ||||
/** bind the outmost dimension to a certain index. | /** bind the outmost dimension to a certain index. | |||
this reduces the dimensionality of the image to | this reduces the dimensionality of the image to | |||
max { 1, N-1 } | max { 1, N-1 } | |||
*/ | */ | |||
MultiArrayView <N-1, T, C> bindOuter (int d) const; | MultiArrayView <N-1, T, C> bindOuter (int d) const; | |||
/** bind the innermost dimension to a certain index. | /** bind the innermost dimension to a certain index. | |||
this reduces the dimensionality of the image to | this reduces the dimensionality of the image to | |||
max { 1, N-1 } | max { 1, N-1 } | |||
*/ | */ | |||
MultiArrayView <N-1, T, StridedArrayTag> bindInner (int d) const; | MultiArrayView <N-1, T, StridedArrayTag> bindInner (int d) const; | |||
/** bind dimension m to index d. | /** bind dimension m to index d. | |||
this reduces the dimensionality of the image to | this reduces the dimensionality of the image to | |||
max { 1, N-1 } | max { 1, N-1 } | |||
*/ | */ | |||
MultiArrayView <N-1, T, StridedArrayTag> | MultiArrayView <N-1, T, StridedArrayTag> | |||
bindAt (int m, int d) const; | bindAt (int m, int d) const; | |||
/** bind dimension m to index d. | ||||
this reduces the dimensionality of the image to | ||||
max { 1, N-1 } | ||||
*/ | ||||
MultiArrayView <N-1, T, StridedArrayTag> | ||||
bindRow (int d) const; | ||||
/** bind dimension m to index d. | ||||
this reduces the dimensionality of the image to | ||||
max { 1, N-1 } | ||||
*/ | ||||
MultiArrayView <N-1, T, C> | ||||
bindColumn (int d) const; | ||||
/** create a rectangular subarray that spans between the | /** create a rectangular subarray that spans between the | |||
points p and q, where p is in the subarray, q not. | points p and q, where p is in the subarray, q not. | |||
*/ | */ | |||
MultiArrayView subarray (const difference_type &p, | MultiArrayView subarray (const difference_type &p, | |||
const difference_type &q) const | const difference_type &q) const | |||
{ | { | |||
const int offset = dot (m_stride, p); | const int offset = dot (m_stride, p); | |||
return MultiArrayView (q - p, m_stride, m_ptr + offset); | return MultiArrayView (q - p, m_stride, m_ptr + offset); | |||
} | } | |||
skipping to change at line 529 | skipping to change at line 533 | |||
for (unsigned int i = 0; i < actual_dimension; ++i) | for (unsigned int i = 0; i < actual_dimension; ++i) | |||
shape [i] /= s [i]; | shape [i] /= s [i]; | |||
return MultiArrayView <N, T, StridedArrayTag> | return MultiArrayView <N, T, StridedArrayTag> | |||
(shape, m_stride * s, m_ptr); | (shape, m_stride * s, m_ptr); | |||
} | } | |||
/** number of the elements in the array. | /** number of the elements in the array. | |||
*/ | */ | |||
std::size_t elementCount () const | std::size_t elementCount () const | |||
{ | { | |||
return m_shape [actual_dimension-1] * m_stride [actual_dimension-1] | std::size_t ret = m_shape[0]; | |||
; | for(unsigned int i = 1; i < actual_dimension; ++i) | |||
ret *= m_shape[i]; | ||||
return ret; | ||||
} | } | |||
/** return the array's size. | /** return the array's size. | |||
*/ | */ | |||
const size_type & size () const | const size_type & size () const | |||
{ | { | |||
return m_shape; | return m_shape; | |||
} | } | |||
/** return the array's shape (same as the <tt>size()</tt>). | /** return the array's shape (same as the <tt>size()</tt>). | |||
skipping to change at line 631 | skipping to change at line 638 | |||
view_type view () | view_type view () | |||
{ | { | |||
return *this; | return *this; | |||
} | } | |||
}; | }; | |||
template <unsigned int N, class T, class C> | template <unsigned int N, class T, class C> | |||
MultiArrayView <N, T, C>::MultiArrayView (const difference_type &shape, | MultiArrayView <N, T, C>::MultiArrayView (const difference_type &shape, | |||
pointer ptr) | pointer ptr) | |||
: m_shape (shape), m_stride (defaultStride (shape)), m_ptr (ptr) | : m_shape (shape), m_stride (detail::defaultStride <MultiArrayView<N,T> ::actual_dimension> (shape)), m_ptr (ptr) | |||
{} | {} | |||
template <unsigned int N, class T, class C> | template <unsigned int N, class T, class C> | |||
MultiArrayView <N, T, C>::MultiArrayView | MultiArrayView <N, T, C>::MultiArrayView | |||
(const difference_type &shape, const difference_type &stride, pointer ptr) | (const difference_type &shape, const difference_type &stride, pointer ptr) | |||
: m_shape (shape), m_stride (stride), m_ptr (ptr) | : m_shape (shape), m_stride (stride), m_ptr (ptr) | |||
{} | {} | |||
#ifndef NO_OUT_OF_LINE_MEMBER_TEMPLATES | template <unsigned int N, class T, class C> | |||
template <class U> | ||||
void | ||||
MultiArrayView <N, T, C>::init(const U & init) | ||||
{ | ||||
detail::initMultiArrayData(traverser_begin(), shape(), init, MetaInt<ac | ||||
tual_dimension-1>()); | ||||
} | ||||
template <unsigned int N, class T, class C> | ||||
template <class U, class CN> | ||||
void | ||||
MultiArrayView <N, T, C>::copy(const MultiArrayView <N, U, CN>& rhs) | ||||
{ | ||||
if(this == &rhs) | ||||
return; | ||||
vigra_precondition (shape () == rhs.shape (), | ||||
"MultiArrayView::copy(): shape mismatch."); | ||||
detail::copyMultiArrayData(rhs.traverser_begin(), shape(), traverser_be | ||||
gin(), MetaInt<actual_dimension-1>()); | ||||
} | ||||
template <unsigned int N, class T, class C> | template <unsigned int N, class T, class C> | |||
template <unsigned int M> | template <unsigned int M> | |||
MultiArrayView <N-M, T, C> | MultiArrayView <N-M, T, C> | |||
MultiArrayView <N, T, C>::bindOuter (const TinyVector <int, M> &d) const | MultiArrayView <N, T, C>::bindOuter (const TinyVector <int, M> &d) const | |||
{ | { | |||
TinyVector <int, M> stride; | TinyVector <int, M> stride; | |||
stride.init (m_stride.begin () + N-M, m_stride.end ()); | stride.init (m_stride.begin () + N-M, m_stride.end ()); | |||
pointer ptr = m_ptr + dot (d, stride); | pointer ptr = m_ptr + dot (d, stride); | |||
static const int NNew = (N-M == 0) ? 1 : N-M; | static const int NNew = (N-M == 0) ? 1 : N-M; | |||
TinyVector <int, NNew> inner_shape, inner_stride; | TinyVector <int, NNew> inner_shape, inner_stride; | |||
skipping to change at line 714 | skipping to change at line 740 | |||
std::copy (m_shape.begin () + M+1, m_shape.end (), | std::copy (m_shape.begin () + M+1, m_shape.end (), | |||
shape.begin () + M); | shape.begin () + M); | |||
std::copy (m_stride.begin (), m_stride.begin () + M, stride.begin ( )); | std::copy (m_stride.begin (), m_stride.begin () + M, stride.begin ( )); | |||
std::copy (m_stride.begin () + M+1, m_stride.end (), | std::copy (m_stride.begin () + M+1, m_stride.end (), | |||
stride.begin () + M); | stride.begin () + M); | |||
} | } | |||
return MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type> | return MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type> | |||
(shape, stride, m_ptr + d * m_stride[M]); | (shape, stride, m_ptr + d * m_stride[M]); | |||
} | } | |||
#else // NO_OUT_OF_LINE_MEMBER_TEMPLATES | ||||
template <unsigned int N, class T, class C, unsigned int M> | ||||
MultiArrayView <N-M, T, C> | ||||
bindOuterImpl(MultiArrayView <N, T, C> const & self, const TinyVector <int, | ||||
M> &d) | ||||
{ | ||||
TinyVector <int, M> stride; | ||||
stride.init (self.stride().begin () + N-M, self.stride().end ()); | ||||
typename MultiArrayView <N, T, C>::pointer ptr = self.data() + dot (d, | ||||
stride); | ||||
static const int NNew = (N-M == 0) ? 1 : N-M; | ||||
TinyVector <int, NNew> inner_shape, inner_stride; | ||||
if (N-M == 0) | ||||
{ | ||||
inner_shape [0] = 1; | ||||
inner_stride [0] = 0; | ||||
} | ||||
else | ||||
{ | ||||
inner_shape.init (self.shape().begin (), self.shape().end () - M); | ||||
inner_stride.init (self.stride().begin (), self.stride().end () - M | ||||
); | ||||
} | ||||
return MultiArrayView <N-M, T, C> (inner_shape, inner_stride, ptr); | ||||
} | ||||
template <unsigned int N, class T, class C, unsigned int M> | ||||
MultiArrayView <N - M, T, StridedArrayTag> | ||||
bindInnerImpl(MultiArrayView <N, T, C> const & self, const TinyVector <int, | ||||
M> &d) | ||||
{ | ||||
TinyVector <int, M> stride; | ||||
stride.init (self.stride().begin (), self.stride().end () - N + M); | ||||
typename MultiArrayView <N, T, C>::pointer ptr = self.data() + dot (d, | ||||
stride); | ||||
static const int NNew = (N-M == 0) ? 1 : N-M; | ||||
TinyVector <int, NNew> outer_shape, outer_stride; | ||||
if (N-M == 0) | ||||
{ | ||||
outer_shape [0] = 1; | ||||
outer_stride [0] = 0; | ||||
} | ||||
else | ||||
{ | ||||
outer_shape.init (self.shape().begin () + M, self.shape().end ()); | ||||
outer_stride.init (self.stride().begin () + M, self.stride().end () | ||||
); | ||||
} | ||||
return MultiArrayView <N-M, T, StridedArrayTag> | ||||
(outer_shape, outer_stride, ptr); | ||||
} | ||||
template <unsigned int M, unsigned int N, class T, class C> | ||||
MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type > | ||||
bindImpl(MultiArrayView <N, T, C> const & self, int d) | ||||
{ | ||||
static const int NNew = (N-1 == 0) ? 1 : N-1; | ||||
TinyVector <int, NNew> shape, stride; | ||||
// the remaining dimensions are 0..n-1,n+1..N-1 | ||||
if (N-1 == 0) | ||||
{ | ||||
shape[0] = 1; | ||||
stride[0] = 0; | ||||
} | ||||
else | ||||
{ | ||||
std::copy (self.shape().begin (), self.shape().begin () + M, shape. | ||||
begin ()); | ||||
std::copy (self.shape().begin () + M+1, self.shape().end (), | ||||
shape.begin () + M); | ||||
std::copy (self.stride().begin (), self.stride().begin () + M, stri | ||||
de.begin ()); | ||||
std::copy (self.stride().begin () + M+1, self.stride().end (), | ||||
stride.begin () + M); | ||||
} | ||||
return MultiArrayView <N-1, T, typename detail::MaybeStrided <M>::type> | ||||
(shape, stride, self.data() + d * self.stride(M)); | ||||
} | ||||
#endif // NO_OUT_OF_LINE_MEMBER_TEMPLATES | ||||
template <unsigned int N, class T, class C> | template <unsigned int N, class T, class C> | |||
MultiArrayView <N - 1, T, C> | MultiArrayView <N - 1, T, C> | |||
MultiArrayView <N, T, C>::bindOuter (int d) const | MultiArrayView <N, T, C>::bindOuter (int d) const | |||
{ | { | |||
static const int NNew = (N-1 == 0) ? 1 : N-1; | static const int NNew = (N-1 == 0) ? 1 : N-1; | |||
TinyVector <int, NNew> inner_shape, inner_stride; | TinyVector <int, NNew> inner_shape, inner_stride; | |||
if (N-1 == 0) | if (N-1 == 0) | |||
{ | { | |||
inner_shape [0] = 1; | inner_shape [0] = 1; | |||
inner_stride [0] = 0; | inner_stride [0] = 0; | |||
skipping to change at line 855 | skipping to change at line 808 | |||
std::copy (m_shape.begin () + n+1, m_shape.end (), | std::copy (m_shape.begin () + n+1, m_shape.end (), | |||
shape.begin () + n); | shape.begin () + n); | |||
std::copy (m_stride.begin (), m_stride.begin () + n, stride.begin ( )); | std::copy (m_stride.begin (), m_stride.begin () + n, stride.begin ( )); | |||
std::copy (m_stride.begin () + n+1, m_stride.end (), | std::copy (m_stride.begin () + n+1, m_stride.end (), | |||
stride.begin () + n); | stride.begin () + n); | |||
} | } | |||
return MultiArrayView <N-1, T, StridedArrayTag> | return MultiArrayView <N-1, T, StridedArrayTag> | |||
(shape, stride, m_ptr + d * m_stride[n]); | (shape, stride, m_ptr + d * m_stride[n]); | |||
} | } | |||
template <unsigned int N, class T, class C> | ||||
MultiArrayView <N-1, T, StridedArrayTag> | ||||
MultiArrayView <N, T, C>::bindRow (int d) const | ||||
{ | ||||
return this->bindInner (d); | ||||
} | ||||
template <unsigned int N, class T, class C> | ||||
MultiArrayView <N-1, T, C> | ||||
MultiArrayView <N, T, C>::bindColumn (int d) const | ||||
{ | ||||
return this->bindOuter (d); | ||||
} | ||||
/********************************************************/ | /********************************************************/ | |||
/* */ | /* */ | |||
/* MultiArray */ | /* MultiArray */ | |||
/* */ | /* */ | |||
/********************************************************/ | /********************************************************/ | |||
/** \brief Main <TT>MultiArray</TT> class containing the memory | /** \brief Main <TT>MultiArray</TT> class containing the memory | |||
management. | management. | |||
This class inherits the interface of MultiArrayView, and implements | This class inherits the interface of MultiArrayView, and implements | |||
skipping to change at line 902 | skipping to change at line 841 | |||
<b>\#include</b> | <b>\#include</b> | |||
"<a href="multi__array_8hxx-source.html">vigra/multi_array.hxx</a>" | "<a href="multi__array_8hxx-source.html">vigra/multi_array.hxx</a>" | |||
Namespace: vigra | Namespace: vigra | |||
*/ | */ | |||
template <unsigned int N, class T, class A /* default already declared abov e */> | template <unsigned int N, class T, class A /* default already declared abov e */> | |||
class MultiArray : public MultiArrayView <N, T> | class MultiArray : public MultiArrayView <N, T> | |||
{ | { | |||
public: | public: | |||
using MultiArrayView <N, T>::actual_dimension; | ||||
/** the allocator type used to allocate the memory | /** the allocator type used to allocate the memory | |||
*/ | */ | |||
typedef A allocator_type; | typedef A allocator_type; | |||
/** the view type associated with this array. | /** the view type associated with this array. | |||
*/ | */ | |||
typedef MultiArrayView <N, T> view_type; | typedef MultiArrayView <N, T> view_type; | |||
/** the matrix type associated with this array. | /** the matrix type associated with this array. | |||
*/ | */ | |||
typedef MultiArray <N, T> matrix_type; | typedef MultiArray <N, T, A> matrix_type; | |||
/** the array's value type | /** the array's value type | |||
*/ | */ | |||
typedef typename view_type::value_type value_type; | typedef typename view_type::value_type value_type; | |||
/** pointer type | /** pointer type | |||
*/ | */ | |||
typedef typename view_type::pointer pointer; | typedef typename view_type::pointer pointer; | |||
/** const pointer type | /** const pointer type | |||
skipping to change at line 977 | skipping to change at line 917 | |||
allocator_type m_alloc; | allocator_type m_alloc; | |||
/** allocate memory for s pixels, write its address into the given | /** allocate memory for s pixels, write its address into the given | |||
pointer and initialize the pixels with init. | pointer and initialize the pixels with init. | |||
*/ | */ | |||
void allocate (pointer &ptr, std::size_t s, const_reference init); | void allocate (pointer &ptr, std::size_t s, const_reference init); | |||
/** allocate memory for s pixels, write its address into the given | /** allocate memory for s pixels, write its address into the given | |||
pointer and initialize the linearized pixels to the values of i nit. | pointer and initialize the linearized pixels to the values of i nit. | |||
*/ | */ | |||
void allocate (pointer &ptr, std::size_t s, const_pointer init); | template <class U> | |||
void allocate (pointer &ptr, std::size_t s, U const * init); | ||||
/** allocate memory, write its address into the given | ||||
pointer and initialize it by copying the data from the given Mu | ||||
ltiArrayView. | ||||
*/ | ||||
template <class U, class C> | ||||
void allocate (pointer &ptr, MultiArrayView<N, U, C> const & init); | ||||
/** deallocate the memory (of length s) starting at the given addre ss. | /** deallocate the memory (of length s) starting at the given addre ss. | |||
*/ | */ | |||
void deallocate (pointer &ptr, std::size_t s); | void deallocate (pointer &ptr, std::size_t s); | |||
public: | public: | |||
/** default constructor | /** default constructor | |||
*/ | */ | |||
MultiArray (); | MultiArray (); | |||
skipping to change at line 1012 | skipping to change at line 959 | |||
/** construct from shape and copy values from the given array | /** construct from shape and copy values from the given array | |||
*/ | */ | |||
MultiArray (const difference_type &shape, const_pointer init, | MultiArray (const difference_type &shape, const_pointer init, | |||
allocator_type const & alloc = allocator_type()); | allocator_type const & alloc = allocator_type()); | |||
/** copy constructor | /** copy constructor | |||
*/ | */ | |||
MultiArray (const MultiArray &rhs); | MultiArray (const MultiArray &rhs); | |||
/** construct by copying from a MultiArrayView | ||||
*/ | ||||
template <class U, class C> | ||||
MultiArray (const MultiArrayView<N, U, C> &rhs, | ||||
allocator_type const & alloc = allocator_type()); | ||||
/** assignment.<br> | /** assignment.<br> | |||
<em>Note:</em> this operation invalidates all dependent objects | If the size of \a rhs is the same as the left-hand side arrays' | |||
(array views and iterators) | s old size, only | |||
the data are copied. Otherwise, new storage is allocated, which | ||||
invalidates all | ||||
objects (array views, iterators) depending on the lhs array. | ||||
*/ | */ | |||
MultiArray &operator= (const MultiArray &rhs); | MultiArray &operator= (const MultiArray &rhs) | |||
{ | ||||
return this->operator=(static_cast<view_type const &>(rhs)); | ||||
} | ||||
/** assignment from arbitrary MultiArrayView.<br> | ||||
If the size of \a rhs is the same as the left-hand side arrays' | ||||
s old size, only | ||||
the data are copied. Otherwise, new storage is allocated, which | ||||
invalidates all | ||||
objects (array views, iterators) depending on the lhs array. | ||||
*/ | ||||
template <class U, class C> | ||||
MultiArray &operator= (const MultiArrayView<N, U, C> &rhs); | ||||
/** destructor | /** destructor | |||
*/ | */ | |||
~MultiArray (); | ~MultiArray (); | |||
/** change the shape and allocate new memory.<br> | /** change the shape and allocate new memory.<br> | |||
<em>Note:</em> this operation invalidates all dependent objects | <em>Note:</em> this operation invalidates all dependent objects | |||
(array views and iterators) | (array views and iterators) | |||
*/ | */ | |||
void reshape (const difference_type &shape) | void reshape (const difference_type &shape) | |||
skipping to change at line 1038 | skipping to change at line 1003 | |||
reshape (shape, NumericTraits <T>::zero ()); | reshape (shape, NumericTraits <T>::zero ()); | |||
} | } | |||
/** change the shape, allocate new memory and initialize it | /** change the shape, allocate new memory and initialize it | |||
with the given value.<br> | with the given value.<br> | |||
<em>Note:</em> this operation invalidates all dependent objects | <em>Note:</em> this operation invalidates all dependent objects | |||
(array views and iterators) | (array views and iterators) | |||
*/ | */ | |||
void reshape (const difference_type &shape, const_reference init); | void reshape (const difference_type &shape, const_reference init); | |||
/** Swap the contents with another MultiArray. This is fast, | ||||
because no data are copied, but only pointers and shapes swappe | ||||
d. | ||||
<em>Note:</em> this operation invalidates all dependent objects | ||||
(array views and iterators) | ||||
*/ | ||||
void swap (MultiArray & other); | ||||
/** sequential iterator pointing to the first array element. | /** sequential iterator pointing to the first array element. | |||
*/ | */ | |||
iterator begin () | iterator begin () | |||
{ | { | |||
return this->data(); | return this->data(); | |||
} | } | |||
/** sequential iterator pointing beyond the last array element. | /** sequential iterator pointing beyond the last array element. | |||
*/ | */ | |||
iterator end () | iterator end () | |||
skipping to change at line 1065 | skipping to change at line 1037 | |||
{ | { | |||
return this->data(); | return this->data(); | |||
} | } | |||
/** sequential const iterator pointing beyond the last array elemen t. | /** sequential const iterator pointing beyond the last array elemen t. | |||
*/ | */ | |||
const_iterator end () const | const_iterator end () const | |||
{ | { | |||
return this->data() + this->elementCount(); | return this->data() + this->elementCount(); | |||
} | } | |||
/** get the allocator. | ||||
*/ | ||||
allocator_type const & allocator () const | ||||
{ | ||||
return m_alloc; | ||||
} | ||||
}; | }; | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
MultiArray <N, T, A>::MultiArray () | MultiArray <N, T, A>::MultiArray () | |||
: MultiArrayView <N, T> (difference_type (0), difference_type (0), 0) | : MultiArrayView <N, T> (difference_type (0), difference_type (0), 0) | |||
{} | {} | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
MultiArray <N, T, A>::MultiArray (allocator_type const & alloc) | MultiArray <N, T, A>::MultiArray (allocator_type const & alloc) | |||
: MultiArrayView <N, T> (difference_type (0), difference_type (0), 0), | : MultiArrayView <N, T> (difference_type (0), difference_type (0), 0), | |||
skipping to change at line 1131 | skipping to change at line 1110 | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
MultiArray <N, T, A>::MultiArray (const MultiArray &rhs) | MultiArray <N, T, A>::MultiArray (const MultiArray &rhs) | |||
: MultiArrayView <N, T> (rhs.m_shape, rhs.m_stride, 0), | : MultiArrayView <N, T> (rhs.m_shape, rhs.m_stride, 0), | |||
m_alloc (rhs.m_alloc) | m_alloc (rhs.m_alloc) | |||
{ | { | |||
allocate (this->m_ptr, this->elementCount (), rhs.data ()); | allocate (this->m_ptr, this->elementCount (), rhs.data ()); | |||
} | } | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
template <class U, class C> | ||||
MultiArray <N, T, A>::MultiArray (const MultiArrayView<N, U, C> &rhs, | ||||
allocator_type const & alloc) | ||||
: MultiArrayView <N, T> (rhs.shape(), | ||||
detail::defaultStride <MultiArrayView<N,T>::ac | ||||
tual_dimension> (rhs.shape()), 0), | ||||
m_alloc (alloc) | ||||
{ | ||||
allocate (this->m_ptr, rhs); | ||||
} | ||||
template <unsigned int N, class T, class A> | ||||
MultiArray <N, T, A>::~MultiArray () | MultiArray <N, T, A>::~MultiArray () | |||
{ | { | |||
deallocate (this->m_ptr, this->elementCount ()); | deallocate (this->m_ptr, this->elementCount ()); | |||
} | } | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
template <class U, class C> | ||||
MultiArray <N, T, A> & | MultiArray <N, T, A> & | |||
MultiArray <N, T, A>::operator= (const MultiArray &rhs) | MultiArray <N, T, A>::operator= (const MultiArrayView<N, U, C> &rhs) | |||
{ | { | |||
if (this == &rhs) | if (this == &rhs) | |||
return *this; | return *this; | |||
pointer new_ptr; | if (this->shape() == rhs.shape()) | |||
allocate (new_ptr, rhs.elementCount (), rhs.data ()); | this->copy(rhs); | |||
deallocate (this->m_ptr, this->elementCount ()); | else | |||
m_alloc = rhs.m_alloc; | { | |||
this->m_shape = rhs.m_shape; | pointer new_ptr; | |||
this->m_stride = rhs.m_stride; | allocate (new_ptr, rhs); | |||
this->m_ptr = new_ptr; | deallocate (this->m_ptr, this->elementCount ()); | |||
this->m_shape = rhs.shape(); | ||||
this->m_stride = rhs.stride(); | ||||
this->m_ptr = new_ptr; | ||||
} | ||||
return *this; | return *this; | |||
} | } | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
void MultiArray <N, T, A>::reshape (const difference_type & new_shape, | void MultiArray <N, T, A>::reshape (const difference_type & new_shape, | |||
const_reference init) | const_reference init) | |||
{ | { | |||
if (N== 0) | if (N== 0) | |||
return; | return; | |||
skipping to change at line 1170 | skipping to change at line 1165 | |||
std::size_t new_size = new_shape [MultiArrayView<N,T>::actual_dimension -1] * new_stride [MultiArrayView<N,T>::actual_dimension-1]; | std::size_t new_size = new_shape [MultiArrayView<N,T>::actual_dimension -1] * new_stride [MultiArrayView<N,T>::actual_dimension-1]; | |||
T *new_ptr; | T *new_ptr; | |||
allocate (new_ptr, new_size, init); | allocate (new_ptr, new_size, init); | |||
deallocate (this->m_ptr, this->elementCount ()); | deallocate (this->m_ptr, this->elementCount ()); | |||
this->m_ptr = new_ptr; | this->m_ptr = new_ptr; | |||
this->m_shape = new_shape; | this->m_shape = new_shape; | |||
this->m_stride = new_stride; | this->m_stride = new_stride; | |||
} | } | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
void MultiArray <N, T, A>::swap (MultiArray <N, T, A> & other) | ||||
{ | ||||
if (this == &other) | ||||
return; | ||||
std::swap(this->m_shape, other.m_shape); | ||||
std::swap(this->m_stride, other.m_stride); | ||||
std::swap(this->m_ptr, other.m_ptr); | ||||
std::swap(this->m_alloc, other.m_alloc); | ||||
} | ||||
template <unsigned int N, class T, class A> | ||||
void MultiArray <N, T, A>::allocate (pointer & ptr, std::size_t s, | void MultiArray <N, T, A>::allocate (pointer & ptr, std::size_t s, | |||
const_reference init) | const_reference init) | |||
{ | { | |||
ptr = m_alloc.allocate (s); | ptr = m_alloc.allocate (s); | |||
std::size_t i; | std::size_t i; | |||
try { | try { | |||
for (i = 0; i < s; ++i) | for (i = 0; i < s; ++i) | |||
m_alloc.construct (ptr + i, init); | m_alloc.construct (ptr + i, init); | |||
} | } | |||
catch (...) { | catch (...) { | |||
for (std::size_t j = 0; j < i; ++j) | for (std::size_t j = 0; j < i; ++j) | |||
m_alloc.destroy (ptr + j); | m_alloc.destroy (ptr + j); | |||
m_alloc.deallocate (ptr, s); | m_alloc.deallocate (ptr, s); | |||
throw; | throw; | |||
} | } | |||
} | } | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
template <class U> | ||||
void MultiArray <N, T, A>::allocate (pointer & ptr, std::size_t s, | void MultiArray <N, T, A>::allocate (pointer & ptr, std::size_t s, | |||
const_pointer init) | U const * init) | |||
{ | { | |||
ptr = m_alloc.allocate (s); | ptr = m_alloc.allocate (s); | |||
std::size_t i; | std::size_t i; | |||
try { | try { | |||
for (i = 0; i < s; ++i, ++init) | for (i = 0; i < s; ++i, ++init) | |||
m_alloc.construct (ptr + i, *init); | m_alloc.construct (ptr + i, *init); | |||
} | } | |||
catch (...) { | catch (...) { | |||
for (std::size_t j = 0; j < i; ++j) | for (std::size_t j = 0; j < i; ++j) | |||
m_alloc.destroy (ptr + j); | m_alloc.destroy (ptr + j); | |||
m_alloc.deallocate (ptr, s); | m_alloc.deallocate (ptr, s); | |||
throw; | throw; | |||
} | } | |||
} | } | |||
template <unsigned int N, class T, class A> | template <unsigned int N, class T, class A> | |||
template <class U, class C> | ||||
void MultiArray <N, T, A>::allocate (pointer & ptr, MultiArrayView<N, U, C> | ||||
const & init) | ||||
{ | ||||
std::size_t s = init.elementCount(); | ||||
ptr = m_alloc.allocate (s); | ||||
pointer p = ptr; | ||||
try { | ||||
detail::uninitializedCopyMultiArrayData(init.traverser_begin(), ini | ||||
t.shape(), | ||||
p, m_alloc, MetaInt<actual_ | ||||
dimension-1>()); | ||||
} | ||||
catch (...) { | ||||
for (pointer pp = ptr; pp < p; ++pp) | ||||
m_alloc.destroy (pp); | ||||
m_alloc.deallocate (ptr, s); | ||||
throw; | ||||
} | ||||
} | ||||
template <unsigned int N, class T, class A> | ||||
void MultiArray <N, T, A>::deallocate (pointer & ptr, std::size_t s) | void MultiArray <N, T, A>::deallocate (pointer & ptr, std::size_t s) | |||
{ | { | |||
if (ptr == 0) | if (ptr == 0) | |||
return; | return; | |||
for (std::size_t i = 0; i < s; ++i) | for (std::size_t i = 0; i < s; ++i) | |||
m_alloc.destroy (ptr + i); | m_alloc.destroy (ptr + i); | |||
m_alloc.deallocate (ptr, s); | m_alloc.deallocate (ptr, s); | |||
ptr = 0; | ptr = 0; | |||
} | } | |||
End of changes. 29 change blocks. | ||||
185 lines changed or deleted | 221 lines changed or added | |||
multi_convolution.hxx | multi_convolution.hxx | |||
---|---|---|---|---|
//-- -*- c++ -*- | //-- -*- c++ -*- | |||
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2003 by Christian-Dennis Rahn */ | /* Copyright 2003 by Christian-Dennis Rahn */ | |||
/* and Ullrich Koethe */ | /* and Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 34 | skipping to change at line 34 | |||
#ifndef VIGRA_MULTI_CONVOLUTION_H | #ifndef VIGRA_MULTI_CONVOLUTION_H | |||
#define VIGRA_MULTI_CONVOLUTION_H | #define VIGRA_MULTI_CONVOLUTION_H | |||
#include <vigra/separableconvolution.hxx> | #include <vigra/separableconvolution.hxx> | |||
#include <vigra/array_vector.hxx> | #include <vigra/array_vector.hxx> | |||
#include <vigra/multi_array.hxx> | #include <vigra/multi_array.hxx> | |||
#include <vigra/accessor.hxx> | #include <vigra/accessor.hxx> | |||
#include <vigra/numerictraits.hxx> | #include <vigra/numerictraits.hxx> | |||
#include <vigra/navigator.hxx> | #include <vigra/navigator.hxx> | |||
#include <vigra/metaprogramming.hxx> | ||||
#include <vigra/multi_pointoperators.hxx> | ||||
namespace vigra | namespace vigra | |||
{ | { | |||
namespace detail | namespace detail | |||
{ | { | |||
/********************************************************/ | /********************************************************/ | |||
/* */ | /* */ | |||
/* internalSeparableConvolveMultiArray */ | /* internalSeparableConvolveMultiArray */ | |||
skipping to change at line 211 | skipping to change at line 213 | |||
\see vigra::Kernel1D, convolveLine() | \see vigra::Kernel1D, convolveLine() | |||
*/ | */ | |||
template <class SrcIterator, class SrcShape, class SrcAccessor, | template <class SrcIterator, class SrcShape, class SrcAccessor, | |||
class DestIterator, class DestAccessor, class KernelIterator> | class DestIterator, class DestAccessor, class KernelIterator> | |||
void | void | |||
separableConvolveMultiArray( SrcIterator s, SrcShape const & shape, SrcAcce ssor src, | separableConvolveMultiArray( SrcIterator s, SrcShape const & shape, SrcAcce ssor src, | |||
DestIterator d, DestAccessor dest, KernelItera tor kernels ) | DestIterator d, DestAccessor dest, KernelItera tor kernels ) | |||
{ | { | |||
typedef typename NumericTraits<typename DestAccessor::value_type>::Real Promote TmpType; | typedef typename NumericTraits<typename DestAccessor::value_type>::Real Promote TmpType; | |||
if(typeid(TmpType) != typeid(typename DestAccessor::value_type)) | if(!IsSameType<TmpType, typename DestAccessor::value_type>::boolResult) | |||
{ | { | |||
// need a temporary array to avoid rounding errors | // need a temporary array to avoid rounding errors | |||
MultiArray<SrcShape::static_size, TmpType> tmpArray(shape); | MultiArray<SrcShape::static_size, TmpType> tmpArray(shape); | |||
detail::internalSeparableConvolveMultiArrayTmp( s, shape, src, | detail::internalSeparableConvolveMultiArrayTmp( s, shape, src, | |||
tmpArray.traverser_begin(), typename AccessorTraits<TmpType>:: default_accessor(), kernels ); | tmpArray.traverser_begin(), typename AccessorTraits<TmpType>:: default_accessor(), kernels ); | |||
copyMultiArray(srcMultiArrayRange(tmpArray), destIter(d, dest)); | copyMultiArray(srcMultiArrayRange(tmpArray), destIter(d, dest)); | |||
} | } | |||
else | else | |||
{ | { | |||
// work directly on the destination array | // work directly on the destination array | |||
skipping to change at line 503 | skipping to change at line 505 | |||
} | } | |||
\endcode | \endcode | |||
<b> Usage:</b> | <b> Usage:</b> | |||
<b>\#include</b> "<a href="multi__convolution_8hxx-source.html">vigra/m ulti_convolution.hxx</a>" | <b>\#include</b> "<a href="multi__convolution_8hxx-source.html">vigra/m ulti_convolution.hxx</a>" | |||
\code | \code | |||
MultiArray<3, unsigned char>::size_type shape(width, height, depth); | MultiArray<3, unsigned char>::size_type shape(width, height, depth); | |||
MultiArray<3, unsigned char> source(shape); | MultiArray<3, unsigned char> source(shape); | |||
MultiArray<3, TinyVector<float> > dest(shape); | MultiArray<3, TinyVector<float, 3> > dest(shape); | |||
... | ... | |||
// compute Gaussian gradient at scale sigma | // compute Gaussian gradient at scale sigma | |||
gaussianGradientMultiArray(srcMultiArrayRange(source), destMultiArray(d est), sigma); | gaussianGradientMultiArray(srcMultiArrayRange(source), destMultiArray(d est), sigma); | |||
\endcode | \endcode | |||
<b> Required Interface:</b> | <b> Required Interface:</b> | |||
see \ref convolveImage(), in addition: | see \ref convolveImage(), in addition: | |||
\code | \code | |||
skipping to change at line 601 | skipping to change at line 603 | |||
} | } | |||
\endcode | \endcode | |||
<b> Usage:</b> | <b> Usage:</b> | |||
<b>\#include</b> "<a href="multi__convolution_8hxx-source.html">vigra/m ulti_convolution.hxx</a>" | <b>\#include</b> "<a href="multi__convolution_8hxx-source.html">vigra/m ulti_convolution.hxx</a>" | |||
\code | \code | |||
MultiArray<3, unsigned char>::size_type shape(width, height, depth); | MultiArray<3, unsigned char>::size_type shape(width, height, depth); | |||
MultiArray<3, unsigned char> source(shape); | MultiArray<3, unsigned char> source(shape); | |||
MultiArray<3, TinyVector<float> > dest(shape); | MultiArray<3, TinyVector<float, 3> > dest(shape); | |||
... | ... | |||
// compute gradient | // compute gradient | |||
symmetricGradientMultiArray(srcMultiArrayRange(source), destMultiArray( dest)); | symmetricGradientMultiArray(srcMultiArrayRange(source), destMultiArray( dest)); | |||
\endcode | \endcode | |||
<b> Required Interface:</b> | <b> Required Interface:</b> | |||
see \ref convolveImage(), in addition: | see \ref convolveImage(), in addition: | |||
\code | \code | |||
End of changes. 5 change blocks. | ||||
4 lines changed or deleted | 6 lines changed or added | |||
multi_impex.hxx | multi_impex.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2003 by Gunnar Kedenburg */ | /* Copyright 2003 by Gunnar Kedenburg */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
multi_iterator.hxx | multi_iterator.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2003 by Gunnar Kedenburg */ | /* Copyright 2003 by Gunnar Kedenburg */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* ( Version 1.3.0, Sep 10 2004 ) */ | /* ( Version 1.3.0, Sep 10 2004 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
multi_pointoperators.hxx | multi_pointoperators.hxx | |||
---|---|---|---|---|
//-- -*- c++ -*- | //-- -*- c++ -*- | |||
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2003 by Ullrich Koethe */ | /* Copyright 2003 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 143 | skipping to change at line 143 | |||
Accessor accessor; | Accessor accessor; | |||
VALUETYPE v; | VALUETYPE v; | |||
accessor.set(v, begin); | accessor.set(v, begin); | |||
\endcode | \endcode | |||
or a functor that is called (without argument) at every location, | or a functor that is called (without argument) at every location, | |||
and the result is written into the current element. Internally, | and the result is written into the current element. Internally, | |||
functors are recognized by the meta function | functors are recognized by the meta function | |||
<tt>FunctorTraits<FUNCTOR>::</tt><tt>isInitializer</tt> yielding <tt>VigraTrueType</tt>. | <tt>FunctorTraits<FUNCTOR>::</tt><tt>isInitializer</tt> yielding <tt>VigraTrueType</tt>. | |||
Make sure that your functor correctly defines <tt>FunctorTrits</tt> bec ause | Make sure that your functor correctly defines <tt>FunctorTraits</tt> be cause | |||
otherwise the code will not compile. | otherwise the code will not compile. | |||
\code | \code | |||
MultiIterator begin; | MultiIterator begin; | |||
Accessor accessor; | Accessor accessor; | |||
FUNCTOR f; | FUNCTOR f; | |||
assert(typeid(FunctorTraits<FUNCTOR>::isInitializer) == typeid(VigraTru eType)); | assert(typeid(FunctorTraits<FUNCTOR>::isInitializer) == typeid(VigraTru eType)); | |||
accessor.set(f(), begin); | accessor.set(f(), begin); | |||
skipping to change at line 669 | skipping to change at line 669 | |||
dest_accessor.set(functor(src_accessor(src_begin)), dest_begin); | dest_accessor.set(functor(src_accessor(src_begin)), dest_begin); | |||
\endcode | \endcode | |||
In reduce mode, it must be a model of UnaryAnalyser (i.e. support funct ion call | In reduce mode, it must be a model of UnaryAnalyser (i.e. support funct ion call | |||
with one argument and no return vakue <tt>functor(arg)</tt>) and Initia lizer | with one argument and no return vakue <tt>functor(arg)</tt>) and Initia lizer | |||
(i.e. support function call with no argument, but return value | (i.e. support function call with no argument, but return value | |||
<tt>res = functor()</tt>). Internally, such functors are recognized by the | <tt>res = functor()</tt>). Internally, such functors are recognized by the | |||
meta functions <tt>FunctorTraits<FUNCTOR>::</tt><tt>isUnaryAnalys er</tt> and | meta functions <tt>FunctorTraits<FUNCTOR>::</tt><tt>isUnaryAnalys er</tt> and | |||
<tt>FunctorTraits<FUNCTOR>::</tt><tt>isInitializer</tt> which mus t both yield | <tt>FunctorTraits<FUNCTOR>::</tt><tt>isInitializer</tt> which mus t both yield | |||
<tt>VigraTrueType</tt>. Make sure that your functor correctly defines | <tt>VigraTrueType</tt>. Make sure that your functor correctly defines | |||
<tt>FunctorTrits</tt> because otherwise reduce mode will not work. In a ddition, | <tt>FunctorTraits</tt> because otherwise reduce mode will not work. In addition, | |||
the functor must be copy constructible in order to start each reduction | the functor must be copy constructible in order to start each reduction | |||
with a fresh functor. | with a fresh functor. | |||
\code | \code | |||
MultiIterator src_begin, src_end, dest_begin; | MultiIterator src_begin, src_end, dest_begin; | |||
SrcAccessor src_accessor; | SrcAccessor src_accessor; | |||
DestAccessor dest_accessor; | DestAccessor dest_accessor; | |||
FUNCTOR initial_functor, functor(initial_functor); | FUNCTOR initial_functor, functor(initial_functor); | |||
skipping to change at line 1108 | skipping to change at line 1108 | |||
\endcode | \endcode | |||
In reduce mode, it must be a model of BinaryAnalyser (i.e. support func tion call | In reduce mode, it must be a model of BinaryAnalyser (i.e. support func tion call | |||
with two arguments and no return vakue <tt>functor(arg1, arg2)</tt>) an d Initializer | with two arguments and no return vakue <tt>functor(arg1, arg2)</tt>) an d Initializer | |||
(i.e. support function call with no argument, but return value | (i.e. support function call with no argument, but return value | |||
<tt>res = functor()</tt>). Internally, such functors are recognized by the | <tt>res = functor()</tt>). Internally, such functors are recognized by the | |||
meta functions <tt>FunctorTraits<FUNCTOR>::</tt><tt>isBinaryAnaly ser</tt> and | meta functions <tt>FunctorTraits<FUNCTOR>::</tt><tt>isBinaryAnaly ser</tt> and | |||
<tt>FunctorTraits<FUNCTOR>::</tt><tt>isInitializer</tt> which mus t both yield | <tt>FunctorTraits<FUNCTOR>::</tt><tt>isInitializer</tt> which mus t both yield | |||
<tt>VigraTrueType</tt>. Make sure that your functor correctly defines | <tt>VigraTrueType</tt>. Make sure that your functor correctly defines | |||
<tt>FunctorTrits</tt> because otherwise reduce mode will not work. In a ddition, | <tt>FunctorTraits</tt> because otherwise reduce mode will not work. In addition, | |||
the functor must be copy constructible in order to start each reduction | the functor must be copy constructible in order to start each reduction | |||
with a fresh functor. | with a fresh functor. | |||
\code | \code | |||
MultiIterator src1_begin, src2_begin, dest_begin; | MultiIterator src1_begin, src2_begin, dest_begin; | |||
SrcAccessor1 src1_accessor; | SrcAccessor1 src1_accessor; | |||
SrcAccessor2 src2_accessor; | SrcAccessor2 src2_accessor; | |||
DestAccessor dest_accessor; | DestAccessor dest_accessor; | |||
End of changes. 4 change blocks. | ||||
4 lines changed or deleted | 4 lines changed or added | |||
navigator.hxx | navigator.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2004 by Ullrich Koethe */ | /* Copyright 2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
nonlineardiffusion.hxx | nonlineardiffusion.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
numerictraits.hxx | numerictraits.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 846 | skipping to change at line 846 | |||
typedef std::complex<typename NumericTraits<T>::Promote> Promote; | typedef std::complex<typename NumericTraits<T>::Promote> Promote; | |||
typedef std::complex<typename NumericTraits<T>::RealPromote> RealPromot e; | typedef std::complex<typename NumericTraits<T>::RealPromote> RealPromot e; | |||
typedef std::complex<RealPromote> ComplexPromote; | typedef std::complex<RealPromote> ComplexPromote; | |||
typedef T ValueType; | typedef T ValueType; | |||
typedef VigraFalseType isIntegral; | typedef VigraFalseType isIntegral; | |||
typedef VigraFalseType isScalar; | typedef VigraFalseType isScalar; | |||
typedef VigraFalseType isOrdered; | typedef VigraFalseType isOrdered; | |||
typedef VigraTrueType isComplex; | typedef VigraTrueType isComplex; | |||
static double zero() { return Type(0.0); } | static Type zero() { return Type(0.0); } | |||
static double one() { return Type(1.0); } | static Type one() { return Type(1.0); } | |||
static double nonZero() { return one(); } | static Type nonZero() { return one(); } | |||
static double epsilon() { return Type(NumericTraits<T>::epsilon()); } | static Type epsilon() { return Type(NumericTraits<T>::epsilon()); } | |||
static double smallestPositive() { return Type(NumericTraits<T>::smalle | static Type smallestPositive() { return Type(NumericTraits<T>::smallest | |||
stPositive()); } | Positive()); } | |||
static Promote toPromote(Type const & v) { return v; } | static Promote toPromote(Type const & v) { return v; } | |||
static Type fromPromote(Promote const & v) { return v; } | static Type fromPromote(Promote const & v) { return v; } | |||
static Type fromRealPromote(RealPromote v) { return Type(v); } | static Type fromRealPromote(RealPromote v) { return Type(v); } | |||
}; | }; | |||
#endif // NO_PARTIAL_TEMPLATE_SPECIALIZATION | #endif // NO_PARTIAL_TEMPLATE_SPECIALIZATION | |||
/********************************************************/ | /********************************************************/ | |||
/* */ | /* */ | |||
skipping to change at line 1288 | skipping to change at line 1288 | |||
{ | { | |||
typedef unsigned long Promote; | typedef unsigned long Promote; | |||
static Promote toPromote(int v) { return v; } | static Promote toPromote(int v) { return v; } | |||
static Promote toPromote(unsigned long v) { return v; } | static Promote toPromote(unsigned long v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<int, float> | struct PromoteTraits<int, float> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(int v) { return v; } | static Promote toPromote(int v) { return static_cast<Promote>(v); } | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<int, double> | struct PromoteTraits<int, double> | |||
{ | { | |||
typedef double Promote; | typedef double Promote; | |||
static Promote toPromote(int v) { return v; } | static Promote toPromote(int v) { return v; } | |||
static Promote toPromote(double v) { return v; } | static Promote toPromote(double v) { return v; } | |||
}; | }; | |||
skipping to change at line 1375 | skipping to change at line 1375 | |||
{ | { | |||
typedef unsigned long Promote; | typedef unsigned long Promote; | |||
static Promote toPromote(unsigned int v) { return v; } | static Promote toPromote(unsigned int v) { return v; } | |||
static Promote toPromote(unsigned long v) { return v; } | static Promote toPromote(unsigned long v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<unsigned int, float> | struct PromoteTraits<unsigned int, float> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(unsigned int v) { return v; } | static Promote toPromote(unsigned int v) { return static_cast<Promote>( v); } | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<unsigned int, double> | struct PromoteTraits<unsigned int, double> | |||
{ | { | |||
typedef double Promote; | typedef double Promote; | |||
static Promote toPromote(unsigned int v) { return v; } | static Promote toPromote(unsigned int v) { return v; } | |||
static Promote toPromote(double v) { return v; } | static Promote toPromote(double v) { return v; } | |||
}; | }; | |||
skipping to change at line 1462 | skipping to change at line 1462 | |||
{ | { | |||
typedef unsigned long Promote; | typedef unsigned long Promote; | |||
static Promote toPromote(long v) { return v; } | static Promote toPromote(long v) { return v; } | |||
static Promote toPromote(unsigned long v) { return v; } | static Promote toPromote(unsigned long v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<long, float> | struct PromoteTraits<long, float> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(long v) { return v; } | static Promote toPromote(long v) { return static_cast<Promote>(v); } | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<long, double> | struct PromoteTraits<long, double> | |||
{ | { | |||
typedef double Promote; | typedef double Promote; | |||
static Promote toPromote(long v) { return v; } | static Promote toPromote(long v) { return v; } | |||
static Promote toPromote(double v) { return v; } | static Promote toPromote(double v) { return v; } | |||
}; | }; | |||
skipping to change at line 1549 | skipping to change at line 1549 | |||
struct PromoteTraits<unsigned long, unsigned long> | struct PromoteTraits<unsigned long, unsigned long> | |||
{ | { | |||
typedef unsigned long Promote; | typedef unsigned long Promote; | |||
static Promote toPromote(unsigned long v) { return v; } | static Promote toPromote(unsigned long v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<unsigned long, float> | struct PromoteTraits<unsigned long, float> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(unsigned long v) { return v; } | static Promote toPromote(unsigned long v) { return static_cast<Promote> (v); } | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<unsigned long, double> | struct PromoteTraits<unsigned long, double> | |||
{ | { | |||
typedef double Promote; | typedef double Promote; | |||
static Promote toPromote(unsigned long v) { return v; } | static Promote toPromote(unsigned long v) { return v; } | |||
static Promote toPromote(double v) { return v; } | static Promote toPromote(double v) { return v; } | |||
}; | }; | |||
skipping to change at line 1606 | skipping to change at line 1606 | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
static Promote toPromote(short unsigned int v) { return v; } | static Promote toPromote(short unsigned int v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<float, int> | struct PromoteTraits<float, int> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
static Promote toPromote(int v) { return v; } | static Promote toPromote(int v) { return static_cast<Promote>(v); } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<float, unsigned int> | struct PromoteTraits<float, unsigned int> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
static Promote toPromote(unsigned int v) { return v; } | static Promote toPromote(unsigned int v) { return static_cast<Promote>( v); } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<float, long> | struct PromoteTraits<float, long> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
static Promote toPromote(long v) { return v; } | static Promote toPromote(long v) { return static_cast<Promote>(v); } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<float, unsigned long> | struct PromoteTraits<float, unsigned long> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
static Promote toPromote(unsigned long v) { return v; } | static Promote toPromote(unsigned long v) { return static_cast<Promote> (v); } | |||
}; | }; | |||
template<> | template<> | |||
struct PromoteTraits<float, float> | struct PromoteTraits<float, float> | |||
{ | { | |||
typedef float Promote; | typedef float Promote; | |||
static Promote toPromote(float v) { return v; } | static Promote toPromote(float v) { return v; } | |||
}; | }; | |||
template<> | template<> | |||
End of changes. 10 change blocks. | ||||
15 lines changed or deleted | 15 lines changed or added | |||
orientedtensorfilters.hxx | orientedtensorfilters.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2002-2004 by Ullrich Koethe */ | /* Copyright 2002-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
pixelneighborhood.hxx | pixelneighborhood.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Hans Meine, Ullrich Koethe */ | /* Copyright 1998-2002 by Hans Meine, Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
polynomial.hxx | polynomial.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
rational.hxx | rational.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* It was adapted from the file boost/rational.hpp of the */ | /* It was adapted from the file boost/rational.hpp of the */ | |||
/* boost library. */ | /* boost library. */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
skipping to change at line 165 | skipping to change at line 165 | |||
(e.g. wrap around) applies. | (e.g. wrap around) applies. | |||
The class can represent and handle positive and negative infinity | The class can represent and handle positive and negative infinity | |||
resulting from division by zero. Indeterminate expressions such as 0/0 | resulting from division by zero. Indeterminate expressions such as 0/0 | |||
are signaled by a <tt>bad_rational</tt> exception which is derived from | are signaled by a <tt>bad_rational</tt> exception which is derived from | |||
<tt>std::domain_error</tt>. | <tt>std::domain_error</tt>. | |||
<tt>Rational</tt> implements the required interface of an | <tt>Rational</tt> implements the required interface of an | |||
\ref AlgebraicField and the required \ref RationalTraits "numeric and | \ref AlgebraicField and the required \ref RationalTraits "numeric and | |||
promotion traits". All arithmetic and comparison operators, as well | promotion traits". All arithmetic and comparison operators, as well | |||
as some algebraic functions are supported . | as the relevant algebraic functions are supported . | |||
<b>See also:</b> | <b>See also:</b> | |||
<ul> | <ul> | |||
<li> \ref RationalTraits | <li> \ref RationalTraits | |||
<li> \ref RationalOperations | <li> \ref RationalOperations | |||
</ul> | </ul> | |||
<b>\#include</b> "<a href="mathutil_8hxx-source.html">vigra/rational.hx x</a>"<br> | <b>\#include</b> "<a href="mathutil_8hxx-source.html">vigra/rational.hx x</a>"<br> | |||
Namespace: vigra | Namespace: vigra | |||
*/ | */ | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
recursiveconvolution.hxx | recursiveconvolution.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
resampling_convolution.hxx | resampling_convolution.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
resizeimage.hxx | resizeimage.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
rfftw.hxx | rfftw.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
rgbvalue.hxx | rgbvalue.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 992 | skipping to change at line 992 | |||
/** Get value of the luminance at an offset | /** Get value of the luminance at an offset | |||
*/ | */ | |||
template <class ITERATOR, class DIFFERENCE> | template <class ITERATOR, class DIFFERENCE> | |||
value_type operator()(ITERATOR const & i, DIFFERENCE d) const | value_type operator()(ITERATOR const & i, DIFFERENCE d) const | |||
{ | { | |||
return i[d].luminance(); | return i[d].luminance(); | |||
} | } | |||
}; | }; | |||
/********************************************************/ | ||||
/* */ | ||||
/* GrayToRGBAccessor */ | ||||
/* */ | ||||
/********************************************************/ | ||||
/** Create an RGB view for a grayscale image by making all three channe | ||||
ls | ||||
equal. | ||||
<b>\#include</b> "<a href="rgbvalue_8hxx-source.html">vigra/rgbvalue.hx | ||||
x</a>"<br> | ||||
Namespace: vigra | ||||
*/ | ||||
template <class VALUETYPE> | ||||
class GrayToRGBAccessor | ||||
{ | ||||
public: | ||||
typedef typename vigra::RGBValue<VALUETYPE> value_type; | ||||
/** Get RGB value for the given pixel. | ||||
*/ | ||||
template <class ITERATOR> | ||||
value_type operator()(ITERATOR const & i) const { | ||||
return value_type(*i,*i,*i); } | ||||
/** Get RGB value at an offset | ||||
*/ | ||||
template <class ITERATOR, class DIFFERENCE> | ||||
value_type operator()(ITERATOR const & i, DIFFERENCE d) const | ||||
{ | ||||
return value_type(i[d],i[d],i[d]); | ||||
} | ||||
}; | ||||
//@} | //@} | |||
//@} | //@} | |||
} // namespace vigra | } // namespace vigra | |||
#endif // VIGRA_RGBVALUE_HXX | #endif // VIGRA_RGBVALUE_HXX | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 36 lines changed or added | |||
seededregiongrowing.hxx | seededregiongrowing.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2003 by Ullrich Koethe, Hans Meine */ | /* Copyright 1998-2003 by Ullrich Koethe, Hans Meine */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
separableconvolution.hxx | separableconvolution.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
splineimageview.hxx | splineimageview.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
splines.hxx | splines.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2004 by Ullrich Koethe */ | /* Copyright 1998-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
stdconvolution.hxx | stdconvolution.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
stdimage.hxx | stdimage.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
stdimagefunctions.hxx | stdimagefunctions.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
symmetry.hxx | symmetry.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
tensorutilities.hxx | tensorutilities.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 2002-2004 by Ullrich Koethe */ | /* Copyright 2002-2004 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
tiff.hxx | tiff.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
tinyvector.hxx | tinyvector.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
transformimage.hxx | transformimage.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
skipping to change at line 1146 | skipping to change at line 1146 | |||
<b> Traits defined:</b> | <b> Traits defined:</b> | |||
<tt>FunctorTraits::isUnaryFunctor</tt> is true (<tt>VigraTrueType<tt>) | <tt>FunctorTraits::isUnaryFunctor</tt> is true (<tt>VigraTrueType<tt>) | |||
<b> Usage:</b> | <b> Usage:</b> | |||
<b>\#include</b> "<a href="transformimage_8hxx-source.html">vigra/t ransformimage.hxx</a>"<br> | <b>\#include</b> "<a href="transformimage_8hxx-source.html">vigra/t ransformimage.hxx</a>"<br> | |||
Namespace: vigra | Namespace: vigra | |||
\code | \code | |||
typedef vigra::TinyVector<float> Vector; | typedef vigra::TinyVector<float, 2> Vector; | |||
vigra::BasicImage<Vector> grad(width, height); | vigra::BasicImage<Vector> grad(width, height); | |||
vigra::FImage magn(width,height); | vigra::FImage magn(width,height); | |||
... | ... | |||
vigra::transformImage(srcImageRange(grad), destImage(magn), | vigra::transformImage(srcImageRange(grad), destImage(magn), | |||
VectorNormFunctor<float>() | VectorNormFunctor<float>() | |||
); | ); | |||
\endcode | \endcode | |||
\see vigra::TinyVector, dot(), vigra::MagnitudeFunctor | \see vigra::TinyVector, dot(), vigra::MagnitudeFunctor | |||
*/ | */ | |||
skipping to change at line 1200 | skipping to change at line 1200 | |||
At least, the vector type is required to have a function | At least, the vector type is required to have a function | |||
'<em>result</em><TT> = dot(v,v)</TT>'. | '<em>result</em><TT> = dot(v,v)</TT>'. | |||
For an example of its usage see VectorNormFunctor | For an example of its usage see VectorNormFunctor | |||
<b> Traits defined:</b> | <b> Traits defined:</b> | |||
<tt>FunctorTraits::isUnaryFunctor</tt> is true (<tt>VigraTrueType<tt>) | <tt>FunctorTraits::isUnaryFunctor</tt> is true (<tt>VigraTrueType<tt>) | |||
\see TinVector, dot() | \see TinyVector, dot() | |||
*/ | */ | |||
template <class ValueType> | template <class ValueType> | |||
class VectorNormSqFunctor | class VectorNormSqFunctor | |||
{ | { | |||
public: | public: | |||
/** the functor's argument type | /** the functor's argument type | |||
*/ | */ | |||
typedef ValueType argument_type; | typedef ValueType argument_type; | |||
/** the functor's result type | /** the functor's result type | |||
End of changes. 3 change blocks. | ||||
3 lines changed or deleted | 3 lines changed or added | |||
tuple.hxx | tuple.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||
utilities.hxx | utilities.hxx | |||
---|---|---|---|---|
/************************************************************************/ | /************************************************************************/ | |||
/* */ | /* */ | |||
/* Copyright 1998-2002 by Ullrich Koethe */ | /* Copyright 1998-2002 by Ullrich Koethe */ | |||
/* Cognitive Systems Group, University of Hamburg, Germany */ | /* Cognitive Systems Group, University of Hamburg, Germany */ | |||
/* */ | /* */ | |||
/* This file is part of the VIGRA computer vision library. */ | /* This file is part of the VIGRA computer vision library. */ | |||
/* ( Version 1.3.1, Jan 06 2005 ) */ | /* ( Version 1.3.2, Jan 27 2005 ) */ | |||
/* You may use, modify, and distribute this software according */ | /* You may use, modify, and distribute this software according */ | |||
/* to the terms stated in the LICENSE file included in */ | /* to the terms stated in the LICENSE file included in */ | |||
/* the VIGRA distribution. */ | /* the VIGRA distribution. */ | |||
/* */ | /* */ | |||
/* The VIGRA Website is */ | /* The VIGRA Website is */ | |||
/* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | /* http://kogs-www.informatik.uni-hamburg.de/~koethe/vigra/ */ | |||
/* Please direct questions, bug reports, and contributions to */ | /* Please direct questions, bug reports, and contributions to */ | |||
/* koethe@informatik.uni-hamburg.de */ | /* koethe@informatik.uni-hamburg.de */ | |||
/* */ | /* */ | |||
/* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | /* THIS SOFTWARE IS PROVIDED AS IS AND WITHOUT ANY EXPRESS OR */ | |||
End of changes. 1 change blocks. | ||||
1 lines changed or deleted | 1 lines changed or added | |||