pandore::Imc3d< T > Class Template Reference

#include <image.h>

Inheritance diagram for pandore::Imc3d< T >:

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

Detailed Description

template<typename T>
class pandore::Imc3d< T >

The 3D color image.

A Imc3d < /code> is a color 3D image. A 3D color image is implemented with three 3D arrays of pixels, where a pixel is of T type.
For the use of Imc3d images see The Images.


Public Types

typedef T ValueType

Public Member Functions

Typobj Type () const
std::string Name () const
 Imc3d ()
 Imc3d (Long b, Long d, Long h, Long w, T *data=0, bool isOwner=false)
 Imc3d (Long b, const Dimension3d &d, T *data=0, bool isOwner=false)
 Imc3d (Long d, Long h, Long w, T *data=0, bool isOwner=false)
 Imc3d (const Dimension3d &d, T *data=0, bool isOwner=false)
 Imc3d (const PobjectProps &p, T *data=0, bool isOwner=false)
void New (Long, Long d, Long h, Long w, T *data=0, bool isOwner=false)
void New (Long, const Dimension3d &d, T *data=0, bool isOwner=false)
void New (Long d, Long h, Long w, T *data=0, bool isOwner=false)
void New (const Dimension3d &d, T *data=0, bool isOwner=false)
void New (const PobjectProps &p, T *data=0, bool isOwner=false)
Pobject * Clone () const
Imc3d< T > & operator= (const T val)
template<typename U>
Imc3d< T > & operator= (const Imc3d< U > &src)
Imc3d< T > & operator= (const Imc3d< T > &src)
ValueTypeVectorX () const
ValueTypeVectorY () const
ValueTypeVectorZ () const
Errc LoadAttributes (FILE *file)
Errc SaveAttributes (FILE *file) const
 Imc3d (const Imc3d &ims)

Public Attributes

Imx3d< T >::Band3d X
Imx3d< T >::Band3d Y
Imx3d< T >::Band3d Z


Member Typedef Documentation

template<typename T>
typedef T pandore::Imc3d< T >::ValueType
 

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

Reimplemented from pandore::Imx3d< T >.


Constructor & Destructor Documentation

template<typename T>
pandore::Imc3d< T >::Imc3d  )  [inline]
 

Creates a new image with no size and no data.

template<typename T>
pandore::Imc3d< T >::Imc3d Long  b,
Long  d,
Long  h,
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.
d the depth of the image.
h the height of the image.
w the width of the image.
data the vector of data.
isOwner is the image responsible for deleting the data.

template<typename T>
pandore::Imc3d< T >::Imc3d Long  b,
const Dimension3d 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<typename T>
pandore::Imc3d< T >::Imc3d Long  d,
Long  h,
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:
d the depth of the image.
h the height of the image.
w the width of the image.
data the vector of data.
isOwner is the image responsible for deleting the data.

template<typename T>
pandore::Imc3d< T >::Imc3d const Dimension3d 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:
d the dimension of the image.
data the vector of data.
isOwner is the image responsible for deleting the data.

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

Creates a new image with the specified properties, and the specified 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<typename T>
pandore::Imc3d< T >::Imc3d const Imc3d< 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<typename T>
Pobject* pandore::Imc3d< T >::Clone  )  const [inline, virtual]
 

Creates and returns a distinct copy of this object.

Returns:
a new image.

Reimplemented from pandore::Imx3d< T >.

template<typename T>
Errc pandore::Imc3d< 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 >.

template<typename T>
std::string pandore::Imc3d< T >::Name  )  const [inline]
 

Returns the type name (for instance Imc3duc or Imc3dsl or Imc3dsf).

Reimplemented from pandore::Imx3d< T >.

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

Allocates the image data from the specified properties.

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

Reimplemented from pandore::Imx3d< T >.

template<typename T>
void pandore::Imc3d< T >::New const Dimension3d 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:
d the dimension of the image.
data a vector of data.
isOwner is the image responsible for deleting the data.

template<typename T>
void pandore::Imc3d< T >::New Long  d,
Long  h,
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:
d the depth of the image.
h the heigth of the image.
w the width of the image.
data the vector of data.
isOwner is the image responsible for deleting the data.

template<typename T>
void pandore::Imc3d< T >::New Long  ,
const Dimension3d 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<typename T>
void pandore::Imc3d< T >::New Long  ,
Long  d,
Long  h,
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.
d the depth of the image.
h the heigth of the image.
w the width of the image.
data the vector of data.
isOwner is the image responsible for deleting the data.

Reimplemented from pandore::Imx3d< T >.

template<typename T>
Imc3d< T >& pandore::Imc3d< T >::operator= const Imc3d< 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<typename T>
template<typename U>
Imc3d< T >& pandore::Imc3d< T >::operator= const Imc3d< 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<typename T>
Imc3d< T >& pandore::Imc3d< 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 >.

template<typename T>
Errc pandore::Imc3d< 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 >.

template<typename T>
Typobj pandore::Imc3d< T >::Type  )  const [inline]
 

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

Reimplemented from pandore::Imx3d< T >.

template<typename T>
ValueType* pandore::Imc3d< T >::VectorX  )  const [inline]
 

Returns the X band of the image data as a unique vector (eg. Red for RGB color image).

template<typename T>
ValueType* pandore::Imc3d< T >::VectorY  )  const [inline]
 

Returns the Y band of the image data as a unique vector (eg. Green for RGB color image).

template<typename T>
ValueType* pandore::Imc3d< T >::VectorZ  )  const [inline]
 

Returns the Z band of the image data as a unique vector (eg. Blue for RGB color image).


Member Data Documentation

template<typename T>
Imx3d< T>::Band3d pandore::Imc3d< T >::X
 

The X band (eg. Red for RGB color image) of the color image.

template<typename T>
Imx3d< T>::Band3d pandore::Imc3d< T >::Y
 

The Y band (eg. Green for RGB color image) of the color image.

template<typename T>
Imx3d< T>::Band3d pandore::Imc3d< T >::Z
 

The Z band (eg. Blue for RGB color image) of the color image.


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