Statistics
| Revision:

root / trunk / libraries / libjni-mrsid / include / filters / lti_dynamicRangeFilter.h @ 720

History | View | Annotate | Download (2.79 KB)

1
/* $Id: lti_dynamicRangeFilter.h 720 2004-12-28 16:18:01Z igbrotru $ */
2
/* //////////////////////////////////////////////////////////////////////////
3
//                                                                         //
4
// This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue,   //
5
// Suite 200, Seattle, WA 98104.  Unauthorized use or distribution         //
6
// prohibited.  Access to and use of this code is permitted only under     //
7
// license from LizardTech, Inc.  Portions of the code are protected by    //
8
// US and foreign patents and other filings. All Rights Reserved.          //
9
//                                                                         //
10
////////////////////////////////////////////////////////////////////////// */
11
/* PUBLIC */
12

    
13
#ifndef LTI_DYNAMICRANGEFILTER_H
14
#define LTI_DYNAMICRANGEFILTER_H
15

    
16
// lt_lib_mrsid_core
17
#include "lti_imageFilter.h"
18

    
19

    
20
LT_BEGIN_NAMESPACE(LizardTech)
21

    
22
#if defined(LT_COMPILER_MS)
23
   #pragma warning(push,4)
24
#endif
25

    
26

    
27
/**
28
 * change dynamic range of image
29
 *
30
 * Adjusts the sample values to fit the given dynamic range.
31
 */
32
class LTIDynamicRangeFilter : public LTIImageFilter
33
{
34
public:
35
   /**
36
    * constructor
37
    *
38
    * Creates an image stage with the sample data adjusted according to the
39
    * given dynamic range values.
40
    *
41
    * @param  sourceImage    the base image
42
    * @param  window         the number of units or "width" of the desired range
43
    * @param  level          the midpoint of the window; this effectively defines
44
    *                        the min and max sample values
45
    * @param  takeOwnership  set to true to have the filter delete the \a sourceImage
46
    */
47
   LTIDynamicRangeFilter(LTIImageStage* sourceImage,
48
                         double window,
49
                         double level,
50
                         bool takeOwnership);
51

    
52
   /**
53
   * Constructor.
54
   *
55
   * Creates an image stage with the sample data adjusted according to the
56
   * dynamic range values inherit in the image, e.g. in the metadata.
57
   *
58
   * @param  sourceImage    the base image
59
   * @param  takeOwnership  set to true to have the filter delete the \a sourceImage
60
   */
61
   LTIDynamicRangeFilter(LTIImageStage* sourceImage,
62
                         bool takeOwnership);
63

    
64
   virtual ~LTIDynamicRangeFilter();
65
   virtual LT_STATUS initialize();
66

    
67
protected:
68
   LT_STATUS decodeBegin(const LTIScene& scene);
69
   LT_STATUS decodeEnd();
70
   LT_STATUS decodeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
71

    
72
private:
73
   typedef LTIImageFilter Super;
74

    
75
   double m_window;
76
   double m_level;
77
   const bool m_userInfo;
78
   double m_drmin;
79
   double m_drmax;
80

    
81

    
82
   // nope
83
   LTIDynamicRangeFilter(const LTIDynamicRangeFilter&);
84
   LTIDynamicRangeFilter& operator=(const LTIDynamicRangeFilter&);
85
};
86

    
87

    
88
LT_END_NAMESPACE(LizardTech)
89

    
90
#if defined(LT_COMPILER_MS)
91
        #pragma warning(pop)
92
#endif
93

    
94
#endif // LTI_DYNAMICRANGEFILTER_H