Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Purpose: PCIDSK PCT segment interface class. 4 : * 5 : ****************************************************************************** 6 : * Copyright (c) 2015 7 : * PCI Geomatics, 90 Allstate Parkway, Markham, Ontario, Canada. 8 : * 9 : * Permission is hereby granted, free of charge, to any person obtaining a 10 : * copy of this software and associated documentation files (the "Software"), 11 : * to deal in the Software without restriction, including without limitation 12 : * the rights to use, copy, modify, merge, publish, distribute, sublicense, 13 : * and/or sell copies of the Software, and to permit persons to whom the 14 : * Software is furnished to do so, subject to the following conditions: 15 : * 16 : * The above copyright notice and this permission notice shall be included 17 : * in all copies or substantial portions of the Software. 18 : * 19 : * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20 : * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 : * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 22 : * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 : * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 24 : * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 : * DEALINGS IN THE SOFTWARE. 26 : ****************************************************************************/ 27 : #ifndef INCLUDE_PCIDSK_BPCT_H 28 : #define INCLUDE_PCIDSK_BPCT_H 29 : 30 : #include <string> 31 : #include <vector> 32 : #include "pcidsk_types.h" 33 : 34 : namespace PCIDSK 35 : { 36 : struct BPCTEntry 37 : { 38 0 : BPCTEntry(): 39 0 : boundary(0.0), red(0), green(0), blue(0) 40 : { 41 0 : } 42 : BPCTEntry(double bound, 43 : unsigned char r, 44 : unsigned char g, 45 : unsigned char b): 46 : boundary(bound), red(r), green(g), blue(b) 47 : { 48 : } 49 : double boundary; 50 : unsigned char red; 51 : unsigned char green; 52 : unsigned char blue; 53 : }; 54 : /************************************************************************/ 55 : /* PCIDSK_PCT */ 56 : /************************************************************************/ 57 : 58 : //! Interface to PCIDSK pseudo-color segment. 59 : 60 : class PCIDSK_DLL PCIDSK_BPCT 61 : { 62 : public: 63 0 : virtual ~PCIDSK_BPCT() {} 64 : 65 : /** 66 : \brief Read a PCT Segment (SEG_BPCT). 67 : 68 : @param vBPCT Breakpoint Pseudo-Color Table buffer into which the breakpoint 69 : pseudo-color table is read. It consists of a vector of BPCTEntry. 70 : 71 : */ 72 : virtual void ReadBPCT( std::vector<BPCTEntry>& vBPCT) = 0; 73 : 74 : /** 75 : \brief Write a BPCT Segment. 76 : 77 : @param vBPCT Breakpoint Pseudo-Color Table buffer from which the breakpoint 78 : pseudo-color table is written. It consists of a vector of BPCTEntry. 79 : 80 : */ 81 : virtual void WriteBPCT( const std::vector<BPCTEntry>& vBPCT) = 0; 82 : }; 83 : } // end namespace PCIDSK 84 : 85 : #endif // INCLUDE_PCIDSK_BPCT_H