pandore::Img1d< T > Class Template Reference

#include <image.h>

Inheritance diagram for pandore::Img1d< T >:

pandore::Imx1d< T > pandore::Imx3d< T > List of all members.

Detailed Description

template<class T>
class pandore::Img1d< T >

The 1D gray level image.

A Img1d < /code> is a gray level 1D image. A 1D gray level image is implemented as one 1D array of pixels, where a pixel is of T type.
For the use of Img1d images see The Images.


Public Types

typedef T ValueType

Public Member Functions

Typobj Type () const
std::string Name () const
 Img1d ()
 Img1d (Long w, T *data=0, bool isOwner=false)
 Img1d (const Dimension1d &d, T *data=0, bool isOwner=false)
 Img1d (const PobjectProps &p, T *data=0, bool isOwner=false)
void New (Long w, T *data=0, bool isOwner=false)
void New (const Dimension1d &d, T *data=0, bool isOwner=false)
void New (const PobjectProps &p, T *data=0, bool isOwner=false)
Pobject * Clone () const
Img1d< T > & operator= (const T val)
template<typename U>
Img1d< T > & operator= (const Img1d< U > &src)
Img1d< T > & operator= (const Img1d< T > &src)
ValueTypeVector () const
ValueTypeoperator[] (Long col)
const ValueTypeoperator[] (Long col) const
ValueTypeoperator() (Long x)
ValueTypeoperator[] (const Point1d &p)
const ValueTypeoperator[] (const Point1d &p) const
ValueTypeoperator() (const Point1d &p)
const ValueTypeoperator() (const Point1d &p) const
 Img1d (const Img1d &ims)


Member Typedef Documentation

template<class T>
typedef T pandore::Img1d< T >::ValueType
 

The type of the data (Uchar, Long or Float).

Reimplemented from pandore::Imx1d< T >.

Reimplemented in pandore::Reg1d.


Constructor & Destructor Documentation

template<class T>
pandore::Img1d< T >::Img1d  )  [inline]
 

Creates a new image with no size and no data.

template<class T>
pandore::Img1d< T >::Img1d Long  w,
T *  data = 0,
bool  isOwner = false
[inline]
 

Creates a new image with the specified width, and sets the specified vector as data. If data = 0 then data are allocated and freed by the image else data are allocated and freed externally.

Parameters:
w the width of the image.
data the vector of data.
isOwner is the image responsible for deleting the data.

template<class T>
pandore::Img1d< T >::Img1d const Dimension1d d,
T *  data = 0,
bool  isOwner = false
[inline]
 

Creates a new image with the specified dimension, and sets the specified vector as data. If data = 0 then data are allocated and freed by the image else data are allocated and freed externally.

Parameters:
d the dimension of the image.
data the vector of data.
isOwner is the image responsible for deleting the data.

template<class T>
pandore::Img1d< T >::Img1d const PobjectProps &  p,
T *  data = 0,
bool  isOwner = false
[inline]
 

Creates a new image with the specified properties. Allocates therefrom the related data. If data = 0 then data are allocated and freed by the image else data are allocated and freed externally.

Warning:
the pixel values are not initialized with 0.
Parameters:
p the properties.
data the vector of data.
isOwner is the image responsible for deleting the data.

template<class T>
pandore::Img1d< T >::Img1d const Img1d< T > &  ims  )  [inline]
 

Creates the image content by copy. Allocates the related data and sets the values with the ims values. If needed casts the values by using the C casting.

Parameters:
ims the specified image.


Member Function Documentation

template<class T>
Pobject* pandore::Img1d< T >::Clone  )  const [inline, virtual]
 

Creates and returns a distinct copy of this object.

Returns:
a new image.

Reimplemented from pandore::Imx1d< T >.

Reimplemented in pandore::Reg1d.

template<class T>
std::string pandore::Img1d< T >::Name  )  const [inline]
 

Returns the type name (for instance Img1duc or Img1dsl or Img1dsf).

