svn-gvsig-desktop / tags / v1_9_Build_1223 / libraries / libjni-mrsid-macosx / include / filters / lti_viewerImageFilter.h @ 33825
History | View | Annotate | Download (3.15 KB)
1 | 9099 | mija | /* $Id$ */
|
---|---|---|---|
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 LTIVIEWERIMAGEFILTER_H
|
||
14 | #define LTIVIEWERIMAGEFILTER_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 | * performs datatype and colorspace transforms on an image to make it displayable
|
||
29 | *
|
||
30 | * This class wraps the LTIDataType, LTIColorTransformer, and
|
||
31 | * LTIDynamicRangeFilter classes in order to transform the input image into
|
||
32 | * an 8-bit datatype with colorspace greyscale or RGB, as is required by most
|
||
33 | * display engines.
|
||
34 | */
|
||
35 | class LTIViewerImageFilter : public LTIImageFilter |
||
36 | { |
||
37 | public:
|
||
38 | /**
|
||
39 | * constructor
|
||
40 | *
|
||
41 | * Transforms the input image to 8-bit samples and a colorspace of either
|
||
42 | * greyscale or RGB. This allows the image's pixels to be more easily
|
||
43 | * passed to command rendering engines.
|
||
44 | *
|
||
45 | * The class also allows for the dynamic range of the image to be adjusted
|
||
46 | * to make the image's histogram fit the datatype width. RGB pixels can
|
||
47 | * also be remapped to be in BGR format (as is required for Windows
|
||
48 | * bitmaps).
|
||
49 | *
|
||
50 | * @param sourceImage the input image
|
||
51 | * @param useDynamicRange if set, the image data will be scaled
|
||
52 | * according to the dynamic range metadata in the
|
||
53 | * image (if any)
|
||
54 | * @param useBGR if set, RGB samples will be remapped to BGR
|
||
55 | * format
|
||
56 | * @param takeOwnership set to true to have the filter delete the \a
|
||
57 | * sourceImage
|
||
58 | */
|
||
59 | LTIViewerImageFilter(LTIImageStage* sourceImage, |
||
60 | bool useDynamicRange,
|
||
61 | bool useBGR,
|
||
62 | bool takeOwnership);
|
||
63 | virtual ~LTIViewerImageFilter(); |
||
64 | virtual LT_STATUS initialize(); |
||
65 | |||
66 | protected:
|
||
67 | LT_STATUS decodeBegin(const LTIScene& scene);
|
||
68 | LT_STATUS decodeEnd(); |
||
69 | LT_STATUS decodeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
|
||
70 | |||
71 | private:
|
||
72 | typedef LTIImageFilter Super;
|
||
73 | |||
74 | LTIImageFilter* m_drTransform; |
||
75 | LTIImageFilter* m_csTransform; |
||
76 | LTIImageFilter* m_dtTransform; |
||
77 | LTIImageFilter* m_mapTransform; |
||
78 | LTIImageStage* m_lastStage; |
||
79 | |||
80 | bool m_useBGR;
|
||
81 | bool m_useDynamicRange;
|
||
82 | |||
83 | // nope
|
||
84 | LTIViewerImageFilter(const LTIViewerImageFilter&);
|
||
85 | LTIViewerImageFilter& operator=(const LTIViewerImageFilter&);
|
||
86 | }; |
||
87 | |||
88 | |||
89 | LT_END_NAMESPACE(LizardTech) |
||
90 | |||
91 | #if defined(LT_COMPILER_MS)
|
||
92 | #pragma warning(pop)
|
||
93 | #endif
|
||
94 | |||
95 | #endif // LTIVIEWERIMAGEFILTER_H |