rvc/raster.h

Go to the documentation of this file.
00001 /***
00002  * \file rvc/raster.h 
00003  * \brief interface for the RVC::RASTER class.
00004  *
00005  * \if NODOC
00006  * $Id: raster.h_v 1.40 2004/01/19 17:01:50 scowan Exp $
00007  *
00008  * $Log: raster.h_v $
00009  * Revision 1.40  2004/01/19 17:01:50  scowan
00010  * Added makeparm method.
00011  *
00012  * Revision 1.39  2003/12/04 23:43:52  scowan
00013  * Fixed ecw link ctor.
00014  *
00015  * Revision 1.38  2003/12/03 14:52:17  mju
00016  * Remove hasPyramids.
00017  * If skip sample when make pyramid tier then skip tier number too.
00018  *
00019  * Revision 1.37  2003/11/21 22:17:08  scowan
00020  * Support new Capabilities system.
00021  *
00022  * Revision 1.36  2003/10/31 23:01:57  scowan
00023  * SOmething.
00024  *
00025  * Revision 1.35  2003/10/30 18:27:54  scowan
00026  * Added copy raster methods.
00027  *
00028  * Revision 1.34  2003/10/23 21:25:09  scowan
00029  * Changed get pyramid list function.
00030  *
00031  * Revision 1.33  2003/10/23 16:55:49  scowan
00032  * Allow JP2 links to be pyramids.
00033  *
00034  * Revision 1.32  2003/10/22 22:22:23  scowan
00035  * Added new makeparm method.
00036  *
00037  * Revision 1.31  2003/10/20 20:57:51  scowan
00038  * Added used bits setting.
00039  *
00040  * Revision 1.30  2003/10/15 15:05:25  scowan
00041  * nc.
00042  *
00043  * Revision 1.29  2003/10/07 17:30:46  scowan
00044  * Object virtual method changes.
00045  *
00046  * Revision 1.28  2003/10/01 22:08:10  scowan
00047  * Made more items const.
00048  *
00049  * Revision 1.27  2003/09/30 16:52:06  dwilliss
00050  * Doxygen
00051  *
00052  * Revision 1.26  2003/09/25 21:20:04  dwilliss
00053  * Fixed doxygen comment
00054  *
00055  * Revision 1.25  2003/09/15 23:17:17  scowan
00056  * Support new set null value virtual method.
00057  *
00058  * Revision 1.24  2003/09/15 13:49:45  fileserver!dwilliss
00059  * Doxygen
00060  *
00061  * Revision 1.23  2003/08/28 16:49:50  scowan
00062  * added to generic link parms class.
00063  *
00064  * Revision 1.22  2003/08/28 15:59:33  scowan
00065  * Added static method for auto link tiff's.
00066  *
00067  * Revision 1.21  2003/08/27 21:26:11  scowan
00068  * Uses new rvc raster class interface and handle.
00069  *
00070  * Revision 1.20  2003/06/27 20:38:56  scowan
00071  * Added composite band reading.
00072  *
00073  * Revision 1.19  2003/05/07 22:19:55  scowan
00074  * Changed virtual method format.
00075  *
00076  * Revision 1.18  2002/09/05 21:31:17  scowan
00077  * Changed inclide file name.
00078  *
00079  * Revision 1.17  2002/04/26 22:44:45  scowan
00080  * Added more virtual methods.
00081  *
00082  * Revision 1.16  2002/04/24 22:37:30  scowan
00083  * Added more methods.
00084  *
00085  * Revision 1.15  2002/01/30 15:56:51  scowan
00086  * Added sml context creation method.
00087  *
00088  * Revision 1.14  2002/01/09 23:05:06  scowan
00089  * Added methods to get compression type from makeparms.
00090  *
00091  * Revision 1.13  2002/01/08 18:38:01  scowan
00092  * Attempted to move nested classes outside for docs, could not do it.
00093  *
00094  * Revision 1.12  2001/11/02 17:15:07  mju
00095  * Use CELLTYPE instead of DATATYPE/numbits.
00096  * Add HasNullValue() methods.
00097  *
00098  * Revision 1.11  2001/10/25 21:29:44  scowan
00099  * Nothing.
00100  *
00101  * Revision 1.10  2001/10/16 21:34:46  vdronov
00102  * added PYRAMID_UseColorMap
00103  *
00104  * Revision 1.9  2001/09/06 19:42:27  scowan
00105  * Bitwise use of pyramid flags.
00106  *
00107  * Revision 1.8  2001/09/06 19:31:51  scowan
00108  * Added pyramid wrapper methods.
00109  *
00110  * Revision 1.7  2001/06/14 16:09:41  scowan
00111  * Changed source type.
00112  *
00113  * Revision 1.6  2001/06/14 14:59:24  scowan
00114  * Added to RVC namespace.
00115  *
00116  * Revision 1.5  2001/06/13 15:46:19  scowan
00117  * Changed objtypoe enum.
00118  *
00119  * Revision 1.4  2001/05/25 21:42:49  scowan
00120  * Create only one make method.
00121  * Make link parms for link method.
00122  *
00123  * Revision 1.3  2000/12/01 14:54:05  scowan
00124  * Fixed MAC errors.
00125  *
00126  * Revision 1.2  2000/10/19 21:18:11  scowan
00127  * Checked in for vacation.
00128  *
00129  * Revision 1.1  2000/10/02 17:23:21  scowan
00130  * Initial revision
00131  *
00132  * \endif
00133 ***/
00134 
00135 //!   \class RVC::RASTER rvc/raster.h
00136 //!   \brief Manages RVC::OBJTYPE_Raster RVC objects.  
00137 //!   
00138 //!   The interface currently wraps the MfRaster functions.
00139 //!   
00140 //!   RVC Object Types that this class supports: RVC::OBJTYPE_Raster.
00141 //!
00142 //!   Default RVC Object Type for this class: RVC::OBJTYPE_Raster.
00143 //!
00144 //!   Valid parents for this class:
00145 //!      - RVC::OBJTYPE_File
00146 //!      - RVC::OBJTYPE_Folder
00147 //!      - RVC::OBJTYPE_Raster
00148 //!      - RVC::OBJTYPE_Hyperspectral
00149 //!      - RVC::OBJTYPE_RasterSet
00150 //!      - RVC::OBJTYPE_Thumbnail
00151 
00152 #ifndef INC_RVC_RASTER_H
00153 #define INC_RVC_RASTER_H
00154 
00155 #ifndef INC_RVC_IMAGE_H
00156    #include <rvc/image.h>
00157 #endif
00158 
00159 #ifndef INC_MI32_ANYRASTV_H
00160    #include <mi32/anyrastv.h>
00161 #endif
00162 
00163 #ifndef INC_MI32_SIMPLEAR_H
00164    #include <mi32/simplear.h>
00165 #endif
00166 
00167 #ifndef GENERATING_DOXYGEN_OUTPUT
00168 struct RVCRASTINFO;        // Forward declarations
00169 struct SMLCONTEXT;
00170 #endif // GENERATING_DOXYGEN_OUTPUT
00171 
00172 namespace RVC {
00173 
00174 #ifndef GENERATING_DOXYGEN_OUTPUT
00175 class RASTERHANDLE;
00176 struct RASTERLINKPARMS;
00177 struct RASTERLINKDATAGEN;
00178 #endif // GENERATING_DOXYGEN_OUTPUT
00179 
00180 class RASTER : public RVC::IMAGE {
00181    public:
00182 
00183       enum LINKTYPE {               //! Type of external objects that can be linked to
00184          LINKTYPE_NoLink = 0,       //!< Raster is internal
00185          LINKTYPE_TIFF = 2,         //!< Raster is a link to TIFF image
00186          LINKTYPE_Generic = 3,      //!< Raster is a link to a generic raster image
00187          LINKTYPE_MrSID = 4,
00188          LINKTYPE_ECW = 5,
00189          LINKTYPE_JP2 = 6,
00190          LINKTYPE_SocetSetDT = 7
00191          };
00192 
00193       enum COMPONENT {           //! Possible data conversion modes for Read(), ReadColumn() and Write()
00194          COMPONENT_Default = 0,     //!< Select default component
00195          COMPONENT_Red,             //!< Convert RGB to Red
00196          COMPONENT_Green,           //!< Convert RGB to Green
00197          COMPONENT_Blue,            //!< Convert RGB to Blue
00198          COMPONENT_Real,            //!< Convert to Real complex component
00199          COMPONENT_Imaginary,       //!< Convert to Imaginary complex component
00200          COMPONENT_Magnitude,       //!< Convert to Magnitude complex component
00201          COMPONENT_Phase,           //!< Convert to Phase complex component
00202          COMPONENT_Alpha,           //!< Convert to Alpha channel component from RGBA or ARGB
00203          COMPONENT_Cyan,            //!< Convert to Cyan from CMYK or KCMY
00204          COMPONENT_Magenta,         //!< Convert to Magenta from CMYK or KCMY
00205          COMPONENT_Yellow,          //!< Convert to Yellow from CMYK or KCMY
00206          COMPONENT_Black            //!< Convert to Black from CMYK or KCMY
00207          };
00208 
00209       enum CACHEMODE {           //! Raster cache values for SetCacheMode()
00210          CACHEMODE_Default = 0,     //!< Default cache size is 4 tiles unless compressed
00211          CACHEMODE_DiagonalRow,     //!< Sets raster cache to allocate a hypotenuse amount of tiles
00212          CACHEMODE_TileRow          //!< Default cache size if raster is compressed, caches a row of tiles
00213          };
00214 
00215       enum USAGE {               //! Raster usage values, used in Make()
00216          USAGE_Default = 0,         //!< Ordinary raster
00217          USAGE_HyspcBand,           //!< HyperSpectral Band raster
00218          USAGE_HyspcClass,          //!< HyperSpectral Class raster
00219          USAGE_HyspcAverage,        //!< HyperSpectral Average raster
00220          USAGE_Pyramid,             //!< Pyramid raster
00221          USAGE_PrinComp,            //!< Principle Components raster
00222          USAGE_NullBand             //!< Null band raster
00223          };
00224 
00225       enum COMPTYPE {            //! Raster compression types
00226          COMPTYPE_None = 0,         //!< Set no compression
00227          COMPTYPE_RLE,              //!< Uses RLE compression, valid for 1-bit rasters
00228          COMPTYPE_JPEG,             //!< Uses JPEG compression, valid for 8-bit and 24-bit rasters
00229          COMPTYPE_Huffman,          //!< Uses Huffman compression, used in Hyperspectral images
00230          COMPTYPE_DPCM,             //!< Uses DPCM compression
00231          COMPTYPE_JP2               //!< Uses JP2 compression
00232          };
00233 
00234       #ifndef GENERATING_DOXYGEN_OUTPUT
00235       //! Forward declarations
00236       class GETOBJFILTER_ISSELECTABLE;
00237       class GETOBJFILTER_ISOVERLAPPING;
00238       #endif // GENERATING_DOXYGEN_OUTPUT
00239       
00240       //! Class to implement raster scale values
00241       class IMAGESCALE {
00242          public:
00243 
00244             //! Default constructor
00245             IMAGESCALE (
00246                ) :
00247                m_LineScale(1.0),
00248                m_ColumnScale(1.0),
00249                m_DataScale(1.0),
00250                m_DataOffset(0.0)
00251                {}
00252 
00253             //! Obtain raster column scale
00254             //! @return raster column scale
00255             double GetColumnScale (
00256                ) const {return (m_ColumnScale); }
00257 
00258             //! Obtain raster data offset
00259             //! @return raster data offset
00260             double GetDataOffset (
00261                ) const {return (m_DataOffset);}
00262 
00263             //! Obtain raster data scale
00264             //! @return raster data scale
00265             double GetDataScale (
00266                ) const {return (m_DataScale);}
00267 
00268             //! Obtain raster line scale
00269             //! @return raster line scale
00270             double GetLineScale (
00271                ) const {return (m_LineScale);}
00272 
00273             //! Set raster column scale
00274             void SetColumnScale (
00275                double ColumnScale
00276                ) {
00277                m_ColumnScale = ColumnScale;
00278                if (m_ColumnScale == 0.0) m_ColumnScale = 1.0;
00279                return;
00280                }
00281 
00282             //! Set raster data offset
00283             void SetDataOffset (
00284                double DataOffset
00285                ) {m_DataOffset = DataOffset; }
00286 
00287             //! Set raster data scale
00288             void SetDataScale (
00289                double DataScale
00290                ) {
00291                m_DataScale = DataScale;
00292                if (m_DataScale == 0.0) m_DataScale = 1.0;
00293                return;
00294                }
00295 
00296             //! Set raster line scale
00297             void SetLineScale (
00298                double LineScale
00299                ) {
00300                m_LineScale = LineScale;
00301                if (m_LineScale == 0.0) m_LineScale = 1.0;
00302                return;
00303                }
00304 
00305          private:
00306             #ifndef GENERATING_DOXYGEN_OUTPUT
00307 
00308             double m_LineScale;           //!< Line scale
00309             double m_ColumnScale;         //!< Column scale
00310             double m_DataScale;           //!< Scale factor for cell value
00311             double m_DataOffset;       //!< Offset for cell value
00312             #endif // GENERATING_DOXYGEN_OUTPUT
00313          }; // End of IMAGESCALE nested class.
00314 
00315       #ifndef GENERATING_DOXYGEN_OUTPUT
00316       //! Forward declarations
00317       class LINKPARMS;     
00318       class LINKPARMS_ECW;
00319       class LINKPARMS_GENERIC;
00320       class LINKPARMS_JP2;
00321       class LINKPARMS_MRSID;
00322       class LINKPARMS_SOCETSETDT;
00323       class LINKPARMS_TIFF;
00324       #endif // GENERATING_DOXYGEN_OUTPUT
00325       
00326       //! Class to handle values needed to define the characteristics of a raster
00327       class MAKEPARMS {
00328          public:
00329 
00330             //! Constructor, initialize with critical raster creation parameters
00331             MAKEPARMS (
00332                INT32 NumLines,
00333                INT32 NumColumns,
00334                IMAGE::CELLTYPE CellType
00335                ) :
00336                m_NumLines(NumLines),
00337                m_NumColumns(NumColumns),
00338                m_CellType(CellType),
00339                m_TileLines(0), 
00340                m_TileColumns(0), 
00341                m_Usage(USAGE_Default),
00342                m_Inverted(false),
00343                m_PackOrder(PACKORDER_MostSigBit),
00344                m_CompType(COMPTYPE_None),
00345                m_CompQuality(75),
00346                m_UsedBits(0),
00347                m_IsCompressed(false),
00348                m_IsLossyCompressed(false),
00349                m_Fill(false),
00350                m_EmbeddedPyramid(false)
00351                { }
00352 
00353             //! Template constructor
00354             MAKEPARMS (
00355                const RASTER& Template,          //!< Raster template to determine NumLines, NumColumns, Usage, and scaling
00356                IMAGE::CELLTYPE CellType = CELLTYPE_Invalid  //!< Optional cell type, default uses type from template
00357                ) :
00358                m_NumLines(Template.GetNumLines()),
00359                m_NumColumns(Template.GetNumColumns()),
00360                m_CellType((CellType!=CELLTYPE_Invalid)?CellType:Template.GetCellType()),
00361                m_TileLines(Template.GetNumTileLines()),
00362                m_TileColumns(Template.GetNumTileColumns()),
00363                m_Usage(Template.GetUsage()),
00364                m_Inverted(false),
00365                m_PackOrder(PACKORDER_MostSigBit),
00366                m_CompType(COMPTYPE_None),
00367                m_CompQuality(75),
00368                m_UsedBits(Template.GetNumUsedBits()),
00369                m_IsCompressed(false),
00370                m_IsLossyCompressed(false),
00371                m_Fill(false),
00372                m_EmbeddedPyramid(false)
00373                {
00374                Template.GetImageScale(m_ImageScale);
00375                }
00376 
00377             //! Obtain image cell type.
00378             //! @return RVC::IMAGE::CELLTYPE for the raster.
00379             IMAGE::CELLTYPE GetCellType (
00380                ) const {return (m_CellType);}
00381                
00382             //! Obtain raster compression quality
00383             //! @return Compression quality for the raster.
00384             UINT16 GetCompressionQuality (
00385                ) const {return (m_CompQuality);}
00386 
00387             //! Obtain raster compression type
00388             //! @return RVC::RASTER::COMPTYPE for the raster.
00389             COMPTYPE GetCompressionType (
00390                ) const {return (m_CompType);}
00391 
00392             //! Obtain datatype based on raster creation parameters
00393             //! @return RVC::IMAGE::DATATYPE of the raster
00394             IMAGE::DATATYPE GetDataType (
00395                ) const {return (IMAGE::GetDataTypeFromCellType(m_CellType));}
00396          
00397             //! Obtain default raster tile size based on creation parameters
00398             //! @return default tile size
00399             INT32 GetDftTileSize (
00400                ) const;
00401                
00402             //! Get image scale information (RVC::RASTER::IMAGESCALE)
00403             //! @return IMAGESCALE reference
00404             const IMAGESCALE& GetImageScale (
00405                ) const {return (m_ImageScale);} 
00406 
00407             //! Get initial raster value
00408             bool GetInitialValue (
00409                ANYRASTVALUE& value
00410                ) const {
00411                value = m_InitValue;
00412                return (m_Fill);
00413                }
00414                
00415             //! Obtain number of bits in a raster cell
00416             //! @return number of raster bits
00417             UINT16 GetNumBits (
00418                ) const {return (IMAGE::GetNumBitsFromCellType(m_CellType));}
00419          
00420             //! Obtain number of columns in a raster
00421             //! @return number of raster columns
00422             INT32 GetNumColumns (
00423                ) const {return (m_NumColumns);}
00424          
00425             //! Obtain number of lines in a raster
00426             //! @return number of raster lines
00427             INT32 GetNumLines (
00428                ) const {return (m_NumLines);}
00429 
00430             //! Get the number of used bits.
00431             //! This related to JP2 compression and is dependent on the source raster value range.
00432             //! The number of used bits will be less than or equal to the number of bits in the created raster object.
00433             UINT16 GetNumUsedBits (
00434                ) const { return (m_UsedBits); }
00435                
00436             //! Obtain raster tile size based on creation parameters
00437             void GetTileSize (
00438                INT32& TileLines,       //!< Number of lines in a tile RETURNED
00439                INT32& TileColumns         //!< Number of columns in a tile RETURNED
00440                ) const;
00441 
00442             //! Obtain raster value range 
00443             void GetValueMinMax (
00444                ANYRASTVALUE& min,         //!< Minimum possible raster value
00445                ANYRASTVALUE& max       //!< Maximum possible raster value
00446                ) const;
00447 
00448             //! Is the raster compressed with a lossy compression algorithm?
00449             //! @return true if the raster is compressed with a lossy compression algorithm
00450             bool IsLossyCompressed (
00451                ) const {return (m_IsLossyCompressed);}
00452 
00453             //! Is the compression type valid for the raster cell type
00454             //! @return True if it is, false if not
00455             bool IsValidCompression (
00456                COMPTYPE CompType
00457                ) const;
00458                
00459             //! Set image cell type.
00460             void SetCellType (
00461                CELLTYPE CellType
00462                ) {m_CellType = CellType;}
00463 
00464             //! Set raster compression values
00465             void SetCompression (
00466                COMPTYPE CompType,         //!< Raster compression type
00467                UINT16 CompQuality         //!< Compression quality for lossy compression
00468                );
00469                
00470             //! Set image scale information (RVC::RASTER::IMAGESCALE)
00471             void SetImageScale (
00472                const IMAGESCALE& ImageScale
00473                ) {m_ImageScale = ImageScale; }  
00474 
00475             //! Set initial raster value
00476             void SetInitialValue (
00477                const ANYRASTVALUE& value
00478                ) {
00479                m_InitValue = value;
00480                m_Fill = true;
00481                return;
00482                }
00483 
00484             //! Set raster inversion flag
00485             void SetInverted (
00486                ) {m_Inverted = true;}
00487 
00488             //! Set number of columns in a raster
00489             void SetNumColumns (
00490                INT32 NumColumns
00491                ) {m_NumColumns = NumColumns;}
00492 
00493             //! Set number of lines in a raster
00494             void SetNumLines (
00495                INT32 NumLines
00496                ) {m_NumLines = NumLines;}
00497                
00498             //! Set the number of used bits.
00499             //! This related to JP2 compression and is dependent on the source raster value range.
00500             //! The number of used bits will be less than or equal to the number of bits in the created raster object.
00501             void SetNumUsedBits (
00502                const RASTER& SrcRastObj
00503                );
00504 
00505             //! Set the number of used bits.
00506             //! This related to JP2 compression and is dependent on the source raster value range.
00507             //! The number of used bits will be less than or equal to the number of bits in the created raster object.
00508             void SetNumUsedBits (
00509                UINT16 UsedBits
00510                ) { m_UsedBits = UsedBits; }
00511 
00512             //! Set raster pack order
00513             void SetPackOrder (
00514                PACKORDER PackOrder        //!< New raster pack order
00515                ) {m_PackOrder = PackOrder;}
00516 
00517             //! Set raster tile size, only if you know what you are doing!
00518             void SetTileSize (
00519                INT32 TileLines,
00520                INT32 TileColumns
00521                ) {
00522                m_TileLines = TileLines;
00523                m_TileColumns = TileColumns;
00524                return;
00525                }
00526 
00527             //! Set raster usage parameter, only if you know what you are doing
00528             void SetUsage (
00529                USAGE usage
00530                ) {m_Usage = usage;}
00531 
00532          private:
00533             #ifndef GENERATING_DOXYGEN_OUTPUT
00534 
00535             INT32 m_NumLines;             //!< Number of lines in raster
00536             INT32 m_NumColumns;           //!< Number of columns in raster
00537             CELLTYPE m_CellType;          //!< Image cell type
00538             PACKORDER m_PackOrder;        //!< Raster pack order
00539             USAGE m_Usage;                //!< Raster usage, see enum
00540             INT32 m_TileLines;            //!< Number of lines per tile
00541             INT32 m_TileColumns;          //!< Number of columns per tile
00542             COMPTYPE m_CompType;          //!< Compression type
00543             UINT16 m_CompQuality;         //!< Compression quality, 1-100, 0 == default
00544             UINT16 m_UsedBits;            //!< The number of used bits will be less than or equal to the number of bits in the created raster object.
00545             bool m_Inverted;              //!< Is raster inverted?
00546             bool m_IsCompressed;          //!< Is raster compressed
00547             bool m_IsLossyCompressed;     //!< Is raster lossy compressed
00548             bool m_Fill;
00549             bool m_EmbeddedPyramid;
00550             ANYRASTVALUE m_InitValue;     //!< Value to initialize raster with
00551             IMAGESCALE m_ImageScale;
00552 
00553             friend class RASTER;
00554             #endif // GENERATING_DOXYGEN_OUTPUT
00555          }; // End of MAKEPARMS nested class.
00556 
00557       
00558       //! Default constructor.
00559       RASTER (
00560          );
00561 
00562       //! Copy constructor.
00563       RASTER (
00564          const RVC::RASTER& rhs
00565          );
00566 
00567       //! Destructor
00568       virtual ~RASTER (
00569          );
00570 
00571       //! Assignment.
00572       RVC::RASTER& operator= (
00573          const RVC::RASTER& rhs
00574          );
00575 
00576       static ERRVALUE AutoLinkTIFF (
00577          RVC::OBJECT& ParentObj,
00578          const FILEPATH& LinkFile,
00579          RVC::GEOSPATIAL::MAKELINKFLAGS LinkFlags
00580          );
00581          
00582       //! Compute the next pyramid size based on the sizes passed in
00583       //! @return 'True' if the next size is valid, 'false' if not
00584       static bool ComputeNextPyramidSize (
00585          INT32& NumColumns,
00586          INT32& NumLines
00587          );
00588 
00589       //! Copy the raster into the 'DestRaster' object using the sampling rates 'ColumnSample' and 'LineSample'
00590       //! This algorithm averages the cell cluster based on the sample rate for the destination
00591       ERRVALUE CopyAverageTo (
00592          RASTER& DestRaster,
00593          INT32 ColumnSample,
00594          INT32 LineSample,
00595          SIMPLE_ARRAY<COLOR>* ColorMap = 0
00596          );
00597 
00598       //! Copy the raster into the 'DestRaster' object using the sampling rates 'ColumnSample' and 'LineSample'
00599       //! This algorithm selects a cell to copy to the destination raster based on the sample rate
00600       ERRVALUE CopySampledTo (
00601          RASTER& DestRaster,
00602          INT32 ColumnSample,
00603          INT32 LineSample
00604          );
00605 
00606       //! Create an SML context for the given raster class instance
00607       ERRVALUE CreateSMLContext (
00608          SMLCONTEXT **pcontext               //!< SML context allocated and RETURNED
00609          );
00610 
00611       //! Obtain raster cell type.
00612       //! @return RVC::IMAGE::CELLTYPE of the raster
00613       IMAGE::CELLTYPE GetCellType (
00614          ) const {return (m_MakeParms.GetCellType());}
00615 
00616       //! Obtain raster compression type
00617       //! @return RVC::RASTER::COMPTYPE for the raster.
00618       COMPTYPE GetCompressionType (
00619          ) const {return (m_MakeParms.m_CompType);}
00620 
00621       //! Obtain raster datatype based on RVC::IMAGE::DATATYPE enumeration
00622       //! @return RVC::IMAGE::DATATYPE of the raster
00623       IMAGE::DATATYPE GetDataType (
00624          ) const {return (m_MakeParms.GetDataType());}
00625       
00626       //! Obtain raster creation parameters
00627       //! @return const RVC::RASTER::MAKEPARMS
00628       const MAKEPARMS& GetMakeParms (
00629          ) const {return (m_MakeParms);}
00630 
00631       //! Obtain raster scale values (line, column, data scale and data offset)
00632       ERRVALUE GetImageScale (
00633          IMAGESCALE& scale                //!< Class to hold image scale values RETURNED
00634          ) const;
00635 
00636       //! Obtain type of external image the raster object is linked to
00637       //! @return RVC::RASTER::LINKTYPE enumeration value
00638       LINKTYPE GetLinkType (
00639          ) const {return (m_LinkType);}
00640          
00641       //! Obtain raster null value information
00642       ERRVALUE GetNullValue (
00643          NULLVALUE& NullValue             //!< Current NULLVALUE to get from raster
00644          ) const;
00645 
00646       //! Obtain number of bits in a raster cell
00647       //! @return number of bits in a raster cell
00648       UINT16 GetNumBits (
00649          ) const {return (m_MakeParms.GetNumBits());}
00650 
00651       //! Obtain number of columns in a raster tile
00652       //! @return number of columns in the raster tile
00653       INT32 GetNumTileColumns (
00654          ) const {return (m_MakeParms.m_TileColumns);}
00655 
00656       //! Obtain number of lines in a raster tile
00657       //! @return number of lines in the raster tile
00658       INT32 GetNumTileLines (
00659          ) const {return (m_MakeParms.m_TileLines);}
00660 
00661       //! Get the number of used bits.
00662       //! This related to JP2 compression and is dependent on the source raster value range.
00663       //! The number of used bits will be less than or equal to the number of bits in the created raster object.
00664       UINT16 GetNumUsedBits (
00665          ) const { return (m_MakeParms.m_UsedBits); }
00666             
00667       //! Obtain number of tiles in a raster row
00668       //! @return number of row tiles
00669       INT32 GetNumXTiles (
00670          ) const {return (m_XTiles);}
00671 
00672       //! Obtain number of tiles in a raster column
00673       //! @return number of column tiles
00674       INT32 GetNumYTiles (
00675          ) const {return (m_YTiles);}
00676 
00677       //! Obtain raster pack order
00678       //! @return Raster pack order
00679       PACKORDER GetPackOrder (
00680          ) const {return (m_MakeParms.m_PackOrder);}
00681 
00682       //! Return list of available raster pyramid sub-rasters.
00683       //!   The sample rate list will be sorted in ascending order and the array and list are aligned.
00684       ERRVALUE GetPyramidList (
00685          SIMPLE_ARRAY<INT32>& SampleList,    //!< Simple array of available sample rates RETURNED
00686          RVC::OBJITEMLIST& PyramidList       //!< List of pyramid raster ObjItem's RETURNED
00687          );
00688          
00689       //! Obtain number of bytes in a raster tile
00690       //! @return size of raster tile in bytes
00691       INT32 GetTileSizeBytes (
00692          ) const {return (m_TileSize);}
00693 
00694       //! Obtain purpose of raster image
00695       //! @return RVC::RASTER::USAGE enumeration value
00696       USAGE GetUsage (
00697          ) const {return (m_MakeParms.m_Usage);}
00698 
00699       //! Determine if null value exists for raster.
00700       bool HasNullValue (
00701          ) const;
00702          
00703       //! Is the raster compressed?
00704       //! @return true if the raster is compressed
00705       bool IsCompressed (
00706          ) const {return (m_MakeParms.m_IsCompressed);}
00707 
00708       //! Is the raster compressed with a lossy compression algorithm?
00709       //! @return true if the raster is compressed with a lossy compression algorithm
00710       bool IsLossyCompressed (
00711          ) const {return (m_MakeParms.m_IsLossyCompressed);}
00712 
00713       //! Is the raster flipped around such that the first raster line is at the bottom of the image
00714       //! @return true if the raster is inverted
00715       bool IsInverted (
00716          ) const {return (m_MakeParms.m_Inverted);}
00717 
00718       //! Create a raster object and establish a link to an external image
00719       ERRVALUE Link (
00720          const RVC::OBJECT& parent,             //!< Parent object to create raster under
00721          const RVC::OBJECTNAME& name,           //!< Name of raster object
00722          const RVC::OBJECTDESC& desc,           //!< Raster object description
00723          const LINKPARMS& LinkParms,
00724          const char* Source = 0                 //!< Source of raster creation, default is GetAppName()
00725          );
00726 
00727       //! Create a raster object
00728       ERRVALUE Make (
00729          const RVC::OBJECT& parent,             //!< Parent object to create raster under
00730          const RVC::OBJECTNAME& name,           //!< Name of raster object
00731          const RVC::OBJECTDESC& desc,           //!< Raster object description
00732          MAKEPARMS& MakeParms,                  //!< Parameters needed to create raster, cannot be changed after creation
00733          const char* Source = 0                 //!< Source of raster creation, default is GetAppName()
00734          );
00735 
00736       //! Create a raster object
00737       ERRVALUE Make (
00738          const RVC::OBJITEM& ObjItem,
00739          MAKEPARMS& MakeParms,                  //!< Parameters needed to create raster, cannot be changed after creation
00740          const char* Source = 0                 //!< Source of raster creation, default is GetAppName()
00741          );
00742 
00743       //! Create pyramid set under this raster object
00744       //! It will not write over valid pyramids unless PYRAMID_Rebuild is specified
00745       ERRVALUE MakePyramidSet (
00746          IMAGE::PYRAMID flags = IMAGE::PYRAMID_None
00747          );
00748 
00749       //! Read a line of raster cells up to a certain length
00750       ERRVALUE Read (
00751          INT32 Line,                               //!< Raster line to read
00752          INT32 StartColumn,                        //!< Raster column to start reading on
00753          void *data,                               //!< Buffer to read into
00754          INT32 Length = 1,                         //!< Number of columns to read
00755          CONVMODE Convert = CONVMODE_None,         //!< Data conversion mode
00756          COMPONENT Component = COMPONENT_Default   //!< Component extraction value
00757          ) const;
00758 
00759       //! Read a line of raster cells up to a certain length, converting to signed 8 bit
00760       ERRVALUE Read (
00761          INT32 Line,                               //!< Raster line to read
00762          INT32 StartColumn,                        //!< Raster column to start reading on
00763          INT8 *data,                               //!< Buffer to read into
00764          INT32 Length = 1,                         //!< Number of columns to read
00765          COMPONENT Component = COMPONENT_Default   //!< Component extraction value
00766          ) const { return (Read(Line, StartColumn, data, Length, CONVMODE_INT8, Component)); }
00767 
00768       //! Read a line of raster cells up to a certain length, converting to unsigned 8 bit
00769       ERRVALUE Read (
00770          INT32 Line,                         //!< Raster line to read
00771          INT32 StartColumn,                     //!< Raster column to start reading on
00772          UINT8 *data,                        //!< Buffer to read into
00773          INT32 Length = 1,                   //!< Number of columns to read
00774          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00775          ) const { return (Read(Line, StartColumn, data, Length, CONVMODE_INT8, Component)); }
00776 
00777       //! Read a line of raster cells up to a certain length, converting to signed 16 bit
00778       ERRVALUE Read (
00779          INT32 Line,                         //!< Raster line to read
00780          INT32 StartColumn,                     //!< Raster column to start reading on
00781          INT16 *data,                        //!< Buffer to read into
00782          INT32 Length = 1,                   //!< Number of columns to read
00783          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00784          ) const { return (Read(Line, StartColumn, data, Length, CONVMODE_INT16, Component)); }
00785 
00786       //! Read a line of raster cells up to a certain length, converting to unsigned 16 bit
00787       ERRVALUE Read (
00788          INT32 Line,                         //!< Raster line to read
00789          INT32 StartColumn,                     //!< Raster column to start reading on
00790          UINT16 *data,                       //!< Buffer to read into
00791          INT32 Length = 1,                   //!< Number of columns to read
00792          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00793          ) const { return (Read(Line, StartColumn, data, Length, CONVMODE_INT16, Component)); }
00794 
00795       //! Read a line of raster cells up to a certain length, converting to signed 32 bit
00796       ERRVALUE Read (
00797          INT32 Line,                         //!< Raster line to read
00798          INT32 StartColumn,                     //!< Raster column to start reading on
00799          INT32 *data,                        //!< Buffer to read into
00800          INT32 Length = 1,                   //!< Number of columns to read
00801          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00802          ) const { return (Read(Line, StartColumn, data, Length, CONVMODE_INT32, Component)); }
00803 
00804       //! Read a line of raster cells up to a certain length, converting to unsigned 32 bit
00805       ERRVALUE Read (
00806          INT32 Line,                         //!< Raster line to read
00807          INT32 StartColumn,                     //!< Raster column to start reading on
00808          UINT32 *data,                       //!< Buffer to read into
00809          INT32 Length = 1,                   //!< Number of columns to read
00810          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00811          ) const { return (Read(Line, StartColumn, data, Length, CONVMODE_INT32, Component)); }
00812 
00813       //! Read a line of raster cells up to a certain length, converting to 32 bit float
00814       ERRVALUE Read (
00815          INT32 Line,                         //!< Raster line to read
00816          INT32 StartColumn,                     //!< Raster column to start reading on
00817          float *data,                        //!< Buffer to read into
00818          INT32 Length = 1,                   //!< Number of columns to read
00819          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00820          ) const { return (Read(Line, StartColumn, data, Length, CONVMODE_Float, Component)); }
00821 
00822       //! Read a line of raster cells up to a certain length, converting to 64 bit double
00823       ERRVALUE Read (
00824          INT32 Line,                         //!< Raster line to read
00825          INT32 StartColumn,                     //!< Raster column to start reading on
00826          double *data,                       //!< Buffer to read into
00827          INT32 Length = 1,                   //!< Number of columns to read
00828          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00829          ) const { return (Read(Line, StartColumn, data, Length, CONVMODE_Double, Component)); }
00830 
00831       //! Read a column of raster cells up to a certain length
00832       ERRVALUE ReadColumn (
00833          INT32 Line,                         //!< Raster line to start reading on
00834          INT32 StartColumn,                     //!< Raster column to read
00835          void *data,                         //!< Buffer to read into
00836          INT32 Length = 1,                   //!< Number of lines to read
00837          CONVMODE Convert = CONVMODE_None,         //!< Data conversion mode
00838          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00839          ) const;
00840 
00841       //! Read a column of raster cells up to a certain length, converting to signed 8 bit
00842       ERRVALUE ReadColumn (
00843          INT32 Line,                         //!< Raster line to start reading on
00844          INT32 StartColumn,                     //!< Raster column to read
00845          INT8 *data,                         //!< Buffer to read into
00846          INT32 Length = 1,                   //!< Number of lines to read
00847          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00848          ) const { return (ReadColumn(Line, StartColumn, data, Length, CONVMODE_INT8, Component)); }
00849 
00850       //! Read a column of raster cells up to a certain length, converting to unsigned 8 bit
00851       ERRVALUE ReadColumn (
00852          INT32 Line,                         //!< Raster line to start reading on
00853          INT32 StartColumn,                     //!< Raster column to read
00854          UINT8 *data,                        //!< Buffer to read into
00855          INT32 Length = 1,                   //!< Number of lines to read
00856          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00857          ) const { return (ReadColumn(Line, StartColumn, data, Length, CONVMODE_INT8, Component)); }
00858 
00859       //! Read a column of raster cells up to a certain length, converting to signed 16 bit
00860       ERRVALUE ReadColumn (
00861          INT32 Line,                         //!< Raster line to start reading on
00862          INT32 StartColumn,                     //!< Raster column to read
00863          INT16 *data,                        //!< Buffer to read into
00864          INT32 Length = 1,                   //!< Number of lines to read
00865          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00866          ) const { return (ReadColumn(Line, StartColumn, data, Length, CONVMODE_INT16, Component)); }
00867 
00868       //! Read a column of raster cells up to a certain length, converting to unsigned 16 bit
00869       ERRVALUE ReadColumn (
00870          INT32 Line,                         //!< Raster line to start reading on
00871          INT32 StartColumn,                     //!< Raster column to read
00872          UINT16 *data,                       //!< Buffer to read into
00873          INT32 Length = 1,                   //!< Number of lines to read
00874          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00875          ) const { return (ReadColumn(Line, StartColumn, data, Length, CONVMODE_INT16, Component)); }
00876 
00877       //! Read a column of raster cells up to a certain length, converting to signed 32 bit
00878       ERRVALUE ReadColumn (
00879          INT32 Line,                         //!< Raster line to start reading on
00880          INT32 StartColumn,                     //!< Raster column to read
00881          INT32 *data,                        //!< Buffer to read into
00882          INT32 Length = 1,                   //!< Number of lines to read
00883          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00884          ) const { return (ReadColumn(Line, StartColumn, data, Length, CONVMODE_INT32, Component)); }
00885 
00886       //! Read a column of raster cells up to a certain length, converting to unsigned 32 bit
00887       ERRVALUE ReadColumn (
00888          INT32 Line,                         //!< Raster line to start reading on
00889          INT32 StartColumn,                     //!< Raster column to read
00890          UINT32 *data,                       //!< Buffer to read into
00891          INT32 Length = 1,                   //!< Number of lines to read
00892          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00893          ) const { return (ReadColumn(Line, StartColumn, data, Length, CONVMODE_INT32, Component)); }
00894 
00895       //! Read a column of raster cells up to a certain length, converting to 32 bit float
00896       ERRVALUE ReadColumn (
00897          INT32 Line,                         //!< Raster line to start reading on
00898          INT32 StartColumn,                     //!< Raster column to read
00899          float *data,                        //!< Buffer to read into
00900          INT32 Length = 1,                   //!< Number of lines to read
00901          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00902          ) const { return (ReadColumn(Line, StartColumn, data, Length, CONVMODE_Float, Component)); }
00903 
00904       //! Read a column of raster cells up to a certain length, converting to 64 bit double
00905       ERRVALUE ReadColumn (
00906          INT32 Line,                         //!< Raster line to start reading on
00907          INT32 StartColumn,                     //!< Raster column to read
00908          double *data,                       //!< Buffer to read into
00909          INT32 Length = 1,                   //!< Number of lines to read
00910          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00911          ) const { return (ReadColumn(Line, StartColumn, data, Length, CONVMODE_Double, Component)); }
00912 
00913       //! Set the raster tile cache to cache the number of tiles specified
00914       ERRVALUE SetCacheSize (
00915          INT32 NumTiles                      //!< Number of tiles to set cache
00916          );
00917 
00918       //! Set the raster tile cache to cache a number of tiles specified by the RVC::RASTER::CACHEMODE enumeration
00919       ERRVALUE SetCacheSize (
00920          CACHEMODE CacheFlags                //!< Tile row or diagonal tile cache sizes
00921          );
00922 
00923       //! Set the raster scale value parameters
00924       ERRVALUE SetImageScale (
00925          const IMAGESCALE& scale                //!< Scale values to set in raster
00926          );
00927 
00928       //! Set the raster null value parameters
00929       ERRVALUE SetNullValue (
00930          const NULLVALUE& NullValue,               //!< Null value to set in raster
00931          bool NullUsed = true                      //!< Whether null value is used or not
00932          );
00933 
00934       //! Write a line of raster cells up to a certain length
00935       ERRVALUE Write (
00936          INT32 Line,                               //!< Raster line to write
00937          INT32 StartColumn,                        //!< Raster column to start writing on
00938          void *data,                               //!< Buffer to write from
00939          INT32 Length = 1,                         //!< Number of columns to write
00940          CONVMODE Convert = CONVMODE_None,         //!< Data conversion mode
00941          COMPONENT Component = COMPONENT_Default   //!< Component extraction value
00942          );
00943 
00944       //! Write a line of raster cells up to a certain length, converting from signed 8 bit
00945       ERRVALUE Write (
00946          INT32 Line,                         //!< Raster line to write
00947          INT32 StartColumn,                     //!< Raster column to start writing on
00948          INT8 *data,                         //!< Buffer to write from
00949          INT32 Length = 1,                   //!< Number of columns to write
00950          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00951          ) { return (Write(Line, StartColumn, data, Length, CONVMODE_INT8, Component)); }
00952 
00953       //! Write a line of raster cells up to a certain length, converting from unsigned 8 bit
00954       ERRVALUE Write (
00955          INT32 Line,                         //!< Raster line to write
00956          INT32 StartColumn,                     //!< Raster column to start writing on
00957          UINT8 *data,                        //!< Buffer to write from
00958          INT32 Length = 1,                   //!< Number of columns to write
00959          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00960          ) { return (Write(Line, StartColumn, data, Length, CONVMODE_INT8, Component)); }
00961 
00962       //! Write a line of raster cells up to a certain length, converting from signed 16 bit
00963       ERRVALUE Write (
00964          INT32 Line,                         //!< Raster line to write
00965          INT32 StartColumn,                     //!< Raster column to start writing on
00966          INT16 *data,                        //!< Buffer to write from
00967          INT32 Length = 1,                   //!< Number of columns to write
00968          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00969          ) { return (Write(Line, StartColumn, data, Length, CONVMODE_INT16, Component)); }
00970 
00971       //! Write a line of raster cells up to a certain length, converting from unsigned 16 bit
00972       ERRVALUE Write (
00973          INT32 Line,                         //!< Raster line to write
00974          INT32 StartColumn,                     //!< Raster column to start writing on
00975          UINT16 *data,                       //!< Buffer to write from
00976          INT32 Length = 1,                   //!< Number of columns to write
00977          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00978          ) { return (Write(Line, StartColumn, data, Length, CONVMODE_INT16, Component)); }
00979 
00980       //! Write a line of raster cells up to a certain length, converting from signed 32 bit
00981       ERRVALUE Write (
00982          INT32 Line,                         //!< Raster line to write
00983          INT32 StartColumn,                     //!< Raster column to start writing on
00984          INT32 *data,                        //!< Buffer to write from
00985          INT32 Length = 1,                   //!< Number of columns to write
00986          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00987          ) { return (Write(Line, StartColumn, data, Length, CONVMODE_INT32, Component)); }
00988 
00989       //! Write a line of raster cells up to a certain length, converting from unsigned 32 bit
00990       ERRVALUE Write (
00991          INT32 Line,                         //!< Raster line to write
00992          INT32 StartColumn,                     //!< Raster column to start writing on
00993          UINT32 *data,                       //!< Buffer to write from
00994          INT32 Length = 1,                   //!< Number of columns to write
00995          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
00996          ) { return (Write(Line, StartColumn, data, Length, CONVMODE_INT32, Component)); }
00997 
00998       //! Write a line of raster cells up to a certain length, converting from 32 bit float
00999       ERRVALUE Write (
01000          INT32 Line,                         //!< Raster line to write
01001          INT32 StartColumn,                     //!< Raster column to start writing on
01002          float *data,                        //!< Buffer to write from
01003          INT32 Length = 1,                   //!< Number of columns to write
01004          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
01005          ) { return (Write(Line, StartColumn, data, Length, CONVMODE_Float, Component)); }
01006 
01007       //! Write a line of raster cells up to a certain length, converting from 64 bit double
01008       ERRVALUE Write (
01009          INT32 Line,                         //!< Raster line to write
01010          INT32 StartColumn,                     //!< Raster column to start writing on
01011          double *data,                       //!< Buffer to write from
01012          INT32 Length = 1,                   //!< Number of columns to write
01013          COMPONENT Component = COMPONENT_Default      //!< Component extraction value
01014          ) { return (Write(Line, StartColumn, data, Length, CONVMODE_Double, Component)); }
01015 
01016    private:
01017       #ifndef GENERATING_DOXYGEN_OUTPUT
01018 
01019       //! Implementation of RVC::OBJECT virtual methods
01020       virtual ERRVALUE v_CloseObject ();
01021       virtual RVC::OBJTYPE v_GetDftObjectType () const;
01022       virtual bool v_IsObjectOpen () const;
01023       virtual ERRVALUE v_OpenObject (OPENMODE OpenFlags, MDLGPARENT parent = 0);
01024 
01025       //! Implementation of RVC::GEOSPATIAL virtual methods
01026       virtual void v_GetExtents (DRECT3D &extents) const;
01027       virtual void v_GetScale (double& xscale, double& yscale) const;
01028       virtual double v_GetZScale () const;
01029       virtual double v_GetZOffset () const;
01030       virtual bool v_HasCapability (int Capability) const;
01031       virtual void v_SetScale (double xscale, double yscale);
01032       virtual void v_SetZOffset (double zoffset);
01033       virtual void v_SetZScale (double zscale);
01034 
01035       //! Implementation of RVC::IMAGE virtual methods
01036       virtual ERRVALUE v_GetBandParms (INT32 BandNum, BANDPARMS& BandParms) const;
01037       virtual double v_GetColumnScale () const;
01038       virtual double v_GetLineScale () const;
01039       virtual ERRVALUE v_GetNullValue (INT32 BandNum, NULLVALUE& NullValue) const;
01040       virtual INT32 v_GetNumBands () const;
01041       virtual INT32 v_GetNumColumns () const { return (m_MakeParms.GetNumColumns()); }
01042       virtual INT32 v_GetNumLines () const { return (m_MakeParms.GetNumLines()); }
01043       virtual bool v_HasNullValue (INT32 BandNum) const;
01044       virtual ERRVALUE v_ReadBand (INT32 Band, INT32 Line, INT32 StartColumn, void *data, INT32 Length, CONVMODE Convert) const;
01045       virtual ERRVALUE v_ReadColumnBand (INT32 Band, INT32 Line, INT32 StartColumn, void *data, INT32 Length, CONVMODE Convert) const;
01046       virtual ERRVALUE v_SetNullValue (INT32 BandNum, const NULLVALUE* NullValue);
01047       virtual ERRVALUE v_WriteBand (INT32 Band, INT32 Line, INT32 StartColumn, void *data, INT32 Length, CONVMODE Convert);
01048       
01049       void AssignValues (const RVCRASTINFO& rinfo);
01050       int ComputeNumPyramidLevels (PYRAMID flags);
01051 
01052       //! Open raster handle, might change later
01053       RASTERHANDLE* m_RasterHandle;
01054 
01055       //! Unchangeable values, safe from multi-threading
01056       MAKEPARMS m_MakeParms;        //!< Raster creation parameters
01057       LINKTYPE m_LinkType;       //!< Raster Link Type, see enum
01058       INT32 m_XTiles;               //!< Number of XTiles in a raster
01059       INT32 m_YTiles;               //!< Number of YTiles in a raster
01060       INT32 m_TileSize;          //!< Size of raster tile in bytes
01061 
01062       friend class MAKEPARMS;
01063       #endif // GENERATING_DOXYGEN_OUTPUT
01064    };
01065 
01066 //! Convenience filter for raster selection.
01067 //! This class provides for allowed and/or denied cell types to be specified during
01068 //! construction, as well as whether all rasters in a multiple selection are
01069 //! required to have the same dimensions.  Appropriate message IDs are set
01070 //! based on the specified cell types.
01071 class RASTER::GETOBJFILTER_ISSELECTABLE : public GETOBJFILTER {
01072    public:
01073    
01074       //! Constructor specifying allowed or denied cell types.
01075       GETOBJFILTER_ISSELECTABLE (
01076          RVC::IMAGE::CELLTYPE CellTypes,
01077          bool DenyTypes = false,
01078          bool NeedSameSize = false
01079          );
01080 
01081    private:
01082       #ifndef GENERATING_DOXYGEN_OUTPUT
01083       IMAGE::CELLTYPE m_CellTypes;
01084       bool m_NeedSameSize;
01085    
01086       virtual bool v_IsSelectable (const RVC::OBJITEM& objitem, int position = -1);
01087       virtual bool v_IsValidList (const RVC::OBJITEMLIST& objlist);
01088       #endif // GENERATING_DOXYGEN_OUTPUT
01089    };
01090 
01091 
01092 //! Convenience filter for raster selection.
01093 //! This class combines the RVC::RASTER::GETOBJFILTER_ISSELECTABLE and
01094 //! RVC::GEOSPATIAL::GETOBJFILTER_ISOVERLAPPING filters
01095 class RASTER::GETOBJFILTER_ISOVERLAPPING : public GETOBJFILTER {
01096    public:
01097    
01098       //! Constructor specifying allowed or denied cell types.
01099       GETOBJFILTER_ISOVERLAPPING (
01100          const RVC::OBJITEM& SrcObjItem,
01101          RVC::IMAGE::CELLTYPE CellTypes,
01102          bool DenyTypes = false,
01103          bool NeedSameSize = false
01104          );
01105 
01106    private:
01107       #ifndef GENERATING_DOXYGEN_OUTPUT
01108       RASTER::GETOBJFILTER_ISSELECTABLE m_IsSelectable;
01109       GEOSPATIAL::GETOBJFILTER_ISOVERLAPPING m_IsOverlapping;
01110    
01111       virtual