/******************************************************** ** Copyright 2003 Earth Resource Mapping Pty Ltd. ** This document contains unpublished source code of ** Earth Resource Mapping Pty Ltd. This notice does ** not indicate any intention to publish the source ** code contained herein. ** ** FILE: $Archive: /NCS/Source/include/NCSJP2FileView.h $ ** CREATED: 14/03/2003 3:27:34 PM ** AUTHOR: Simon Cope ** PURPOSE: CNCSJP2FileView class header ** EDITS: [xx] ddMmmyy NAME COMMENTS ** [01] 07Sep04 tfl Added support for configuring georeferencing use *******************************************************/ #ifndef NCSJP2FILEVIEW_H #define NCSJP2FILEVIEW_H #ifndef NCSJPCDEFS_H #include "NCSJPCDefs.h" #endif // NCSJPCDEFS_H #ifdef NCSJPC_ECW_SUPPORT #ifndef NCSECWCLIENT_H #include "NCSECWClient.h" #endif // NCSECWCLIENT_H #endif // NCSJPC_ECW_SUPPORT #ifndef NCSMUTEX_H #include "NCSMutex.h" #endif // NCSMUTEX_H #ifndef NCSJPCBUFFER_H #include "NCSJPCBuffer.h" #endif // NCSJPCBUFFER_H #ifndef NCSJPCEVENT_H #include "NCSJPCEVENT.H" #endif // NCSJPCEVENT_H #ifndef NCSJP2BOX_H #include "NCSJP2Box.h" #endif // NCSJP2BOX_H /** * CNCSJP2FileView class - the JP2 file view class. * * @author Simon Cope * @version $Revision$ $Author$ $Date$ */ class NCSJPC_EXPORT_ALL CNCSJP2FileView: private CNCSThread { public: typedef enum { ST_CODEBLOCK_DECODER_US = 0, /** Global T1 Decoder US total */ ST_CODEBLOCK_DECODER_SAMPLES = 1, /** Global T1 Decoder samples total */ ST_CODEBLOCK_READ_US = 2, /** Global Codeblock read US total */ ST_CODEBLOCK_READ_SAMPLES = 3, /** Global Codeblock read samples total */ ST_DCSHIFT_US = 10, ST_MCT_US = 20, ST_DWT_ROW_US = 30, ST_DWT_COL_US = 31, ST_DWT_SAMPLES = 32, ST_VIEW_SETVIEW_US = 40, ST_VIEW_READLINE_US = 41, ST_VIEW_RESAMPLE_US = 42, ST_IO_READ_US = 50, ST_IO_WRITE_US = 51, ST_IO_SEEK_US = 52, ST_BUF_ALLOC_US = 60, /** Global Buffer Alloc US total */ ST_BUF_FREE_US = 61, /** Global Buffer Free US total */ ST_BUF_ALLOC_BYTES = 62, /** Global Buffer bytes allocated total */ ST_BUF_COPY_US = 63, /** Global Buffer Copy US total */ ST_BUF_COPY_BYTES = 64, /** Global Buffer bytes copied total */ ST_BUF_CLEAR_US = 65, /** Global Buffer Clear US total */ ST_BUF_CLEAR_BYTES = 66, /** Global Buffer bytes cleared total */ ST_COMPRESS_TOTAL_MS = 80, /** File Compression Total MS */ ST_COMPRESS_OUTPUT_SIZE = 81 /** File Compression output size bytes total */ } Statistic; typedef enum { JP2_COMPRESS_PROFILE_BASELINE_0 = 0, /** Default, Baseline Profile 0 */ JP2_COMPRESS_PROFILE_BASELINE_1 = 1, /** Baseline Profile 1 */ JP2_COMPRESS_PROFILE_BASELINE_2 = 2, /** Profile 2 (unrestricted) */ JP2_COMPRESS_PROFILE_NITF_BIIF_NPJE = 3, /** NITF NSIF BIIF NPJE Profile */ JP2_COMPRESS_PROFILE_NITF_BIIF_EPJE = 4, /** NITF NSIF BIIF EPJE Profile */ JP2_COMPRESS_LEVELS = 20, /** UINT32 - Calculated so r=0 <= 64x64 */ JP2_COMPRESS_LAYERS = 21, /** UINT32 - Default 1 */ JP2_COMPRESS_PRECINCT_WIDTH = 22, /** UINT32 - Default 64 or larger depending on file size */ JP2_COMPRESS_PRECINCT_HEIGHT = 23, /** UINT32 - Default 64 or larger depending on file size */ JP2_COMPRESS_TILE_WIDTH = 24, /** UINT32 - Default to image width given in SetFileInfo() */ JP2_COMPRESS_TILE_HEIGHT = 25, /** UINT32 - Default to image height given in SetFileInfo() */ JP2_COMPRESS_INCLUDE_SOP = 26, /** bool - Default false */ JP2_COMPRESS_INCLUDE_EPH = 27, /** bool - Default true */ JP2_COMPRESS_PROGRESSION_LRCP = 30, /** Default, LRCP progression */ JP2_COMPRESS_PROGRESSION_RLCP = 31, /** RLCP progression */ JP2_GEODATA_USAGE = 40, /** Control the precedence of georeferencing metadata from world files and embedded GML XML boxes and PCS UUID boxes */ JP2_DECOMPRESS_LAYERS = 100, /** UINT32 - Defaults to all */ JPC_DECOMPRESS_RECONSTRUCTION_PARAMETER = 101, /** IEEE4 - defaults to 0.0, ranve 0.0 <= r < 1.0 */ } Parameter; class NCSJPC_EXPORT_ALL CNCSJP2FileViewVector: public std::vector, public CNCSThread { public: virtual ~CNCSJP2FileViewVector(); CNCSJPCEvent m_Event; virtual void Work(void *pData); }; INT32 m_nWidth; /*!< The number of cells across the dataset */ INT32 m_nHeight; /*!< The number of lines down the dataset */ INT32 m_nNumberOfBands; /*!< The number of bands in the dataset */ IEEE8 m_dCompressionRate; /*!< The actual compression ratio */ IEEE8 m_dTargetCompressionRate;/*!< The target compression ratio */ IEEE8 m_dCellIncrementX; /*!< The X cell size in m_CellSizeUnits */ IEEE8 m_dCellIncrementY; /*!< The Y cell size in m_CellSizeUnits */ IEEE8 m_dOriginX; /*!< The top left X origin of the dataset (world) */ IEEE8 m_dOriginY; /*!< The top left Y origin of the dataset (world) */ char *m_pDatum; /*!< The GDT datum of the dataset */ char *m_pProjection; /*!< The GDT projection of the dataset */ char *m_pFilename; /*!< A pointer to the currently open filename */ CellSizeUnits m_CellSizeUnits;/*!< Cell units, meters, degrees or feet */ NCSEcwCellType m_eCellType; /*!< Cell type image should be read as */ NCSFileColorSpace m_eColorSpace; /*!< ColorSpace of image */ std::vector m_Bands; /*!< BandInfo for each band */ INT32 m_nSetViewNrBands; /*!< The number of bands in the current view */ INT32 *m_pnSetViewBandList; /*!< A pointer to the band list for the current view */ INT32 m_nSetViewWidth; /*!< The current view width */ INT32 m_nSetViewHeight; /*!< The current view height */ IEEE8 m_dSetViewWorldTLX; /*!< The current view world top left X */ IEEE8 m_dSetViewWorldTLY; /*!< The current view world top left Y */ IEEE8 m_dSetViewWorldBRX; /*!< The current view world bottom right X */ IEEE8 m_dSetViewWorldBRY; /*!< The current view world bottom right Y */ INT32 m_nSetViewDatasetTLX; /*!< The current view dataset top left X */ INT32 m_nSetViewDatasetTLY; /*!< The current view dataset top left Y */ INT32 m_nSetViewDatasetBRX; /*!< The current view dataset bottom right X */ INT32 m_nSetViewDatasetBRY; /*!< The current view dataset bottom right Y */ /** Default constructor, initialises members */ CNCSJP2FileView(); /** Virtual Destructor */ virtual ~CNCSJP2FileView(); #ifdef _WCHAR_T_DEFINED /** * Open the JP2 file for Parsing/UnParsing. * @param pURLPath Full path name of JP2 file to open * @param bProgressiveDisplay Open for preogressive reading. * @return CNCSError NCS_SUCCESS or error code on failure. */ virtual CNCSError Open(wchar_t *pURLPath, bool bProgressiveDisplay = false, bool bWrite = false); #endif /** * Open the JP2 file for Parsing/UnParsing. * @param pURLPath Full path name of JP2 file to open * @param bProgressiveDisplay Open for preogressive reading. * @return CNCSError NCS_SUCCESS or error code on failure. */ virtual CNCSError Open(char *pURLPath, bool bProgressiveDisplay = false, bool bWrite = false); /** * Close the JP2 file * @param bFreeCache Free the cached JP2 file data. * @return CNCSError NCS_SUCCESS or error code on failure. */ virtual CNCSError Close ( bool bFreeCache = false ); /** * Set a view into the JP2 file for reading. * @param nBands Number of bands in pBandList to read * @param pBandList Array of band indices to read. * @param nWidth Width of the view in pixels * @param nHeight Height of the view in pixels * @param nDatasetTLX Top left X dataset coordinate of view * @param nDatasetTLY Top left Y dataset coordinate of view * @param nDatasetBRX Bottom right X dataset coordinate of view * @param nDatasetBRY Bottom right Y dataset voordinate of view * @param dWorldTLX Top left X world coordinate of view (informative only) * @param dWorldTLY Top left Y world coordinate of view (informative only) * @param dWorldBRX Bottom right X world coordinate of view (informative only) * @param dWorldBRY Bottom right Y world coordinate of view (informative only) * @return CNCSError NCS_SUCCESS or error code on failure. */ virtual CNCSError SetView(UINT32 nBands, UINT32 *pBandList, UINT32 nDatasetTLX, UINT32 nDatasetTLY, UINT32 nDatasetBRX, UINT32 nDatasetBRY, UINT32 nWidth, UINT32 nHeight, IEEE8 dWorldTLX = 0.0, IEEE8 dWorldTLY = 0.0, IEEE8 dWorldBRX = 0.0, IEEE8 dWorldBRY = 0.0); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(UINT8 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(UINT16 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(UINT32 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(UINT64 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(INT8 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(INT16 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(INT32 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(INT64 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(IEEE4 **ppOutputLine); /** * Read the next line in BIL format from the current view into the file. * @param ppOutputLine Array of buffer pointers, one buffer for each band * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(IEEE8 **ppOutputLine); /** * Read the next line in RGB UINT8 triplet format from the current view into the file. * @param pRGBTripler Pointer to UINT8 buffer to receive RGB data * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineRGB(UINT8 *pRGBTriplet); /** * Read the next line in BGR UINT8 triplet format from the current view into the file. * @param pBGRTripler Pointer to UINT8 buffer to receive BGR data * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBGR(UINT8 *pBGRTriplet); /** * Read the next line in RGBA UINT32 format from the current view into the file. * @param pRGBA Pointer to UINT32 buffer to receive RGBA data * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineRGBA(UINT32 *pRGBA); /** * Read the next line in BGRA UINT32 format from the current view into the file. * @param pBGRA Pointer to UINT32 buffer to receive BGRA data * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBGRA(UINT32 *pBGRA); /** * Read the next line in ARGB UINT32 format from the current view into the file. * @param pARGB Pointer to UINT32 buffer to receive ARGB data * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineARGB(UINT32 *pARGB); /** * Read the next line in ABGR UINT32 format from the current view into the file. * @param pABGR Pointer to UINT32 buffer to receive ABGR data * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineABGR(UINT32 *pABGR); /** * Read the next line in BIL format from the current view into the file. * @param eType Output buffer type * @param nBands Number of output bands * @param ppOutputLine Array of buffer pointers, one buffer for each band * @param pLineSteps Line steps, in CELLS. * @return NCSEcwReadStatus Read status code */ virtual NCSEcwReadStatus ReadLineBIL(NCSEcwCellType eType, UINT16 nBands, void **ppOutputLine, UINT32 *pLineSteps = NULL); /** * Write the next line in BIL format into the JP2 file. * @param eType Output buffer type * @param nBands Number of output bands * @param ppOutputLine Array of buffer pointers, one buffer for each band * @param pLineSteps Line steps, in CELLS. * @return CNCSError Write status code */ virtual CNCSError WriteLineBIL(NCSEcwCellType eType, UINT16 nBands, void **ppOutputLine, UINT32 *pLineSteps = NULL); /** * More data is available and a refresh update should be done. * @param pSetViewInfo Pointer to SetViewInfo containing details on view the update is for * @return NCSEcwReadStatus Return the Read status code from the ReadLine*() call. */ virtual NCSEcwReadStatus RefreshUpdateEx(NCSFileViewSetInfo *pViewSetInfo); /** * Start the compression. * In progressive (pull) mode scanlines will be sequentially * read by the overloaded WriteReadLine() method * @param eType Output buffer type * @param nBands Number of output bands * @param ppOutputLine Array of buffer pointers, one buffer for each band * @param pLineSteps Line steps, in CELLS. * @return CNCSError Write status code */ virtual CNCSError Write(); /** * Read input line for compression. * In progressive (pull) mode scanlines will be sequentially * read by the overloaded WriteReadLine() method * @param nNextLine Next input line to read * @param ppInputArray Array of buffer pointers, one buffer for each band * @return CNCSError Write status code */ virtual CNCSError WriteReadLine(UINT32 nNextLine, void **ppInputArray); /** * Compression status callback. * you overload this if you want a status callback to show progress during compression * @param nCurrentLine Current input line processed */ virtual void WriteStatus(UINT32 nCurrentLine); /** * Compression cancel callback. * you overload this if you want to be able to cancel during compression * @return bool Return true to cancel, else false to continue */ virtual bool WriteCancel(void); /** * Get current ViewSetinfo structure. * @return NCSFileViewSetInfo* Return pointer to the current SetViewInfo. */ virtual /*const*/ NCSFileViewSetInfo *GetFileViewSetInfo(); /** * Get FileInfo structure. * @return NCSFileViewFileInfo* Return pointer to the FileInfo. */ virtual /*const*/ NCSFileViewFileInfoEx *GetFileInfo(); /** * Set FileInfo structure. * @param Info New fileinfo - used to specify file info for compression * @return CNCSError Return pointer to the FileInfo. */ virtual CNCSError SetFileInfo(NCSFileViewFileInfoEx &Info); /** * Get the next UUID box with the specified UUID from the file. * @param uuid UUID of UUID box to find. * @param pLast Last UUID box found, else NULL for first * @return CNCSJP2Box* Pointer to box if found, else NULL; */ virtual CNCSJP2Box *GetUUIDBox(NCSUUID uuid, CNCSJP2Box *pLast = NULL); /** * Get the next XML box from the file. * @param pLast Last XML box found, else NULL for first * @return CNCSJP2Box* Pointer to box if found, else NULL; */ virtual CNCSJP2Box *GetXMLBox(CNCSJP2Box *pLast = NULL); /** * Get the next box of the specified type from the file. * @param nTBox Box type to find * @param pLast Last box found, else NULL for first * @return CNCSJP2Box* Pointer to box if found, else NULL; */ virtual CNCSJP2Box *GetBox(UINT32 nTBox, CNCSJP2Box *pLast = NULL); /** * Add a box to be written to the file on compression. * The specified box's UnParse() method will be called to write the box into the file * @param pBox Box to be written to file * @return CNCSError returned error or NCS_SUCCESS; */ virtual CNCSError AddBox(CNCSJP2Box *pBox); /** * Get a GDT (ER Mapper) Projection/Datum pair for the given EPSG code, if available * @param nEPSGCode EPSG Code to find projection/datum for * @param ppProjection Returned GDT Projection name - free with NCSFree() * @param ppDatum Returned GDT Datum name - free with NCSFree() * @return CNCSError Error code; */ static CNCSError GetGDTProjDat(UINT32 nEPSGCode, char **ppProjection, char **ppDatum); /** * Get an EPSG code from the given GDT (ER Mapper) Projection/Datum pair if available * @param pProjection GDT Projection name * @param pDatum GDT Datum name * @param nEPSGCode Returned EPSG Code or 0 on error * @return CNCSError Error code; */ static CNCSError GetEPSGCode(char *pProjection, char *pDatum, UINT32 &nEPSGCode); /** * Set refresh callback funnction * @param pCallback Refresh callback function to use * @return CNCSError Error code; */ CNCSError SetRefreshCallback(NCSEcwReadStatus (*pCallback)(NCSFileView*)); /** * Set Compress Client - Internal func for "C" API support only * @param pCompressClient ECW Compress Client struct * @return CNCSError Error code; */ CNCSError SetCompressClient(struct NCSEcwCompressClient *pCompressClient); /** * Get underlying CNCSJP2File pointer. * @return CNCSJP2File* Return pointer to the CNCSJP2File instance. */ class CNCSJP2File *GetFile(); #ifdef NCSJPC_ECW_SUPPORT /** * Get underlying NCSFileView pointer, where it exists. * @return NCSFileView* Return pointer to the NCSFileView instance. */ NCSFileView *GetNCSFileView(); #endif /** * Get a pointer to the underlying CNCSJPCIOStream. * This can be used to read specific JP2 UUID/XML boxes etc. * @return CNCSJPCIOStream* Return pointer to the CNCSJPCIOStream, else NULL. */ CNCSJPCIOStream *GetStream(); /** * Find the CNCSJP2FileVIew instance pointer for a given NCSFileView structure * @param pNCSFileView NCSFileView to find * @return CNCSJP2FileView* CNCSJP2FileView instance if found, else NULL */ static CNCSJP2FileView *FindJP2FileView(NCSFileView *pNCSFileView); /** * Get a statistic of NCSTimeStampMs type * @param eType Statistic to find * @param Val Statistic value */ void GetStatistic(Statistic eType, NCSTimeStampMs &Val); /** * Get a statistic of UINT64 type * @param eType Statistic to find * @param Val Statistic value */ void GetStatistic(Statistic eType, UINT64 &Val); /** * Reset the specified statistic to the default value * @param eType Statistic to reset */ void ResetStatistic(Statistic eType); /** * Reset all statistics to their default values */ void ResetStatistics(); /** * Set a parameter on the view. These over-ride default settings, such as compression output profile, * progression order, tiling etc * @param eType Parameter type to set. */ void SetParameter(Parameter eType); /** * Set a parameter on the view. These over-ride default settings, such as compression output profile, * progression order, tiling etc * @param eType Parameter type to set. * @param bBool Boolean parameter true/false */ void SetParameter(Parameter eType, bool bBool); /** * Set a parameter on the view. These over-ride default settings, such as compression output profile, * progression order, tiling etc * @param eType Parameter type to set. * @param nValue UINT32 parameter value to set */ void SetParameter(Parameter eType, UINT32 nValue); /** * Set a parameter on the view. These over-ride default settings, such as compression output profile, * progression order, tiling etc * @param eType Parameter type to set. * @param fValue IEEE4 parameter value to set */ void SetParameter(Parameter eType, IEEE4 fValue); /** * Get the percent complete (from time of setview == 0%) * @return INT32 Returned Percent complete */ INT32 GetPercentComplete(); /** * Get the percent complete as a percentage of total blocks in the current view. * @return INT32 Returned Percent complete */ INT32 GetPercentCompleteTotalBlocksInView(); /** * Internal shutdown function. */ static void Shutdown(); /** * Call this function to enable unlimited compression. * NOTE: Verify you are in compliance with the appropriate license agreements. * Calling this function signifies you accept the terms of the appropriate license. */ static void SetKeySize(void); protected: /** Timestamp representing lat time a blocking read was called */ NCSTimeStampMs m_tsLastBlockTime; /** Next line in view to read */ UINT32 m_nNextLine; friend class CNCSJPCResample; /** Add a dynamically allocated node to the dynamic node list so it is released */ void AddDynamicNode(class CNCSJPCNode *pNode) { m_DynamicNodes.push_back(pNode); }; protected: friend CNCSJP2FileViewVector; /** Display update is progressive for this view */ bool m_bIsProgressive; /** SetView is valid */ bool m_bHaveValidSetView; /** Set view mode is world? */ bool m_bSetViewModeIsWorld; /** File is open */ bool m_bIsOpen; /** File is open */ bool m_bIsWrite; /** CNCSJP2File */ CNCSJP2File *m_pFile; /** ECW SetViewInfo Structure */ NCSFileViewSetInfo m_CurrentView; /** Do we have a pending setview */ bool m_bPendingView; /** Progressive pending View */ NCSFileViewSetInfo m_PendingView; /** JP2 Compression Output node */ class CNCSJPCNode *m_pOutputNode; private: class NCSJPC_EXPORT_ALL ParameterValuePair { public: Parameter m_eParam; void *m_pValue; ParameterValuePair(); ParameterValuePair(const ParameterValuePair &Src); ParameterValuePair(Parameter eParam); ParameterValuePair(Parameter eParam, bool bValue); ParameterValuePair(Parameter eParam, UINT32 nValue); ParameterValuePair(Parameter eParam, IEEE4 fValue); virtual ~ParameterValuePair(); }; UINT32 m_nBlocksAtLastRefreshUpdate; bool m_bInRefreshUpdate; bool m_bCancelRead; bool m_bLowMemCompress; std::vector m_Parameters; void SetFileParameters(); /** List of other JP2 box(es) to be included in the output file */ CNCSJP2Box::CNCSJP2BoxList m_OtherBoxes; /** Used when SetView is >4000 in either dimension - too large to cache */ bool m_bTiledView; std::vector m_TiledViews; CNCSError SetTiledView(NCSFileViewSetInfo &View, UINT32 nReadLine); /** Static list of file views */ static CNCSJP2FileViewVector sm_Views; /** Dynamic Nodes to free */ CNCSJPCNodeVector m_DynamicNodes; // The following private members are here to support the "C" API only. // Progressive read callback for ECW decompression NCSEcwReadStatus (*m_pRefreshCallback)(NCSFileView *pNCSFileView); // ECW Compress Client for "C" compression API struct NCSEcwCompressClient *m_pCompressClient; NCSTimeStampMs m_tsCompressStart; NCSTimeStampMs m_tsCompressEnd; // JP2 compression progressive buffer queue std::vector m_CompressReadQueue; CNCSJPCEvent m_CompressReadEvent; std::vector m_CompressFreeQueue; CNCSJPCEvent m_CompressFreeEvent; CNCSMutex m_CompressQueueMutex; CNCSError m_CompressError; bool m_bCompressMTRead; #ifdef NCSJPC_ECW_SUPPORT // ECW File reading NCSFileView *m_pECWFileView; static NCSEcwReadStatus sRefreshCallback(NCSFileView *pNCSFileView); // ECW File writing struct EcwCompressionTask *m_pECWCompressionTask; static void sECWCompressThreadReadFunc(void *pData); static NCSError sECWCompressRead(void *pClient, UINT32 nNextLine, IEEE4 **ppInputArray); static void sECWCompressStatus(void *pClient, UINT32 nCurrentLine); static BOOLEAN sECWCompressCancel(void *pClient); #endif // NCSJPC_ECW_SUPPORT /** JP2 resampler */ CNCSJPCResample *m_pResampler; /** Scanline input buffer */ CNCSJPCBuffer m_InputBuf; /** Update the public file & view members */ bool UpdateFileViewInfo(void); /** Delete all dynamic nodes */ void DeleteDynamicNodes(void); void UpdateViewStats(); /** Thread Work func for JP2 progressive compression */ void Work(void *pDate); }; #endif // !NCSJP2FILEVIEW_H