Blender  V3.3
Public Member Functions | List of all members
libmv::Array3D< T > Class Template Reference

3D array (row, column, channel). More...

#include <array_nd.h>

Inheritance diagram for libmv::Array3D< T >:
libmv::ArrayND< T, 3 > libmv::BaseArray

Public Member Functions

 Array3D ()
 
 Array3D (int height, int width, int depth=1)
 
 Array3D (T *data, int height, int width, int depth=1)
 
void Resize (int height, int width, int depth=1)
 
int Height () const
 
int Width () const
 
int Depth () const
 
int rows () const
 
int cols () const
 
int depth () const
 
int Get_Step () const
 
Toperator() (int i0, int i1, int i2=0)
 Enable accessing with 2 indices for grayscale images. More...
 
const Toperator() (int i0, int i1, int i2=0) const
 
- Public Member Functions inherited from libmv::ArrayND< T, 3 >
 ArrayND ()
 Create an empty array. More...
 
 ArrayND (const Index &shape)
 Create an array with the specified shape. More...
 
 ArrayND (int *shape)
 Create an array with the specified shape. More...
 
 ArrayND (const ArrayND< T, N > &b)
 Copy constructor. More...
 
 ArrayND (int s0)
 
 ArrayND (int s0, int s1)
 
 ArrayND (int s0, int s1, int s2)
 
 ArrayND (T *data, int s0, int s1, int s2)
 
 ~ArrayND ()
 Destructor deletes pixel data. More...
 
ArrayNDoperator= (const ArrayND< T, N > &b)
 Assignation copies pixel data. More...
 
const IndexShapes () const
 
const IndexStrides () const
 
void Resize (const Index &new_shape)
 Create an array of shape s. More...
 
void Resize (const int *new_shape_array)
 Resizes the array to shape s. All data is lost. More...
 
void Resize (int s0)
 Resize a 1D array to length s0. More...
 
void Resize (int s0, int s1)
 Resize a 2D array to shape (s0,s1). More...
 
void Resize (int s0, int s1, int s2)
 Resize a 3D array to shape (s0,s1,s2). More...
 
void ResizeLike (const ArrayND< D, N > &other)
 
void resize (int rows, int cols)
 
void CopyFrom (const ArrayND< D, N > &other)
 
void Fill (T value)
 
void fill (T value)
 
const IndexShape () const
 Return a tuple containing the length of each axis. More...
 
int Shape (int axis) const
 Return the length of an axis. More...
 
int Stride (int axis) const
 Return the distance between neighboring elements along axis. More...
 
int Size () const
 Return the number of elements of the array. More...
 
int MemorySizeInBytes () const
 Return the total amount of memory used by the array. More...
 
TData ()
 Pointer to the first element of the array. More...
 
const TData () const
 Constant pointer to the first element of the array. More...
 
int Offset (const Index &index) const
 Distance between the first element and the element at position index. More...
 
int Offset (int i0) const
 1D specialization. More...
 
int Offset (int i0, int i1) const
 2D specialization. More...
 
int Offset (int i0, int i1, int i2) const
 3D specialization. More...
 
Toperator() (const Index &index)
 Return a reference to the element at position index. More...
 
Toperator() (int i0)
 1D specialization. More...
 
Toperator() (int i0, int i1)
 2D specialization. More...
 
Toperator() (int i0, int i1, int i2)
 3D specialization. More...
 
const Toperator() (const Index &index) const
 Return a constant reference to the element at position index. More...
 
const Toperator() (int i0) const
 1D specialization. More...
 
const Toperator() (int i0, int i1) const
 2D specialization. More...
 
const Toperator() (int i0, int i1, int i2) const
 3D specialization. More...
 
bool Contains (const Index &index) const
 True if index is inside array. More...
 
bool Contains (int i0) const
 1D specialization. More...
 
bool Contains (int i0, int i1) const
 2D specialization. More...
 
bool Contains (int i0, int i1, int i2) const
 3D specialization. More...
 
bool operator== (const ArrayND< T, N > &other) const
 
bool operator!= (const ArrayND< T, N > &other) const
 
ArrayND< T, Noperator* (const ArrayND< T, N > &other) const
 

Additional Inherited Members

- Public Types inherited from libmv::ArrayND< T, 3 >
typedef T Scalar
 
typedef Tuple< int, NIndex
 Type for the multidimensional indices. More...
 
- Protected Attributes inherited from libmv::ArrayND< T, 3 >
Index shape_
 The number of element in each dimension. More...
 
Index strides_
 How to jump to neighbors in each dimension. More...
 
Tdata_
 Pointer to the first element of the array. More...
 
bool own_data_
 Flag if this Array either own or reference the data. More...
 

Detailed Description

template<typename T>
class libmv::Array3D< T >

3D array (row, column, channel).

Definition at line 325 of file array_nd.h.

Constructor & Destructor Documentation

◆ Array3D() [1/3]

template<typename T >
libmv::Array3D< T >::Array3D ( )
inline

Definition at line 329 of file array_nd.h.

◆ Array3D() [2/3]

template<typename T >
libmv::Array3D< T >::Array3D ( int  height,
int  width,
int  depth = 1 
)
inline

Definition at line 330 of file array_nd.h.

◆ Array3D() [3/3]

template<typename T >
libmv::Array3D< T >::Array3D ( T data,
int  height,
int  width,
int  depth = 1 
)
inline

Definition at line 331 of file array_nd.h.

Member Function Documentation

◆ cols()

template<typename T >
int libmv::Array3D< T >::cols ( ) const
inline

Definition at line 345 of file array_nd.h.

References libmv::Array3D< T >::Width().

Referenced by libmv::RegionIsInBounds().

◆ Depth()

template<typename T >
int libmv::Array3D< T >::Depth ( ) const
inline

◆ depth()

template<typename T >
int libmv::Array3D< T >::depth ( void  ) const
inline

Definition at line 346 of file array_nd.h.

References libmv::Array3D< T >::Depth().

Referenced by libmv::Array3D< T >::Resize().

◆ Get_Step()

template<typename T >
int libmv::Array3D< T >::Get_Step ( ) const
inline

Definition at line 348 of file array_nd.h.

References libmv::Array3D< T >::Depth(), and libmv::Array3D< T >::Width().

◆ Height()

template<typename T >
int libmv::Array3D< T >::Height ( ) const
inline

◆ operator()() [1/2]

template<typename T >
T& libmv::Array3D< T >::operator() ( int  i0,
int  i1,
int  i2 = 0 
)
inline

Enable accessing with 2 indices for grayscale images.

Definition at line 351 of file array_nd.h.

References libmv::Array3D< T >::Height(), i1, libmv::ArrayND< T, 3 >::operator()(), and libmv::Array3D< T >::Width().

◆ operator()() [2/2]

template<typename T >
const T& libmv::Array3D< T >::operator() ( int  i0,
int  i1,
int  i2 = 0 
) const
inline

◆ Resize()

template<typename T >
void libmv::Array3D< T >::Resize ( int  height,
int  width,
int  depth = 1 
)
inline

◆ rows()

template<typename T >
int libmv::Array3D< T >::rows ( ) const
inline

Definition at line 344 of file array_nd.h.

References libmv::Array3D< T >::Height().

Referenced by libmv::RegionIsInBounds().

◆ Width()

template<typename T >
int libmv::Array3D< T >::Width ( ) const
inline

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