svn-gvsig-desktop / trunk / libraries / libjni-mrsid / include / base / lti_imageFilter.h @ 3539
History | View | Annotate | Download (3.5 KB)
1 |
/* $Id: lti_imageFilter.h 3539 2006-01-09 12:23:20Z nacho $ */
|
---|---|
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_IMAGEFILTER_H
|
14 |
#define LTI_IMAGEFILTER_H
|
15 |
|
16 |
// lt_lib_mrsid_core
|
17 |
#include "lti_imageStage.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 |
* abstract class for implementing an image transform
|
28 |
*
|
29 |
* The LTIImageFilter abstract class extends the LTIImageStage so that it can
|
30 |
* be used as an intermediate stage in an image pipeline. This is the base
|
31 |
* class for such classes as the colorspace transformer, image cropper, etc.
|
32 |
*/
|
33 |
class LTIImageFilter : public LTIImageStage |
34 |
{ |
35 |
public:
|
36 |
/**
|
37 |
* constructor
|
38 |
*
|
39 |
* This is the constructor for a pipeline stage. The previous image stage
|
40 |
* in the pipeline is passed in to this stage.
|
41 |
*
|
42 |
* @param previousStage the previous image stage in the pipeline
|
43 |
* @param takeOwnership if true, this object will delete the parent stage
|
44 |
* when required
|
45 |
*/
|
46 |
LTIImageFilter(LTIImageStage* previousStage, bool takeOwnership);
|
47 |
|
48 |
/**
|
49 |
* destructor
|
50 |
*/
|
51 |
virtual ~LTIImageFilter(); |
52 |
|
53 |
/**
|
54 |
* initializer
|
55 |
*/
|
56 |
virtual LT_STATUS initialize(); |
57 |
|
58 |
virtual lt_uint32 getStripHeight() const;
|
59 |
virtual LT_STATUS setStripHeight(lt_uint32 stripHeight); |
60 |
|
61 |
virtual lt_int64 getPhysicalFileSize() const;
|
62 |
|
63 |
virtual lt_int64 getEncodingCost(const LTIScene& scene) const; |
64 |
|
65 |
virtual const lt_utf8* getName() const; |
66 |
|
67 |
virtual LT_STATUS projectPointAtMag(double upperLeft,
|
68 |
double mag,
|
69 |
double& newUpperLeft) const; |
70 |
|
71 |
virtual LT_STATUS projectDimAtMag(double dim,
|
72 |
double mag,
|
73 |
double& newDim) const; |
74 |
|
75 |
virtual bool isSelective() const; |
76 |
|
77 |
virtual LT_STATUS getDimsAtMag(double mag,
|
78 |
lt_uint32& width, |
79 |
lt_uint32& height) const;
|
80 |
|
81 |
virtual bool getReaderScene(const LTIScene &decodeScene, |
82 |
LTIScene &readerScene) const;
|
83 |
protected:
|
84 |
/** true iff this stage should delete the previous stage */
|
85 |
bool m_takeOwnership;
|
86 |
|
87 |
/**
|
88 |
* get previous image in pipeline
|
89 |
*
|
90 |
* Returns the previous image in the pipeline.
|
91 |
*
|
92 |
* This function is virtual so that derived classes may override it if
|
93 |
* needed. This is useful for classes like BMPImageWriter which need to
|
94 |
* silently insert their own transform stages into the pipeline.
|
95 |
*
|
96 |
* @return pointer to the previous stage (will not be NULL)
|
97 |
*/
|
98 |
virtual LTIImageStage* getPreviousStage() const;
|
99 |
|
100 |
private:
|
101 |
LTIImageStage* m_previousStage; |
102 |
|
103 |
// nope
|
104 |
LTIImageFilter(LTIImageFilter&); |
105 |
LTIImageFilter& operator=(const LTIImageFilter&);
|
106 |
}; |
107 |
|
108 |
|
109 |
LT_END_NAMESPACE(LizardTech) |
110 |
|
111 |
#if defined(LT_COMPILER_MS)
|
112 |
#pragma warning(pop)
|
113 |
#endif
|
114 |
|
115 |
#endif // LTI_IMAGEFILTER_H |