pandore::Imx1d< T > Class Template Reference

#include <image.h>

Inheritance diagram for pandore::Imx1d< T >:

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

Detailed Description

template<class T>
class pandore::Imx1d< T >

The 1D multispectral image.

A Imx1d < /code> is a multispectral 1D image. A 1D multispectral image is implemented as n 1D arrays of pixels, where a pixel is of T type and n is the number of bands.
For the use of Imx1d images see The Images.


Public Types

typedef T ValueType

Public Member Functions

Typobj Type () const
std::string Name () const
Dimension1d Size () const
 Imx1d ()
 Imx1d (Long b, Long w, T *data=0, bool isOwner=false)
 Imx1d (Long b, const Dimension1d &d, T *data=0, bool isOwner=false)
 Imx1d (const PobjectProps &p, T *data=0, bool isOwner=false)
void New (Long b, Long w, T *data=0, bool isOwner=false)
void New (Long b, const Dimension1d &d, T *data=0, bool isOwner=false)
void New (const PobjectProps &p, T *data=0, bool isOwner=false)
Pobject * Clone () const
Imx1d< T > & operator= (const T val)
template<typename U>
Imx1d< T > & operator= (const Imx1d< U > &src)
Imx1d< T > & operator= (const Imx1d< T > &src)
T * Vector (Long band=0) const
Imx3d< T >::Band1d operator[] (Long band)
const Imx3d< T >::Band1d operator[] (Long band) const
T & operator() (Long b, Long x)
const T & operator() (Long b, Long x) const
T & operator() (Long b, Point1d &p)
const T & operator() (Long b, Point1d &p) const
Errc LoadAttributes (FILE *file)
Errc SaveAttributes (FILE *file) const
Pobject * Mask (const Pobject *mask)
Pobject * UnMask (const Pobject *mask, const Pobject *reference)
bool Hold (Long x) const
bool Hold (const Point1d &pt) const
Errc Frame (ValueType val, Long l)
template<typename U>
Errc Frame (const Imx1d< U > &ims, Long l)
 Imx1d (const Imx1d &ims)


Member Typedef Documentation

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

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

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Img1d< T >, pandore::Reg1d, and pandore::Img1d< Long >.


Constructor & Destructor Documentation

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

Creates a new image with no size and no data.

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

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

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

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

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

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

template<class T>
pandore::Imx1d< T >::Imx1d 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::Imx1d< T >::Imx1d const Imx1d< 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::Imx1d< T >::Clone  )  const [inline, virtual]
 

Creates and returns a distinct copy of this object.

Returns:
a new image.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Img1d< T >, pandore::Reg1d, and pandore::Img1d< Long >.

template<class T>
template<typename U>
Errc pandore::Imx1d< T >::Frame const Imx1d< U > &  ims,
Long  l
[inline]
 

Fills the specified border of the image with the related value of the specified image.

Parameters:
ims the reference image.
l the width of the border.

template<class T>
Errc pandore::Imx1d< T >::Frame ValueType  val,
Long  l
[inline]
 

Fills the specified border of the image with the specified value.

Parameters:
val the value.
l the width of the border.

Reimplemented from pandore::Imx3d< T >.

template<class T>
bool pandore::Imx1d< T >::Hold const Point1d pt  )  const [inline]
 

Checks if the image contains the point.

Parameters:
pt the point.
Returns:
true if the point is in the image boundary.

template<class T>
bool pandore::Imx1d< T >::Hold Long  x  )  const [inline]
 

Checks if the image contains the point at the specified location (x).

Parameters:
x the column coordinate.
Returns:
true if the coordinate are in the image boundary.

template<class T>
Errc pandore::Imx1d< T >::LoadAttributes FILE *  file  )  [inline, virtual]
 

Loads attribute values from the given file. Allocates therefrom the related data.

Warning:
the pixel values are not initialized with 0.
Parameters:
file the file where to read attributes values.
Returns:
SUCCESS or FAILURE in case of IO errors.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg1d.

template<class T>
Pobject* pandore::Imx1d< T >::Mask const Pobject *  mask  )  [inline, virtual]
 

Masks the data from the given mask. It means that pixels are set to 0 when the related label in the mask is 0.

Parameters:
mask the region map that is used as a mask.
Returns:
a new image.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg1d.

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

Returns the type name (for instance Imx1duc or Imx1dsl or Imx1dsf).

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Img1d< T >, pandore::Reg1d, and pandore::Img1d< Long >.

template<class T>
void pandore::Imx1d< 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 vector of data.
isOwner is the image responsible for deleting the data.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Img1d< T >, and pandore::Img1d< Long >.

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

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

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

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

Allocates the image data from the specified band number, depth, height and width values and the specified data. If data = 0 then data are allocated and freed by the image else data are allocated and freed externally.

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

template<class T>
const T& pandore::Imx1d< T >::operator() Long  b,
Point1d p
const [inline]
 

Returns the pixel value at the specified coordinates.

Parameters:
b the band.
p point1d.

template<class T>
T& pandore::Imx1d< T >::operator() Long  b,
Point1d p
[inline]
 

Returns the pixel value at the specified coordinates.

Parameters:
b the band.
p point1d.

template<class T>
const T& pandore::Imx1d< T >::operator() Long  b,
Long  x
const [inline]
 

Returns the pixel value at the specified coordinates.

Parameters:
b the band.
x the x-coordinate.

template<class T>
T& pandore::Imx1d< T >::operator() Long  b,
Long  x
[inline]
 

Returns the pixel value at the specified coordinates.

Parameters:
b the band.
x the x-coordinate.

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

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

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

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

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

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

template<class T>
Imx1d< T >& pandore::Imx1d< 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::Imx3d< T >.

Reimplemented in pandore::Img1d< T >, and pandore::Img1d< Long >.

template<class T>
const Imx3d< T>::Band1d pandore::Imx1d< T >::operator[] Long  band  )  const [inline]
 

Returns the specified band of the image data as a unique vector.

Parameters:
band the band number.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Img1d< T >, pandore::Reg1d, and pandore::Img1d< Long >.

template<class T>
Imx3d< T>::Band1d pandore::Imx1d< T >::operator[] Long  band  )  [inline]
 

Returns the specified band of the image data as a unique vector.

Parameters:
band the band number.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Img1d< T >, pandore::Reg1d, and pandore::Img1d< Long >.

template<class T>
Errc pandore::Imx1d< T >::SaveAttributes FILE *  file  )  const [inline, virtual]
 

Saves the current attribute values in the specified file.

Parameters:
file the file.
Returns:
SUCCESS or FAILURE in case of IO errors.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg1d.

template<class T>
Dimension1d pandore::Imx1d< T >::Size  )  const [inline]
 

Returns the dimension of the image.

Reimplemented from pandore::Imx3d< T >.

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

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

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Img1d< T >, pandore::Reg1d, and pandore::Img1d< Long >.

template<class T>
Pobject* pandore::Imx1d< T >::UnMask const Pobject *  mask,
const Pobject *  reference
[inline, virtual]
 

Unmasks the data from the given mask. It means that pixels are set to the pixel value of the reference image when the related label in the mask is 0.

Parameters:
mask the region map that is used as a mask.
reference the image that is used as a reference.
Returns:
a new image.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg1d.

template<class T>
T* pandore::Imx1d< T >::Vector Long  band = 0  )  const [inline]
 

Returns the specified band of the image data as a unique vector.

Parameters:
band the band number.

Reimplemented from pandore::Imx3d< T >.


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