Line data Source code
1 : /****************************************************************************** 2 : * 3 : * Purpose: Declaration of the PCIDSKChannel interface. 4 : * 5 : ****************************************************************************** 6 : * Copyright (c) 2009 7 : * PCI Geomatics, 90 Allstate Parkway, Markham, Ontario, Canada. 8 : * 9 : * SPDX-License-Identifier: MIT 10 : ****************************************************************************/ 11 : #ifndef INCLUDE_PCIDSK_CHANNEL_H 12 : #define INCLUDE_PCIDSK_CHANNEL_H 13 : 14 : #include "pcidsk_types.h" 15 : #include <string> 16 : #include <vector> 17 : 18 : namespace PCIDSK 19 : { 20 : /************************************************************************/ 21 : /* PCIDSKChannel */ 22 : /************************************************************************/ 23 : 24 : //! Interface to one PCIDSK channel (band) or bitmap segment. 25 : 26 : class PCIDSK_DLL PCIDSKChannel 27 : { 28 : public: 29 251 : virtual ~PCIDSKChannel() {} 30 : virtual int GetBlockWidth() const = 0; 31 : virtual int GetBlockHeight() const = 0; 32 : virtual int GetBlockCount() const = 0; 33 : virtual int GetWidth() const = 0; 34 : virtual int GetHeight() const = 0; 35 : virtual eChanType GetType() const = 0; 36 : virtual int ReadBlock( int block_index, void *buffer, 37 : int win_xoff=-1, int win_yoff=-1, 38 : int win_xsize=-1, int win_ysize=-1 ) = 0; 39 : virtual int WriteBlock( int block_index, void *buffer ) = 0; 40 : virtual int GetOverviewCount() = 0; 41 : virtual PCIDSKChannel *GetOverview( int i ) = 0; 42 : virtual bool IsOverviewValid( int i ) = 0; 43 : virtual std::string GetOverviewResampling( int i ) = 0; 44 : virtual void SetOverviewValidity( int i, bool validity ) = 0; 45 : virtual std::vector<int> GetOverviewLevelMapping() const = 0; 46 : 47 : virtual std::string GetMetadataValue( const std::string &key ) const = 0; 48 : virtual void SetMetadataValue( const std::string &key, const std::string &value ) = 0; 49 : virtual std::vector<std::string> GetMetadataKeys() const = 0; 50 : 51 : virtual void Synchronize() = 0; 52 : 53 : virtual std::string GetDescription() = 0; 54 : virtual void SetDescription( const std::string &description ) = 0; 55 : 56 : virtual std::vector<std::string> GetHistoryEntries() const = 0; 57 : virtual void SetHistoryEntries( const std::vector<std::string> &entries ) = 0; 58 : virtual void PushHistory(const std::string &app, 59 : const std::string &message) = 0; 60 : 61 : // Only applicable to FILE interleaved raw channels. 62 : virtual void GetChanInfo( std::string &filename, uint64 &image_offset, 63 : uint64 &pixel_offset, uint64 &line_offset, 64 : bool &little_endian ) const = 0; 65 : virtual void SetChanInfo( std::string filename, uint64 image_offset, 66 : uint64 pixel_offset, uint64 line_offset, 67 : bool little_endian ) = 0; 68 : 69 : // Only applicable to CExternalChannels 70 : virtual void GetEChanInfo( std::string &filename, int &echannel, 71 : int &exoff, int &eyoff, 72 : int &exsize, int &eysize ) const = 0; 73 : virtual void SetEChanInfo( std::string filename, int echannel, 74 : int exoff, int eyoff, 75 : int exsize, int eysize ) = 0; 76 : }; 77 : } // end namespace PCIDSK 78 : 79 : #endif // INCLUDE_PCIDSK_CHANNEL_H