Changes between Initial Version and Version 1 of FDORfc1


Ignore:
Timestamp:
Mar 13, 2007, 2:28:44 PM (17 years ago)
Author:
gregboone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • FDORfc1

    v1 v1  
     1= FDO RFC 1 - Support Property FdoIRaster::BitsUsedPerPixel =
     2
     3This page contains a change request (RFC) for the FDO Open Source project. 
     4More FDO RFCs can be found on the [wiki:FDORfcs RFCs] page.
     5
     6
     7== Status ==
     8 
     9||RFC Template Version||(1.0)||
     10||Submission Date||Mar 13, 2007||
     11||Last Modified||Greg Boone[[Timestamp]]||
     12||Author||Greg Boone||
     13||RFC Status||not ready for review||
     14||Implementation Status||pending||
     15||Proposed Milestone||3.3.0.0||
     16||Assigned PSC guide(s)||Greg Boone||
     17||'''Voting History'''||March 13, 2007||
     18||+1||||
     19||+0||||
     20||-0||||
     21||-1||||
     22 
     23== Overview ==
     24
     25The purpose of this RFC is to allow FDO users to determine the number of bits are used per pixel when interfacing with FDO providers that support the FdoIraster and FdoIRasterDataModel interface.
     26
     27== Motivation ==
     28
     29The FDO API FdoRasterDataModel class currently includes a property to determine the number of bits per pixel returned in an FdoIRaster data stream. The FdoIRaster data stream contains the raw raster image data.
     30
     31/// \brief[[BR]]
     32/// The FdoRasterDataModel specifies the data type and organization[[BR]]
     33/// of raster data retrieved and stored. Using this class and the image[[BR]]
     34/// extents in width and length, the binary format of the image data returned[[BR]]
     35/// by and accepted by the FdoIStreamReader class can be interpreted.[[BR]]
     36class FdoRasterDataModel: public FdoIDisposable[[BR]]
     37{[[BR]]
     38public:[[BR]]
     39
     40…[[BR]]
     41…[[BR]]
     42[[BR]]
     43    /// \brief[[BR]]
     44    /// Get the number of bits per pixel.[[BR]]
     45    /// [[BR]]
     46    /// \return[[BR]]
     47    /// Returns the number of bits for each pixel. For multi-channel[[BR]]
     48    /// data the bits per channel will be this value devided by the numer of[[BR]]
     49    /// channels. For example, RGB data has three channels, so if this[[BR]]
     50    /// method returns twelve, each channel is four bits.[[BR]]
     51    /// [[BR]]
     52    FDO_API virtual FdoInt32 GetBitsPerPixel ();[[BR]]
     53
     54    /// \brief[[BR]]
     55    /// Set the number of bits per pixel.[[BR]]
     56    /// [[BR]]
     57    /// \param bpp [[BR]]
     58    /// The number of bits per pixel desired.[[BR]]
     59    /// Values of 1, 4, 8, 16, 24, 32, 48 and 64 bits per channel may[[BR]]
     60    /// be supported. Others values (i.e. indivisible by the number of channels)[[BR]]
     61    /// are likely to raise a FdoException.[[BR]]
     62    /// [[BR]]
     63    FDO_API virtual void SetBitsPerPixel (FdoInt32 bpp);[[BR]]
     64…[[BR]]
     65…[[BR]]
     66[[BR]]
     67};[[BR]]
     68
     69However, returning only the bits per pixel is not sufficient to quickly and efficiently process the raster stream. The user should also be made aware of the bits used per pixel. In certain circumstances, the raster image does not completely use all available bits and pads the extra bits in the raster stream with NULL values. Without knowing the bits used per pixel, the client has to spend processing cycles determining how many bits are used thus affecting the performance of their applications.
     70
     71This issue was identified by IKonus, a corporate user of the FDO API.
     72
     73== Proposed Solution ==
     74
     75The FDO FdoRasterDataModel class will be extended to export the number of bits used per pixel.
     76
     77/// \brief[[BR]]
     78/// The FdoRasterDataModel specifies the data type and organization[[BR]]
     79/// of raster data retrieved and stored. Using this class and the image[[BR]]
     80/// extents in width and length, the binary format of the image data returned[[BR]]
     81/// by and accepted by the FdoIStreamReader class can be interpreted.[[BR]]
     82class FdoRasterDataModel: public FdoIDisposable[[BR]]
     83{[[BR]]
     84public:[[BR]]
     85
     86…[[BR]]
     87…[[BR]]
     88
     89    /// \brief[[BR]]
     90    /// Get the number of bits per pixel.[[BR]]
     91    /// [[BR]]
     92    /// \return[[BR]]
     93    /// Returns the number of bits for each pixel. For multi-channel[[BR]]
     94    /// data the bits per channel will be this value devided by the numer of[[BR]]
     95    /// channels. For example, RGB data has three channels, so if this[[BR]]
     96    /// method returns twelve, each channel is four bits.[[BR]]
     97    /// [[BR]]
     98    FDO_API virtual FdoInt32 GetBitsPerPixel ();[[BR]]
     99
     100    /// \brief[[BR]]
     101    /// Set the number of bits per pixel.[[BR]]
     102    /// [[BR]]
     103    /// \param bpp [[BR]]
     104    /// The number of bits per pixel desired.[[BR]]
     105    /// Values of 1, 4, 8, 16, 24, 32, 48 and 64 bits per channel may[[BR]]
     106    /// be supported. Others values (i.e. indivisible by the number of channels)[[BR]]
     107    /// are likely to raise a FdoException.[[BR]]
     108    /// [[BR]]
     109    FDO_API virtual void SetBitsPerPixel (FdoInt32 bpp);[[BR]]
     110
     111    /// \brief[[BR]]
     112    /// Get the number of bits used per pixel.[[BR]]
     113    /// [[BR]]
     114    /// \return[[BR]]
     115    /// Returns the number of bits used for each pixel. For multi-channel[[BR]]
     116    /// data the bits used per channel will be this value devided by the numer of[[BR]]
     117    /// channels. For example, RGB data has three channels, so if this[[BR]]
     118    /// method returns twelve, each channel uses four bits.[[BR]]
     119    /// [[BR]]
     120    FDO_API virtual FdoInt32 GetBitsUsedPerPixel ();[[BR]]
     121
     122    /// \brief[[BR]]
     123    /// Set the number of bits used per pixel.[[BR]]
     124    /// [[BR]]
     125    /// \param bpp [[BR]]
     126    /// The number of bits per used per pixel.[[BR]]
     127    /// [[BR]]
     128    /// \remarks[[BR]]
     129    /// This method is primarily being defined for object construction purposes[[BR]]
     130    /// within the provider and would not be called by client applications.[[BR]]
     131    FDO_API virtual void SetBitsUsedPerPixel (FdoInt32 bpp);[[BR]]
     132
     133…[[BR]]
     134…[[BR]]
     135
     136};[[BR]]
     137
     138'''''The new property will also be added to the FDO Managed API.'''''
     139
     140== Notes ==
     141
     142This API change is applicable for all raster formats. Image formats who do not explicitly advertise their bitsUserPerPixel will have this value set to the value of bitsPerPixel.
     143
     144This ECO is being written in order to better support ongoing development using the FDO Raster providers. Existing customers such as AutoCAD Map and MapGuide have implemented work-arounds to calculate the bitsUsedPerPixel manually.  While this calculation affects performance, the cost is slight. 
     145
     146== Test Plan ==
     147
     148Raster Provider unit tests should be expanded to include usage of the new GetBitsUsedPerPixel Property
     149
     150== Impact of Not Implementing this ECO ==
     151
     152If this ECO is not implemented, the clients such as Autodesk Map and IKonus will have to calculate the number of bits used manually and accept the impact on performance.
     153
     154== Funding/Resources ==
     155
     156Autodesk to provide resources / funding.
     157
     158
     159
     160
     161