Template Class ImageBatchVarShapeWrap< const T >

Class Documentation

template<typename T>
class ImageBatchVarShapeWrap<const T>

Public Types

using ValueType = const T

Public Functions

ImageBatchVarShapeWrap() = default
inline __host__ ImageBatchVarShapeWrap(const ImageBatchVarShapeDataStridedCuda &images)

Constructs a constant ImageBatchVarShapeWrap by wrapping an images argument.

Parameters:

images[in] Reference to the list of images that will be wrapped.

inline const __host__ __device__ NVCVImagePlaneStrided plane (int s, int p=0) const

Get plane p of image s sample.

Parameters:
  • s[in] Sample image index in the list.

  • p[in] Plane index in the image.

Returns:

The plane of the given image sample in batch.

inline __host__ __device__ int width (int s, int p=0) const

Get width of plane p of image s sample.

Parameters:
  • s[in] Sample image index in the list.

  • p[in] Plane index in the image.

Returns:

The width of the given image plane in batch.

inline __host__ __device__ int height (int s, int p=0) const

Get height of plane p of image s sample.

Parameters:
  • s[in] Sample image index in the list.

  • p[in] Plane index in the image.

Returns:

The height of the given image plane in batch.

inline __host__ __device__ int rowStride (int s, int p=0) const

Get row stride in bytes of plane p of image s sample.

Parameters:
  • s[in] Sample image index in the list.

  • p[in] Plane index in the image.

Returns:

The row stride in bytes of the given image plane in batch.

inline const __host__ __device__ T & operator[] (int4 c) const

Subscript operator for read-only access.

Parameters:

c[in] 4D coordinates (w sample, z plane, y row and x column) to be accessed.

Returns:

Accessed const reference.

inline const __host__ __device__ T & operator[] (int3 c) const

Subscript operator for read-only access (considering plane=0).

Parameters:

c[in] 3D coordinates (z sample, y row and x column) to be accessed.

Returns:

Accessed const reference.

inline const __host__ __device__ T * ptr (int s, int p, int y, int x) const

Get a read-only proxy (as pointer) of the given coordinates.

Parameters:
  • s[in] Sample image index in the list.

  • p[in] Plane index in the image.

  • y[in] Row index in the selected image.

  • x[in] Column index in the selected image.

Returns:

The const pointer to the beginning of the given coordinates.

inline const __host__ __device__ T * ptr (int s, int y, int x) const

Get a read-only proxy (as pointer) of the given coordinates (considering plane=0).

Parameters:
  • s[in] Sample image index in the list.

  • y[in] Row index in the selected image.

  • x[in] Column index in the selected image.

Returns:

The const pointer to the beginning of the given coordinates.

inline const __host__ __device__ T * ptr (int s, int y) const

Get a read-only proxy (as pointer) of the given coordinates (considering plane=0).

Parameters:
  • s[in] Sample image index in the list.

  • y[in] Row index in the selected image.

Returns:

The const pointer to the beginning of the given coordinates.

Public Static Attributes

static constexpr int kNumDimensions = 4
static constexpr int kVariableStrides = 3
static constexpr int kConstantStrides = 1

Protected Functions

inline const __host__ __device__ T * doGetPtr (int s, int p, int y, int x) const