SampleICC Main srcforge
Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IccMpeACS.h

Go to the documentation of this file.
00001 
00012 /*
00013 * The ICC Software License, Version 0.1
00014 *
00015 *
00016 * Copyright (c) 2005 The International Color Consortium. All rights 
00017 * reserved.
00018 *
00019 * Redistribution and use in source and binary forms, with or without
00020 * modification, are permitted provided that the following conditions
00021 * are met:
00022 *
00023 * 1. Redistributions of source code must retain the above copyright
00024 *    notice, this list of conditions and the following disclaimer. 
00025 *
00026 * 2. Redistributions in binary form must reproduce the above copyright
00027 *    notice, this list of conditions and the following disclaimer in
00028 *    the documentation and/or other materials provided with the
00029 *    distribution.
00030 *
00031 * 3. The end-user documentation included with the redistribution,
00032 *    if any, must include the following acknowledgment:  
00033 *       "This product includes software developed by the
00034 *        The International Color Consortium (www.color.org)"
00035 *    Alternately, this acknowledgment may appear in the software itself,
00036 *    if and wherever such third-party acknowledgments normally appear.
00037 *
00038 * 4. In the absence of prior written permission, the names "ICC" and "The
00039 *    International Color Consortium" must not be used to imply that the
00040 *    ICC organization endorses or promotes products derived from this
00041 *    software.
00042 *
00043 *
00044 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
00045 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
00046 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00047 * DISCLAIMED.  IN NO EVENT SHALL THE INTERNATIONAL COLOR CONSORTIUM OR
00048 * ITS CONTRIBUTING MEMBERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00049 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00050 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00051 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00052 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00053 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00054 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00055 * SUCH DAMAGE.
00056 * ====================================================================
00057 *
00058 * This software consists of voluntary contributions made by many
00059 * individuals on behalf of the The International Color Consortium. 
00060 *
00061 *
00062 * Membership in the ICC is encouraged when this software is used for
00063 * commercial purposes. 
00064 *
00065 *  
00066 * For more information on The International Color Consortium, please
00067 * see <http://www.color.org/>.
00068 *  
00069 * 
00070 */
00071 
00073 // HISTORY:
00074 //
00075 // -Jan 30, 2005 
00076 //  Initial CIccMpeent prototype development
00077 //
00079 
00080 #ifndef _ICCMPEACS_H
00081 #define _ICCMPEACS_H
00082 
00083 #include "IccTagMPE.h"
00084 
00085 
00086 //CIccFloatTag support
00087 #ifdef USESAMPLEICCNAMESPACE
00088 namespace sampleICC {
00089 #endif
00090 
00098 class CIccMpeAcs : public CIccMultiProcessElement
00099 {
00100 public:
00101   virtual ~CIccMpeAcs();
00102   virtual void Describe(std::string &sDescription);
00103 
00104   virtual bool Read(icUInt32Number size, CIccIO *pIO);
00105   virtual bool Write(CIccIO *pIO);
00106 
00107   virtual bool Begin(icElemInterp nInterp, CIccTagMultiProcessElement *pMPE);
00108   virtual void Apply(icFloatNumber *pDestPixel, const icFloatNumber *pSrcPixel);
00109   virtual icValidateStatus Validate(icTagSignature sig, std::string &sReport, const CIccTagMultiProcessElement* pMPE=NULL) const;
00110 
00111   virtual bool IsAcs() { return true; }
00112 
00113   bool AllocData(icUInt32Number size);
00114   icUInt8Number* GetData() { return m_pData; }
00115   icUInt32Number GetDataSize() { return m_nDataSize; }
00116 
00117   virtual icAcsSignature GetAcsSig() { return m_signature; }
00118 
00119 protected:
00120   CIccMpeAcs();
00121   icAcsSignature m_signature;
00122 
00123   icUInt32Number m_nDataSize;
00124   icUInt8Number *m_pData;
00125 };
00126 
00127 
00128 
00136 class CIccMpeBAcs : public CIccMpeAcs
00137 {
00138 public:
00139   CIccMpeBAcs(icUInt16Number nChannels=0, icAcsSignature sig = 0);
00140   CIccMpeBAcs(const CIccMpeBAcs &elemAcs);
00141   CIccMpeBAcs &operator=(const CIccMpeBAcs &elemAcs);
00142   virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeBAcs(*this);}
00143   virtual ~CIccMpeBAcs();
00144 
00145   virtual icElemTypeSignature GetType() const { return icSigBAcsElemType; }
00146   virtual const icChar *GetClassName() const { return "CIccMpeBAcs"; }
00147 
00148   virtual icAcsSignature GetBAcsSig() { return m_signature; }
00149 
00150 };
00151 
00152 
00160 class CIccMpeEAcs : public CIccMpeAcs
00161 {
00162 public:
00163   CIccMpeEAcs(icUInt16Number nChannels=0, icAcsSignature sig = 0);
00164   CIccMpeEAcs(const CIccMpeEAcs &elemAcs);
00165   CIccMpeEAcs &operator=(const CIccMpeEAcs &elemAcs);
00166   virtual CIccMultiProcessElement *NewCopy() const { return new CIccMpeEAcs(*this);}
00167   virtual ~CIccMpeEAcs();
00168 
00169   virtual icElemTypeSignature GetType() const { return icSigEAcsElemType; }
00170   virtual const icChar *GetClassName() const { return "CIccMpeEAcs"; }
00171 
00172   virtual icAcsSignature GetEAcsSig() { return m_signature;}
00173 };
00174 
00175 
00176 //CIccMPElements support  
00177 #ifdef USESAMPLEICCNAMESPACE
00178 }
00179 #endif
00180 
00181 #endif //_ICCMPEACS_H

Generated on Tue Jun 26 17:51:43 2007 for IccProfLib by  doxygen 1.3.9.1