00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00026 #ifndef __IMAGE_HEADER_HEADER_INCLUDED__
00027 #define __IMAGE_HEADER_HEADER_INCLUDED__
00028
00029 #ifndef __IMAGE_COLOUR_SPACE_INCLUDED__
00030 #include "ColourSpace.hh"
00031 #endif
00032
00033 namespace image {
00034
00079 class CHeader
00080 {
00081 private :
00084 int m_width, m_height ;
00086
00089 double m_x_resolution, m_y_resolution ;
00091
00093 int m_channel_per_pixel ;
00094
00096 int m_bit_per_channel ;
00097
00099 CColourSpace m_colour ;
00100
00101 public :
00102 CHeader( ) ;
00103 CHeader( int width, int height, int channel_per_pixel,
00104 int bit_per_channel, CColourSpace colour,
00105 double x_resolution, double y_resolution ) ;
00106 ~CHeader( ) ;
00107
00108
00109 int Width( ) const ;
00110 int Height( ) const ;
00111 const CColourSpace ColourSpace( ) const ;
00112 int BitPerChannel( ) const ;
00113 int ChannelPerPixel( ) const ;
00114 double XResolution( ) const ;
00115 double YResolution( ) const ;
00116
00117
00118 void Assign( int width, int height, int channel_per_pixel,
00119 int bit_per_channel, CColourSpace colour,
00120 double x_resolution, double y_resolution ) ;
00121 bool Empty( ) const ;
00122 void Clear( ) ;
00123
00124
00125 double RealWidth( ) const ;
00126 double RealHeight( ) const ;
00127
00128 private :
00129 #ifdef _DEBUG
00130 bool IsValid( ) const ;
00131 #endif
00132 } ;
00133
00134 }
00135
00136 #endif