Statistics
| Revision:

svn-gvsig-desktop / trunk / libraries / libjni-mrsid / include / filters / lti_colorCompositeFilter.h @ 3539

History | View | Annotate | Download (2.89 KB)

1
/* $Id: lti_colorCompositeFilter.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_COLORCOMPOSITEFILTER_H
14
#define LTI_COLORCOMPOSITEFILTER_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
 * combine N separate bands into one image
28
 *
29
 * This class creates a single N-banded image which is a composition of N single-banded
30
 * images.  That is, an RGB image can be created from three (nominally
31
 * grayscale) images which represent the red, green, and blue bands of a
32
 * dataset.
33
 */
34
class LTIColorCompositeFilter : public LTIImageFilter
35
{
36
public:
37
   /**
38
    * constructor
39
    *
40
    * Creates an image stage which composes the bands of the input images.
41
    *
42
    * The \a sourceImages array contains the input images.  The composed image
43
    * is comprised of these images, in the given order.  A NULL element in
44
    * this array will result in samples of 0 for the corresponding band.
45
    *
46
    * @param  sourceImages    the base images; these must be single-banded images
47
    * @param  numImages       the number of input images
48
    * @param  colorSpace      the colorspace of the new image
49
    * @param  takeOwnership   set to true to have the filter delete the \a sourceImage
50
    */
51
   LTIColorCompositeFilter(LTIImageStage** sourceImages,
52
                           lt_uint16 numImages,
53
                           LTIColorSpace colorSpace,
54
                           bool takeOwnership);
55
   virtual ~LTIColorCompositeFilter();
56
   virtual LT_STATUS initialize();
57

    
58
   lt_int64 getPhysicalFileSize() const;
59

    
60
   bool isSelective() const;
61

    
62
protected:
63
   LT_STATUS decodeBegin(const LTIScene& scene);
64
   LT_STATUS decodeEnd();
65
   LT_STATUS decodeStrip(LTISceneBuffer& stripBuffer, const LTIScene& stripScene);
66

    
67
private:
68
   typedef LTIImageFilter Super;
69
   
70
   LT_STATUS updateMetadata();
71

    
72
   LTIImageStage** m_imageReaders;
73
   LTIImageStage* m_refReader;
74
   const lt_uint16 m_numImages;
75
   const LTIColorSpace m_colorSpace;
76

    
77
   // nope
78
   LTIColorCompositeFilter(const LTIColorCompositeFilter&);
79
   LTIColorCompositeFilter& operator=(const LTIColorCompositeFilter&);
80
};
81

    
82

    
83
LT_END_NAMESPACE(LizardTech)
84

    
85
#if defined(LT_COMPILER_MS)
86
        #pragma warning(pop)
87
#endif
88

    
89
#endif // LTI_COLORCOMPOSITEFILTER_H