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 : * SPDX-License-Identifier: MIT 10 : ****************************************************************************/ 11 : #ifndef INCLUDE_PCIDSK_BPCT_H 12 : #define INCLUDE_PCIDSK_BPCT_H 13 : 14 : #include <string> 15 : #include <vector> 16 : #include "pcidsk_types.h" 17 : 18 : namespace PCIDSK 19 : { 20 : struct BPCTEntry 21 : { 22 0 : BPCTEntry(): 23 0 : boundary(0.0), red(0), green(0), blue(0) 24 : { 25 0 : } 26 : BPCTEntry(double bound, 27 : unsigned char r, 28 : unsigned char g, 29 : unsigned char b): 30 : boundary(bound), red(r), green(g), blue(b) 31 : { 32 : } 33 : double boundary; 34 : unsigned char red; 35 : unsigned char green; 36 : unsigned char blue; 37 : }; 38 : /************************************************************************/ 39 : /* PCIDSK_PCT */ 40 : /************************************************************************/ 41 : 42 : //! Interface to PCIDSK pseudo-color segment. 43 : 44 : class PCIDSK_DLL PCIDSK_BPCT 45 : { 46 : public: 47 0 : virtual ~PCIDSK_BPCT() {} 48 : 49 : /** 50 : \brief Read a PCT Segment (SEG_BPCT). 51 : 52 : @param vBPCT Breakpoint Pseudo-Color Table buffer into which the breakpoint 53 : pseudo-color table is read. It consists of a vector of BPCTEntry. 54 : 55 : */ 56 : virtual void ReadBPCT( std::vector<BPCTEntry>& vBPCT) = 0; 57 : 58 : /** 59 : \brief Write a BPCT Segment. 60 : 61 : @param vBPCT Breakpoint Pseudo-Color Table buffer from which the breakpoint 62 : pseudo-color table is written. It consists of a vector of BPCTEntry. 63 : 64 : */ 65 : virtual void WriteBPCT( const std::vector<BPCTEntry>& vBPCT) = 0; 66 : }; 67 : } // end namespace PCIDSK 68 : 69 : #endif // INCLUDE_PCIDSK_BPCT_H