Reimplemented from pandore::Imx1d< T >.

Reimplemented in pandore::Reg1d.

template<class T>
void pandore::Img1d< T >::New const PobjectProps &  p,
T *  data = 0,
bool  isOwner = false
[inline, virtual]
 

Allocates the image data from the specified properties. If data = 0 then data are allocated and freed by the image else data are allocated and freed externally.

Parameters:
p the properties of the image.
data the image data vector.
isOwner is the image responsible for deleting the data.

Reimplemented from pandore::Imx1d< T >.

template<class T>
void pandore::Img1d< T >::New const Dimension1d d,
T *  data = 0,
bool  isOwner = false
[inline]
 

Sets the image data with the specified vector of data If data = 0 then data are allocated and freed by the image else data are allocated and freed externally.

Parameters:
d the dimension of the vector.
data the image data vector.
isOwner is the image responsible for deleting the data.

template<class T>
void pandore::Img1d< T >::New Long  w,
T *  data = 0,
bool  isOwner = false
[inline]
 

Sets the image data with the specified vector of data If data = 0 then data are allocated and freed by the image else data are allocated and freed externally.

Parameters:
data the image data vector.
w the width of the vector.
isOwner is the image responsible for deleting the data.

template<class T>
const ValueType& pandore::Img1d< T >::operator() const Point1d p  )  const [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

template<class T>
ValueType& pandore::Img1d< T >::operator() const Point1d p  )  [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

template<class T>
ValueType& pandore::Img1d< T >::operator() Long  x  )  [inline]
 

Returns the pixel value at the specified coordinates.

Parameters:
x the x-coordinate.

Reimplemented in pandore::Reg1d.

template<class T>
Img1d< T >& pandore::Img1d< T >::operator= const Img1d< T > &  src  )  [inline]
 

Sets the pixel values with the pixel values of the given image. This supposes that images have the same dimension.

Parameters:
src the given image.
Returns:
the image itself.

template<class T>
template<typename U>
Img1d< T >& pandore::Img1d< T >::operator= const Img1d< U > &  src  )  [inline]
 

Sets the pixel values with the pixel values of the given image. This supposes that images have the same dimension.

Parameters:
src the given image.
Returns:
the image itself.

template<class T>
Img1d< T >& pandore::Img1d< T >::operator= const T  val  )  [inline]
 

Sets all pixels with the given value.

Parameters:
val the given value.
Returns:
the image itself.

Reimplemented from pandore::Imx1d< T >.

template<class T>
const ValueType& pandore::Img1d< T >::operator[] const Point1d p  )  const [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

Reimplemented in pandore::Reg1d.

template<class T>
ValueType& pandore::Img1d< T >::operator[] const Point1d p  )  [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

Reimplemented in pandore::Reg1d.

template<class T>
const ValueType& pandore::Img1d< T >::operator[] Long  col  )  const [inline]
 

Returns the pixel at the specified column.

Parameters:
col the column number.

Reimplemented from pandore::Imx1d< T >.

Reimplemented in pandore::Reg1d.

template<class T>
ValueType& pandore::Img1d< T >::operator[] Long  col  )  [inline]
 

Returns the pixel at the specified column.

Parameters:
col the column number.

Reimplemented from pandore::Imx1d< T >.

Reimplemented in pandore::Reg1d.

template<class T>
Typobj pandore::Img1d< T >::Type  )  const [inline]
 

Returns the identifier of the object (ie. the magic number).

Reimplemented from pandore::Imx1d< T >.

Reimplemented in pandore::Reg1d.

template<class T>
ValueType* pandore::Img1d< T >::Vector  )  const [inline]
 

Returns the image data as a unique vector.

Reimplemented in pandore::Reg1d.


The documentation for this class was generated from the following file:

The Pantheon project
Image Team GREYC Laboratory
UMR CNRS 6072 - ENSICAEN - University of Caen, France
This page was last modified on 19 June 2015