- Main Page
- Related Pages
- Modules
- Classes
- Files

# IRaster.h

Go to the documentation of this file.

    00001 #ifndef _IRASTER_H_
    00002 #define _IRASTER_H_
    00003
    00004 //
    00005 // Copyright (C) 2004-2006  Autodesk, Inc.
    00006 //
    00007 // This library is free software; you can redistribute it and/or
    00008 // modify it under the terms of version 2.1 of the GNU Lesser
    00009 // General Public License as published by the Free Software Foundation.
    00010 //
    00011 // This library is distributed in the hope that it will be useful,
    00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
    00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00014 // Lesser General Public License for more details.
    00015 //
    00016 // You should have received a copy of the GNU Lesser General Public
    00017 // License along with this library; if not, write to the Free Software
    00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    00019 //
    00020 #ifdef _WIN32
    00021 #pragma once
    00022 #endif
    00023
    00024 #include <FdoStd.h>
    00025 #include <Fdo/Raster/RasterDataModelType.h>
    00026 #include <Fdo/Raster/RasterDataOrganization.h>
    00027 #include <Fdo/Raster/IRasterPropertyDictionary.h>
    00028 #include <Fdo/Expression/DataValue.h>
    00029 #include <Geometry/IEnvelope.h>
    00030 #include <Common/IStreamReader.h>
    00031
    00032 /// \brief
    00033 /// The FdoIRaster specifies the data type and organization
    00034 /// of raster data retrieved and stored. Using this class and the image
    00035 /// extents in width and length, the binary format of the image data returned
    00036 /// by and accepted by the FdoIoStreamReader class can be interpreted.
    00037 class FdoIRaster : public FdoIDisposable
    00038 {
    00039 public:
    00040
    00041     /// \brief
    00042     /// Returns true if the FdoIRaster represents a null value.
    00043     ///
    00044     /// \return
    00045     /// Returns true if the FdoIRaster represents a null value.
    00046     ///
    00047     FDO_API virtual bool IsNull () = 0;
    00048
    00049     /// \brief
    00050     /// Sets the FdoIRaster to a null value.
    00051     ///
    00052     /// \return
    00053     /// Returns nothing
    00054     ///
    00055     FDO_API virtual void SetNull () = 0;
    00056
    00057     /// \brief
    00058     ///  Gets the number of bands/channels contained in the raster image.
    00059     ///
    00060     /// \return
    00061     ///  Returns the numbers of bands/channels contained in the raster image.
    00062     ///
    00063     FDO_API virtual FdoInt32 GetNumberOfBands () = 0;
    00064
    00065     /// \brief
    00066     ///  Sets the number of bands/channels contained in the raster image.
    00067     ///
    00068     /// \return
    00069     ///  Returns nothing.
    00070     ///
    00071     FDO_API virtual void SetNumberOfBands (FdoInt32 value) = 0;
    00072
    00073     /// \brief
    00074     ///  Gets the currently active band/channel.
    00075     ///
    00076     /// \remarks
    00077     ///  The FdoIRaster Bounds, DataModel, ImageSize, AuxilliaryProperties and Stream
    00078     /// accessors all conform to the current band. NOTE: The return value
    00079     /// is a 1 based index whose maximum value is determined by the result from
    00080     /// GetNumberOfBands.
    00081     ///
    00082     /// \return
    00083     ///  Returns the current active band/channel.
    00084     ///
    00085     FDO_API virtual FdoInt32 GetCurrentBand () = 0;
    00086
    00087     /// \brief
    00088     ///  Sets the currently active band/channel.
    00089     ///
    00090     /// \remarks
    00091     ///  Setting the current band will mean that the Bounds, DataModel, ImageSize,
    00092     /// AuxilliaryProperties and Stream accessors of FdoIRaster
    00093     /// will all switch to the specified band. NOTE: The input parameter 'value'
    00094     /// is indexed starting from 1 to the result returned from GetNumberOfBands.
    00095     ///
    00096     /// \return
    00097     ///  Returns nothing.
    00098     ///
    00099     FDO_API virtual void SetCurrentBand (FdoInt32 value) = 0;
    00100
    00101     /// Get the minimum bounding box around the image.
    00102     /// The bounds are transformed to the active spatial context.
    00103     FDO_API virtual FdoByteArray* GetBounds () = 0;
    00104
    00105     /// Set the minimum bounding box around the image.
    00106     /// For georeferenced images, the coordinate system is specified by the
    00107     /// spatial context in force when the object is created.  The act of
    00108     /// setting this property georeferences the image.  In order to provide
    00109     /// for non-georeferenced images, this property is Nullable (doesn't
    00110     /// need to be set).
    00111     FDO_API virtual void SetBounds (FdoByteArray* bounds) = 0;
    00112
    00113     /// \brief
    00114     /// Gets the data model in use by this raster property.
    00115     ///
    00116     /// \return
    00117     /// Returns the current data model.
    00118     ///
    00119     FDO_API virtual FdoRasterDataModel* GetDataModel () = 0;
    00120
    00121     /// \brief
    00122     /// Sets the data model used by this raster property.
    00123     /// Allowed values are only those data models that are acceptable to the
    00124     /// SupportsDataModel capability.
    00125     /// This attribute specifies the colour/palette model, bits per pixel,
    00126     /// tiling and interleaving. For example, if the bits per pixel of the
    00127     /// data model is 8 and it is set to 24, a conversion would be performed
    00128     /// when image data is requested, to return 24 bit data.  If an update
    00129     /// command is executed to save this value, the raster data would be
    00130     /// transformed and saved.  The next time this image is retrieved
    00131     /// by the client the bits per pixel value would indicate 24.
    00132     ///
    00133     /// \param datamodel
    00134     /// The datamodel to be used.
    00135     ///
    00136     FDO_API virtual void SetDataModel (FdoRasterDataModel* datamodel) = 0;
    00137
    00138     /// \brief
    00139     /// Gets the size of image file in the horizontal
    00140     /// direction in pixels (number of columns).
    00141     ///
    00142     /// \return
    00143     /// Returns the horizontal image size in pixels
    00144     /// (number of columns).
    00145     ///
    00146     FDO_API virtual FdoInt32 GetImageXSize () = 0;
    00147
    00148     /// \brief
    00149     /// Sets the size of image file in the horizontal
    00150     /// direction in pixels (number of columns).
    00151     /// By setting the X and Y image size properties prior to getting
    00152     /// a reader for the data, the client application can control the
    00153     /// density of pixels fetched by the provider, which may reduce
    00154     /// the amount of data shipped by the reader and reduce processing
    00155     /// time significantly.  For example, a certain query in the
    00156     /// coordinate system of the raster object class returns a
    00157     /// FdoIRaster object with image size 12091 by 8043.  But the
    00158     /// image only needs to be displayed in an area 1167 by 776 on
    00159     /// the users monitor.
    00160     /// \note
    00161     /// The aspect ratios are the same
    00162     /// because the query is constructed based on the display area).
    00163     /// \remarks
    00164     /// By setting the image size to these lower values the FDO raster
    00165     /// subsystem may be able to use a previously subsampled image
    00166     /// where the resolution has been reduced by a factor of 4.
    00167     /// So instead of transferring 97MB, it can transfer 6MB (a reduction
    00168     /// by 4 in both dimensions reduces the amount of data by a factor of 16)
    00169     /// and subsample the image again to the desired resolution in a
    00170     /// more timely manner (less data to process means less total time),
    00171     /// with no appreciable difference in display quality to the user.
    00172     ///
    00173     /// \param size
    00174     /// The desired horizontal image size in pixels
    00175     /// (number of columns).
    00176     ///
    00177     FDO_API virtual void SetImageXSize (FdoInt32 size) = 0;
    00178
    00179     /// \brief
    00180     /// Gets the size of image file in the vertical
    00181     /// direction in pixels (number of rows).
    00182     ///
    00183     /// \return
    00184     /// Returns the vertical image size in pixels
    00185     /// (number of rows).
    00186     ///
    00187     FDO_API virtual FdoInt32 GetImageYSize () = 0;
    00188
    00189     /// \brief
    00190     /// Sets the size of image file in the vertical
    00191     /// direction in pixels (number of rows). See SetImageXSize.
    00192     ///
    00193     /// \param size
    00194     /// The desired vertical image size in pixels
    00195     /// (number of rows).
    00196     ///
    00197     FDO_API virtual void SetImageYSize (FdoInt32 size) = 0;
    00198
    00199     /// \brief
    00200     /// Get a dictionary style interface to the raster properties.
    00201     /// Through this interface the non-standard properties of a raster
    00202     /// image can be determined and their values can be retrieved and set.
    00203     /// Data values are exchanged through the FdoDataValue object to
    00204     /// accommodate various data types, boolean, integer, double, string,
    00205     /// etc.
    00206     ///
    00207     /// \return
    00208     /// The dictionary of auxilliary raster properties.
    00209     ///
    00210     FDO_API virtual FdoIRasterPropertyDictionary* GetAuxiliaryProperties () = 0;
    00211
    00212     /// \brief
    00213     ///  Gets the pixel value that represents a NULL value in the available raster stream.
    00214     ///
    00215     /// \remarks
    00216     ///  The Null Pixel Value is Data Model dependent. The value of the Null pixel
    00217     /// will change depending on which data model is set. If the client application changes
    00218     /// the Data Model using SetDataModel(FdoRasterDataModel* datamodel) a subsequent
    00219     /// call to GetNullPixelValue will need to be made in order to determine the valid Null
    00220     /// value for the current data model.
    00221     ///
    00222     /// \return
    00223     ///  Returns the FdoDataType value that can be used to identify the Null value.
    00224     ///
    00225     FDO_API virtual FdoDataValue* GetNullPixelValue () = 0;
    00226
    00227     /// \brief
    00228     /// Set the source of image data.
    00229     /// Image data is shipped using a paradigm similar to BLOB I/O.
    00230     /// When inserting or updating an object with a raster property,
    00231     /// the SetStreamReader method provides a means to set a
    00232     /// FdoIStreamReader callback.
    00233     /// On execution of an insert or update command, requests are made on
    00234     /// the reader for the image data (which is supplied by the FDO client
    00235     /// application).
    00236     /// The format of the image data expected is determined by the
    00237     /// DataModel property.  The data type, bit depth, tiling and
    00238     /// organization specify the meaning of the image data.
    00239     /// By setting the DataModel property prior to setting a
    00240     /// reader for the data, the FDO client application can control the
    00241     /// way data is understood by, the FDO raster subsystem.
    00242     ///
    00243     FDO_API virtual void SetStreamReader (FdoIStreamReader* reader) = 0;
    00244
    00245     /// \brief
    00246     /// Get the source of image data.
    00247     /// Image data is shipped using a paradigm similar to BLOB I/O.
    00248     /// When fetching a raster image the GetStreamReader() method provides
    00249     /// a FdoIStreamReader from which the client may request the image data.
    00250     /// \remarks
    00251     /// The format of the image data expected is determined by the
    00252     /// DataModel property.  The data type, bit depth, tiling and
    00253     /// organization specify the meaning of the image data.
    00254     /// By setting the DataModel property prior to getting a
    00255     /// reader for the data, the FDO client application can control the
    00256     /// way data is retrieved from the FDO raster subsystem.
    00257     /// When a tiled image is fetched, the image data will be tiled by default,
    00258     /// unless a spatial query is used that covers a portion of a tile,
    00259     /// in which case the image is converted to monolithic form prior to
    00260     /// returning to the client.  The client may force a monolithic
    00261     /// image in the former case by setting the DataModel to monolithic
    00262     /// prior to getting the stream reader.  Or conversely it can request
    00263     /// a re-tiling of the remaining sub-image by setting the DataModel
    00264     /// property to tiled (in this case the tile origin is at the new upper
    00265     /// left corner of the sub-image).
    00266     /// \note
    00267     /// Altering the DataModel may have significant performance issues.
    00268     ///
    00269     FDO_API virtual FdoIStreamReader* GetStreamReader () = 0;
    00270
    00271     /// \brief
    00272     /// Gets the Vertical Unit of Measure corresponding to the Raster Band.
    00273     /// The string value returned will be a considered lookup value that
    00274     /// will be used to identify the properties of the Unit of Measure using
    00275     /// the FDO FdoIGetMeasureUnits command.
    00276     ///
    00277     /// \return
    00278     /// Returns the Unit of Measure type of data associated to the Raster Band.
    00279     ///
    00280     FDO_API virtual FdoString* GetVerticalUnits () = 0;
    00281
    00282     /// \brief
    00283     /// Sets the Vertical Unit of Measure corresponding to the Raster Band.
    00284     ///
    00285     /// \param units
    00286     /// The Unit of Measure type for the current band.
    00287     /// The units string value corresponds to a Unit of Measure supported
    00288     /// through the FdoIGetMeasureUnits command.
    00289     FDO_API virtual void SetVerticalUnits (FdoString* units) = 0;
    00290 };
    00291
    00292 #endif // _IRASTER_H_
    00293
    00294

Please send us your comment about this page