00001 /***************************************************************************\ 00002 * Copyright (C) by University Paris-Est - MISS team 00003 * ImageRGB.hpp created in 09 2008. 00004 * Mail : biri@univ-mlv.fr 00005 * 00006 * This file is part of the OpenKraken-image. 00007 * 00008 * The OpenKraken-image is free software; you can redistribute it and/or modify 00009 * it under the terms of the GNU Lesser General Public License as published by 00010 * the Free Software Foundation; either version 3 of the License, or 00011 * (at your option) any later version. 00012 * 00013 * The OpenKraken-image is distributed in the hope that it will be useful, 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00016 * GNU Lesser General Public License for more details. 00017 * 00018 * You should have received a copy of the GNU Lesser General Public License 00019 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00020 * 00021 \***************************************************************************/ 00022 00023 /* 00024 * Anti-doublon 00025 */ 00026 #ifndef __OPENKN_IMAGE__IMAGERGB_HPP__ 00027 #define __OPENKN_IMAGE__IMAGERGB_HPP__ 00028 00029 /* 00030 * External Includes 00031 */ 00032 #include <iostream> 00033 #include <string> 00034 00035 00036 /* 00037 * Internal Includes 00038 */ 00039 #include "Image.hpp" 00040 00041 /* 00042 * Namespace 00043 */ 00044 namespace kn{ 00045 /* 00046 * Class definition 00047 */ 00051 template<typename T> 00052 class ImageRGB : public Image<T> { 00053 00054 /* 00055 * Constructor & destructors 00056 */ 00057 public: 00060 ImageRGB(); 00066 ImageRGB(const size_t w, const size_t h, T * buffer=NULL); 00070 ImageRGB(const ImageRGB & e); 00073 virtual ~ImageRGB(); 00074 00075 }; 00076 00077 /* 00078 * Templates definitions 00079 */ 00080 00081 /* 00082 * Functions definitions 00083 */ 00084 template<typename T> 00085 ImageRGB<T>::ImageRGB(void) : Image<T>() { 00086 this->imageNbChannel = 3; 00087 } 00088 00089 template<typename T> 00090 ImageRGB<T>::ImageRGB(const size_t w,const size_t h,T* buffer) : Image<T>(w,h,3,buffer) { 00091 } 00092 00093 template<typename T> 00094 ImageRGB<T>::ImageRGB(const ImageRGB<T> & e) : Image<T>(e) { 00095 } 00096 00097 template<typename T> 00098 ImageRGB<T>::~ImageRGB(void) { 00099 } 00100 00101 /* 00102 * Type definition 00103 */ 00104 typedef ImageRGB<float> ImageRGBf; 00105 typedef ImageRGB<double> ImageRGBd; 00106 typedef ImageRGB<unsigned char> ImageRGB8u; 00107 typedef ImageRGB<unsigned short int> ImageRGB16u; 00108 typedef ImageRGB<unsigned int> ImageRGB32u; 00109 typedef ImageRGB<unsigned long int> ImageRGB64u; 00110 typedef ImageRGB<char> ImageRGB8s; 00111 typedef ImageRGB<short int> ImageRGB16s; 00112 typedef ImageRGB<int> ImageRGB32s; 00113 typedef ImageRGB<long int> ImageRGB64s; 00114 00115 00116 /* 00117 * End of Namespace 00118 */ 00119 } 00120 00121 /* 00122 * End of Anti-doublon 00123 */ 00124 #endif
1.5.8