2 * Copyright 1993-2013 NVIDIA Corporation. All rights reserved.
4 * Please refer to the NVIDIA end user license agreement (EULA) associated
5 * with this source code for terms and conditions that govern your use of
6 * this software. Any use, reproduction, disclosure, or distribution of
7 * this software and related documentation outside the terms of the EULA
8 * is strictly prohibited.
12 #ifndef NV_UTIL_NPP_IMAGES_CPU_H
13 #define NV_UTIL_NPP_IMAGES_CPU_H
15 #include "ImagePacked.h"
17 #include "ImageAllocatorsCPU.h"
18 #include "Exceptions.h"
26 template<typename D, unsigned int N, class A>
27 class ImageCPU: public npp::ImagePacked<D, N, A>
36 ImageCPU(unsigned int nWidth, unsigned int nHeight): ImagePacked<D, N, A>(nWidth, nHeight)
42 ImageCPU(const npp::Image::Size &rSize): ImagePacked<D, N, A>(rSize)
47 ImageCPU(const ImageCPU<D, N, A> &rImage): Image(rImage)
59 operator= (const ImageCPU<D, N, A> &rImage)
61 ImagePacked<D, N, A>::operator= (rImage);
67 operator()(unsigned int iX, unsigned int iY)
69 return *ImagePacked<D, N, A>::pixels(iX, iY);
73 operator()(unsigned int iX, unsigned int iY)
76 return *ImagePacked<D, N, A>::pixels(iX, iY);
82 typedef ImageCPU<Npp8u, 1, npp::ImageAllocatorCPU<Npp8u, 1> > ImageCPU_8u_C1;
83 typedef ImageCPU<Npp8u, 2, npp::ImageAllocatorCPU<Npp8u, 2> > ImageCPU_8u_C2;
84 typedef ImageCPU<Npp8u, 3, npp::ImageAllocatorCPU<Npp8u, 3> > ImageCPU_8u_C3;
85 typedef ImageCPU<Npp8u, 4, npp::ImageAllocatorCPU<Npp8u, 4> > ImageCPU_8u_C4;
87 typedef ImageCPU<Npp16u, 1, npp::ImageAllocatorCPU<Npp16u, 1> > ImageCPU_16u_C1;
88 typedef ImageCPU<Npp16u, 3, npp::ImageAllocatorCPU<Npp16u, 3> > ImageCPU_16u_C3;
89 typedef ImageCPU<Npp16u, 4, npp::ImageAllocatorCPU<Npp16u, 4> > ImageCPU_16u_C4;
91 typedef ImageCPU<Npp16s, 1, npp::ImageAllocatorCPU<Npp16s, 1> > ImageCPU_16s_C1;
92 typedef ImageCPU<Npp16s, 3, npp::ImageAllocatorCPU<Npp16s, 3> > ImageCPU_16s_C3;
93 typedef ImageCPU<Npp16s, 4, npp::ImageAllocatorCPU<Npp16s, 4> > ImageCPU_16s_C4;
95 typedef ImageCPU<Npp32s, 1, npp::ImageAllocatorCPU<Npp32s, 1> > ImageCPU_32s_C1;
96 typedef ImageCPU<Npp32s, 3, npp::ImageAllocatorCPU<Npp32s, 3> > ImageCPU_32s_C3;
97 typedef ImageCPU<Npp32s, 4, npp::ImageAllocatorCPU<Npp32s, 4> > ImageCPU_32s_C4;
99 typedef ImageCPU<Npp32f, 1, npp::ImageAllocatorCPU<Npp32f, 1> > ImageCPU_32f_C1;
100 typedef ImageCPU<Npp32f, 3, npp::ImageAllocatorCPU<Npp32f, 3> > ImageCPU_32f_C3;
101 typedef ImageCPU<Npp32f, 4, npp::ImageAllocatorCPU<Npp32f, 4> > ImageCPU_32f_C4;
105 #endif // NV_IMAGE_IPP_H