pandore::Img3d< T > Class Template Reference

#include <image.h>

Inheritance diagram for pandore::Img3d< T >:

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

Detailed Description

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

The 3D gray level image.

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


Public Types

typedef T ValueType

Public Member Functions

Typobj Type () const
std::string Name () const
 Img3d ()
 Img3d (Long d, Long h, Long w, T *data=0, bool isOwner=false)
 Img3d (const Dimension3d &d, T *data=0, bool isOwner=false)
 Img3d (const PobjectProps &p, 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
Img3d< T > & operator= (const T val)
template<typename U>
Img3d< T > & operator= (const Img3d< U > &src)
Img3d< T > & operator= (const Img3d< T > &src)
ValueTypeVector () const
Imx3d< T >::Band2d operator[] (Long dep)
const Imx3d< T >::Band2d operator[] (Long dep) const
ValueTypeoperator() (Long z, Long y, Long x)
const ValueTypeoperator() (Long z, Long y, Long x) const
ValueTypeoperator[] (const Point3d &p)
const ValueTypeoperator[] (const Point3d &p) const
ValueTypeoperator() (const Point3d &p)
const ValueTypeoperator() (const Point3d &p) const
const ValueTypeoperator() (int, const Point3d &p) const
ValueTypeoperator() (int, const Point3d &p)
 Img3d (const Img3d &ims)


Member Typedef Documentation

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

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

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg3d.


Constructor & Destructor Documentation

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

Creates a new image with no size and no data.

template<typename T>
pandore::Img3d< T >::Img3d Long  d,
Long  h,
Long  w,
T *  data = 0,
bool  isOwner = false
[inline]
 

Creates a new image with the specified depth, height and width values, 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 depth of the image.
h the height of the image.
w the width of the image.
data a vector of data.
isOwner is the image responsible for deleting the data.

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

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

Creates a new image with the specified properties. Allocates therefrom the related data.

Warning:
the pixel values are not initialized with 0. If data = 0 then data are allocated and freed by the image else data are allocated and freed externally.
Parameters:
p the properties.
data a vector of data.
isOwner is the image responsible for deleting the data.

template<typename T>
pandore::Img3d< T >::Img3d const Img3d< 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::Img3d< 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::Reg3d.

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

Returns the type name (for instance Img3duc or Img3dsl or Img3dsf).

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg3d.

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

Reimplemented from pandore::Imx3d< T >.

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

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

template<typename T>
ValueType& pandore::Img3d< T >::operator() int  ,
const Point3d p
[inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

template<typename T>
const ValueType& pandore::Img3d< T >::operator() int  ,
const Point3d p
const [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

template<typename T>
const ValueType& pandore::Img3d< T >::operator() const Point3d p  )  const [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

template<typename T>
ValueType& pandore::Img3d< T >::operator() const Point3d p  )  [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

template<typename T>
const ValueType& pandore::Img3d< T >::operator() Long  z,
Long  y,
Long  x
const [inline]
 

Returns the pixel value at the specified coordinates.

Parameters:
z the z-coordinate.
y the y-coordinate.
x the x-coordinate.

Reimplemented in pandore::Reg3d.

template<typename T>
ValueType& pandore::Img3d< T >::operator() Long  z,
Long  y,
Long  x
[inline]
 

Returns the pixel value at the specified coordinates.

Parameters:
z the z-coordinate.
y the y-coordinate.
x the x-coordinate.

Reimplemented in pandore::Reg3d.

template<typename T>
Img3d< T >& pandore::Img3d< T >::operator= const Img3d< 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>
Img3d< T >& pandore::Img3d< T >::operator= const Img3d< 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>
Img3d< T >& pandore::Img3d< 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>
const ValueType& pandore::Img3d< T >::operator[] const Point3d p  )  const [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

Reimplemented in pandore::Reg3d.

template<typename T>
ValueType& pandore::Img3d< T >::operator[] const Point3d p  )  [inline]
 

Returns the pixel at the specified coordinates.

Parameters:
p the coordinate.

Reimplemented in pandore::Reg3d.

template<typename T>
const Imx3d< T>::Band2d pandore::Img3d< T >::operator[] Long  dep  )  const [inline]
 

Returns the plane at the specified depth.

Parameters:
dep the depth number.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg3d.

template<typename T>
Imx3d< T>::Band2d pandore::Img3d< T >::operator[] Long  dep  )  [inline]
 

Returns the plane at the specified depth.

Parameters:
dep the depth number.

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg3d.

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

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

Reimplemented from pandore::Imx3d< T >.

Reimplemented in pandore::Reg3d.

template<typename T>
ValueType* pandore::Img3d< T >::Vector  )  const [inline]
 

Returns the image data as a unique vector.

Reimplemented in pandore::Reg3d.


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