HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IMG_FileFilterGainOffset.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: IMG_FileFilterGainOffset ( IMG Library, C++)
7  *
8  * COMMENTS:
9  *
10  * Apply gain and offset to image in that order.
11  */
12 #ifndef IMG_FILE_FILTER_GAIN_OFFSET_H
13 #define IMG_FILE_FILTER_GAIN_OFFSET_H
14 
15 #include <SYS/SYS_Types.h>
16 #include <UT/UT_BitArray.h>
17 #include <UT/UT_ValArray.h>
18 #include <PXL/PXL_Fill.h>
19 
20 #include "IMG_FileFilter.h"
21 
22 class PXL_Raster;
23 class PXL_Lookup;
24 
26 {
27 public:
28  IMG_FileFilterGainOffset(IMG_File *file_to_filter);
29  ~IMG_FileFilterGainOffset() override;
30 
31  const char *className() const override
32  { return "IMG_FileFilterGainOffset"; }
33 
34  void init(fpreal gain, fpreal offset);
35 
36  const void *readPlaneScanline(int y, const IMG_Plane &pi) override;
37 
38  int writePlaneScanline(const void *data, int y,
39  const IMG_Plane &pi) override;
40 
41 private:
42  void applyGainOffset(void *dest, const void *sdata,
43  const IMG_Plane &pi);
44 
45  fpreal myGain;
46  fpreal myOffset;
47 };
48 
49 
50 #endif
virtual int writePlaneScanline(const void *data, int y, const IMG_Plane &pi)
Describes the format and layout of a single plane in an image The plane specifies the format and name...
Definition: IMG_Plane.h:45
#define IMG_API
Definition: IMG_API.h:10
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1252
GLint GLenum GLsizei GLint GLsizei const void * data
Definition: glew.h:1379
Generic interface for reading and writing image files. This class handles the reading and writing of ...
Definition: IMG_File.h:55
const char * className() const override
fpreal64 fpreal
Definition: SYS_Types.h:277
constexpr T pi()
Pi constant taken from Boost to match old behaviour.
Definition: Math.h:108
virtual const void * readPlaneScanline(int y, const IMG_Plane &pi)
GLintptr offset
Definition: glew.h:1682