Changes between Version 5 and Version 6 of FDORfc2


Ignore:
Timestamp:
04/18/07 12:34:18 (18 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc2

    v5 v6  
     1
     2
    13= FDO RFC 2 - Support Raster Min/Max Fetching =
    24
     
    4345    /// \return
    4446    /// Returns the number of bits for each pixel. For multi-channel
    45     /// data the bits per channel will be this value devided by the numer of
     47    /// data the bits per channel will be this value divided by the number of
    4648    /// channels. For example, RGB data has three channels, so if this
    4749    /// method returns twelve, each channel is four bits.
     
    6365}}}
    6466
    65 However, returning only the bits per pixel is not sufficient to quickly and efficiently scale the raster for display in cases where dynamic contrast stretching is appropriate.  In cases where stetching is needed (for instance 16bit greyscale images or 4bit images represented as 8bit) it is often the case that the full dynamic range of the data type is not being used.  In order to scale the raster to 0-255 for display it is necessary to know what actual range of values is used.  For some data types (floating point elevations for instance) there is no obvious range implicit in the data type.
     67However, returning only the bits per pixel is not sufficient to quickly and efficiently scale the raster for display in cases where dynamic contrast stretching is appropriate.  In cases where stretching is needed (for instance 16bit grey scale images or 4bit images represented as 8bit) it is often the case that the full dynamic range of the data type is not being used.  In order to scale the raster to 0-255 for display it is necessary to know what actual range of values is used.  For some data types (floating point elevations for instance) there is no obvious range implicit in the data type.
    6668
    67 Client application can work out the range by making a first pass reading the whole dataset to scan for a min/max, and then pulling out subareas they are actually interested in and scaling those.  But this is very expensive, and discards any opportunity to use pre-existing metadata from the datasource to establish the value min/max range.
     69Client applications can work out the range by making a first pass reading the whole dataset to scan for a min/max, and then pulling out sub areas they are actually interested in and scaling those.  But this is very expensive, and discards any opportunity to use pre-existing metadata from the data source to establish the value min/max range.
    6870
    6971This issue was identified by IKonus, a corporate user of the FDO API.
     
    7173== Proposed Solution ==
    7274
    73 The FDO !FdoRasterDataModel class will be extended to export the number of bits used per pixel.
     75The FDO !FdoIRaster interface will be extended to export the min and max values supported by the raster.
    7476
    7577{{{
    7678/// \brief
    77 /// The FdoRasterDataModel specifies the data type and organization
     79/// The !FdoIRaster specifies the data type and organization
    7880/// of raster data retrieved and stored. Using this class and the image
    7981/// extents in width and length, the binary format of the image data returned
    80 /// by and accepted by the FdoIStreamReader class can be interpreted.
    81 class FdoRasterDataModel: public FdoIDisposable
     82/// by and accepted by the FdoIoStreamReader class can be interpreted.
     83class FdoIRaster : public FdoIDisposable
    8284{
     85public:
    8386...
    8487    FdoDouble         m_min;
     
    9093...
    9194    /// \brief
    92     /// Get the raster min/max.
     95    /// Get the raster band’s min/max values.
    9396    ///
    9497    /// Returns min/max raster values suitable to use for linearly scaling this
     
    99102    /// If the force parameter is true, this call may result in a substantial
    100103    /// delay while the provider scans the image to compute appropriate min/max
    101     /// values.  If force is false then the provider is expected to do only
     104    /// values. If force is false then the provider is expected to do only
    102105    /// minimal work to produce a value, or to fail. 
    103106    ///
     
    108111    /// values will scan the whole image.  If approx_ok is true then
    109112    /// computation of min/max by the provider may be accelerated by using
    110     /// overview images, or a sampling of the full image as deemed appropriate
     113    /// overview images or a sampling of the full image as deemed appropriate
    111114    /// by the provider as long as the result is likely to still be suitable
    112115    /// for scaling the image.
    113116    ///
    114     /// \param min the returned minimum
    115     /// \param max the returned maximum
    116     /// \param force true if computation should be forced even if it is expensive
    117     /// \param approx_ok true if an approximate min/max is acceptable, or false if an exact value is required
     117    /// \remarks
     118    /// The min and max values will change depending on the current band set
     119    /// through the SetCurrentBand method. By default, the current band is set
     120    /// to the first band.
     121    ///
     122    /// \param min
     123    /// Output. The returned minimum
     124    ///
     125    /// \param max
     126    /// Output. The returned maximum
     127    ///
     128    /// \param force
     129    /// Input. True if computation should be forced even if it is expensive
     130    ///
     131    /// \param approx_ok
     132    /// Input. True if an approximate min/max is acceptable,
     133    /// or false if an exact value is required
     134    ///
    118135    /// \return
    119136    /// true if min/max have been set with appropriate values, or false if not.
    120137    ///
    121     FDO_API virtual bool GetMinMax( FdoDouble &min, FdoDouble &max,
    122                                     bool force, bool approx_ok );
     138    FDO_API virtual bool GetMinMaxValues( FdoDouble &min,
     139                                          FdoDouble &max,
     140                                          bool force,
     141                                          bool approx_ok );
    123142
    124143    /// \brief
    125     /// Set the raster min/max.
     144    /// Sets the raster band’s min/max values.
    126145    ///
    127     /// \param min the minimum raster value
    128     /// \param max the maximum raster value
     146    /// \remarks
     147    /// The min and max values will change depending on the current band set
     148    /// through the SetCurrentBand method. By default, the current band is set
     149    /// to the first band.
     150    ///
     151    /// This value should not be called by client applications.
     152    ///
     153    /// \param min
     154    /// Input. The minimum raster value
     155    ///
     156    /// \param max
     157    /// Inout. The maximum raster value
    129158    ///
    130159    /// \remarks
     
    132161    /// within the provider and would not normally be called by client
    133162    /// applications.
    134     FDO_API virtual void SetMinMax( FdoDouble min, FdoDouble max );
     163    ///
     164    FDO_API virtual void SetMinMaxValues( FdoDouble min,
     165                                          FdoDouble max );
    135166...
    136167};