FDO API Reference Feature Data Objects

RasterDataModel.h

Go to the documentation of this file.
00001 #ifndef _RASTERDATAMODEL_H_
00002 #define _RASTERDATAMODEL_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/RasterDataType.h>
00028 
00029 /// \brief
00030 /// The FdoRasterDataModel specifies the data type and organization
00031 /// of raster data retrieved and stored. Using this class and the image
00032 /// extents in width and length, the binary format of the image data returned
00033 /// by and accepted by the FdoIStreamReader class can be interpreted.
00034 class FdoRasterDataModel: public FdoIDisposable
00035 {
00036 protected:
00037     FdoRasterDataModelType m_Type;
00038     FdoInt32 m_BitsPerPixel;
00039     FdoRasterDataOrganization m_Organization;
00040     FdoInt32 m_TileX;
00041     FdoInt32 m_TileY;
00042     FdoRasterDataType m_DataType;
00043 
00044     FDO_API FdoRasterDataModel ();
00045     FDO_API virtual void Dispose ();
00046 
00047 
00048 public:
00049     /// \brief
00050     /// Creates a new datamodel.
00051     /// 
00052     /// \return
00053     /// Returns a bitonal 256x256 tiled data model.
00054     /// 
00055     FDO_API static FdoRasterDataModel* Create ();
00056 
00057     /// \brief
00058     /// Gets the type of data available from this datamodel.
00059     /// 
00060     /// \return
00061     /// Returns the type of data available with this data model.
00062     /// 
00063     FDO_API virtual FdoRasterDataModelType GetDataModelType ();
00064 
00065     /// \brief
00066     /// Sets the type of data for this datamodel.
00067     /// 
00068     /// \param type 
00069     /// The type of data for this data model.
00070     /// 
00071     FDO_API virtual void SetDataModelType (FdoRasterDataModelType type);
00072 
00073     /// \brief
00074     /// Get the number of bits per pixel.
00075     /// 
00076     /// \return
00077     /// Returns the number of bits for each pixel. For multi-channel
00078     /// data the bits per channel will be this value devided by the numer of
00079     /// channels. For example, RGB data has three channels, so if this
00080     /// method returns twelve, each channel is four bits.
00081     /// 
00082     FDO_API virtual FdoInt32 GetBitsPerPixel ();
00083 
00084     /// \brief
00085     /// Set the number of bits per pixel.
00086     /// 
00087     /// \param bpp 
00088     /// The number of bits per pixel desired.
00089     /// Values of 1, 4, 8, 16, 24, 32, 48 and 64 bits per channel may
00090     /// be supported. Others values (i.e. indivisible by the number of channels)
00091     /// are likely to raise a FdoException.
00092     /// 
00093     FDO_API virtual void SetBitsPerPixel (FdoInt32 bpp);
00094 
00095     /// \brief
00096     /// Get the data interleave organization.
00097     /// 
00098     /// \return
00099     /// Returns the way data is interleaved.
00100     /// 
00101     FDO_API virtual FdoRasterDataOrganization GetOrganization ();
00102 
00103     /// \brief
00104     /// Set the data interleave organization.
00105     /// 
00106     /// \param organization 
00107     /// Specifies the way data is to be interleaved.
00108     /// 
00109     FDO_API virtual void SetOrganization (FdoRasterDataOrganization organization);
00110 
00111     /// \brief
00112     /// Get the tile size in the horizontal direction (number of columns).
00113     /// 
00114     /// \return
00115     /// The number of columns in a tile.
00116     /// 
00117     FDO_API virtual FdoInt32 GetTileSizeX ();
00118 
00119     /// \brief
00120     /// Set the tile size in the horizontal direction (number of columns).
00121     /// 
00122     /// \param sizex 
00123     /// The number of columns in a tile.
00124     /// 
00125     FDO_API virtual void SetTileSizeX (FdoInt32 sizex);
00126 
00127     /// \brief
00128     /// Get the tile size in the vertical direction (number of rows).
00129     /// 
00130     /// \return
00131     /// The number of rows in a tile.
00132     /// 
00133     FDO_API virtual FdoInt32 GetTileSizeY ();
00134 
00135     /// \brief
00136     /// Set the tile size in the vertical direction (number of rows).
00137     /// Values of 64, 128, 256, 512, 1024 and the image extents in width and
00138     /// length may be supported. When the tile sizes are equal to the image
00139     /// extents, the image is monolithic. Rectangular tile sizes, combining
00140     /// different values for X and Y, may be supported.
00141     /// 
00142     /// \param sizey 
00143     /// The number of rows in a tile.
00144     /// 
00145     FDO_API virtual void SetTileSizeY (FdoInt32 sizey);
00146 
00147     /// \brief
00148     /// Gets the data type.
00149     /// 
00150     /// \return
00151     /// Returns the data type of the raster.
00152     /// 
00153     FDO_API virtual FdoRasterDataType GetDataType ();
00154 
00155     /// \brief
00156     /// Sets the data type.
00157     /// 
00158     /// \param value 
00159     /// Specifies the data type the raster data is to be returned in.
00160     /// 
00161     FDO_API virtual void SetDataType (FdoRasterDataType dataType);
00162 };
00163 
00164 #endif // _RASTERDATAMODEL_H_
00165 
00166 

Comments or suggestions? Send us feedback.