Lines Matching refs:WImage

109 template <typename T> class WImage;  variable
118 typedef WImage<uchar> WImage_b;
130 typedef WImage<float> WImage_f;
144 typedef WImage<short> WImage_16s;
156 typedef WImage<ushort> WImage_16u;
175 class WImage
182 virtual ~WImage() = 0;
229 void CopyFrom(const WImage<T>& src) { cvCopy(src.Ipl(), image_); } in CopyFrom()
239 WImage(const WImage&);
240 void operator=(const WImage&);
242 explicit WImage(IplImage* img) : image_(img) { in WImage() function
260 class WImageC : public WImage<T>
263 typedef typename WImage<T>::BaseType BaseType;
266 explicit WImageC(IplImage* img) : WImage<T>(img) { in WImageC()
275 cvCopy(src.Ipl(), WImage<T>::image_); in CopyFrom()
290 assert(!image || image->depth == WImage<T>::Depth()); in SetIpl()
291 WImage<T>::SetIpl(image); in SetIpl()
302 class WImageBuffer : public WImage<T>
305 typedef typename WImage<T>::BaseType BaseType;
308 WImageBuffer() : WImage<T>(0) {} in WImageBuffer()
310 WImageBuffer(int width, int height, int nchannels) : WImage<T>(0) { in WImageBuffer()
316 explicit WImageBuffer(IplImage* img) : WImage<T>(img) {} in WImageBuffer()
325 WImage<T>::SetIpl(img); in SetIpl()
329 void CloneFrom(const WImage<T>& src) { in CloneFrom()
340 if (WImage<T>::image_) { in ReleaseImage()
341 IplImage* image = WImage<T>::image_; in ReleaseImage()
343 WImage<T>::SetIpl(0); in ReleaseImage()
347 bool IsNull() const {return WImage<T>::image_ == NULL; } in IsNull()
361 typedef typename WImage<T>::BaseType BaseType;
397 if (WImage<T>::image_) { in ReleaseImage()
398 IplImage* image = WImage<T>::image_; in ReleaseImage()
404 bool IsNull() const {return WImage<T>::image_ == NULL; } in IsNull()
419 class WImageView : public WImage<T>
422 typedef typename WImage<T>::BaseType BaseType;
426 WImageView(WImage<T>* img, int c, int r, int width, int height);
434 WImageView(IplImage* img) : WImage<T>(img) {} in WImageView()
437 WImageView(const WImage<T>& img) : WImage<T>(0) { in WImageView()
439 WImage<T>::SetIpl(&header_); in WImageView()
442 WImageView& operator=(const WImage<T>& img) {
444 WImage<T>::SetIpl(&header_);
457 typedef typename WImage<T>::BaseType BaseType;
507 inline int WImage<uchar>::Depth() const {return IPL_DEPTH_8U; } in Depth()
509 inline int WImage<schar>::Depth() const {return IPL_DEPTH_8S; } in Depth()
511 inline int WImage<short>::Depth() const {return IPL_DEPTH_16S; } in Depth()
513 inline int WImage<ushort>::Depth() const {return IPL_DEPTH_16U; } in Depth()
515 inline int WImage<int>::Depth() const {return IPL_DEPTH_32S; } in Depth()
517 inline int WImage<float>::Depth() const {return IPL_DEPTH_32F; } in Depth()
519 inline int WImage<double>::Depth() const {return IPL_DEPTH_64F; } in Depth()
524 template<typename T> inline WImage<T>::~WImage() {} in ~WImage()
533 if (IsNull() || WImage<T>::Width() != width || in Allocate()
534 WImage<T>::Height() != height || WImage<T>::Channels() != nchannels) { in Allocate()
536 WImage<T>::image_ = cvCreateImage(cvSize(width, height), in Allocate()
537 WImage<T>::Depth(), nchannels); in Allocate()
544 if (IsNull() || WImage<T>::Width() != width || WImage<T>::Height() != height) { in Allocate()
546 WImageC<T, C>::SetIpl(cvCreateImage(cvSize(width, height),WImage<T>::Depth(), C)); in Allocate()
554 WImageView<T>::WImageView(WImage<T>* img, int c, int r, int width, int height) in WImageView()
555 : WImage<T>(0) in WImageView()
561 WImage<T>::SetIpl(&header_); in WImageView()
566 : WImage<T>(0) in WImageView()
568 cvInitImageHeader(&header_, cvSize(width, height), WImage<T>::Depth(), nchannels); in WImageView()
573 WImage<T>::SetIpl(&header_); in WImageView()
589 cvInitImageHeader(&header_, cvSize(0, 0), WImage<T>::Depth(), C); in WImageViewC()
598 cvInitImageHeader(&header_, cvSize(width, height), WImage<T>::Depth(), C); in WImageViewC()
608 WImageView<T> WImage<T>::View(int c, int r, int width, int height) { in View()