Loading...
Searching...
No Matches
ComposerRuleValidPixel.h
Go to the documentation of this file.
1/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3 This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5 TerraLib is free software: you can redistribute it and/or modify
6 it under the terms of the GNU Lesser General Public License as published by
7 the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
9
10 TerraLib is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU Lesser General Public License for more details.
14
15 You should have received a copy of the GNU Lesser General Public License
16 along with TerraLib. See COPYING. If not, write to
17 TerraLib Team at <terralib-team@terralib.org>.
18 */
19
20#ifndef __TERRALIB_RP_INTERNAL_COMPOSER_RULE_VALID_PIXEL_H
21#define __TERRALIB_RP_INTERNAL_COMPOSER_RULE_VALID_PIXEL_H
22
23#include "ComposerRule.h"
24#include "../srs/Converter.h"
25#include "../raster/Interpolator.h"
26
27#include <memory>
28
29namespace te
30{
31 namespace rp
32 {
33 /*!
34 \class ComposerRuleValidPixel A basic composer rule capable of choosing the valid pixels (all bands with no no-data values).
35 \brief A basic composer rule capable of choosing the valid pixels (all bands with no no-data values).
36 \ingroup rp_optical
37 */
39 {
40 public:
41
43
45
46 protected:
47
48 // overload
49 void getComposedValues( const double& line, const double& col,
50 double* const composedValuesPtr ) const;
51
52 // overload
54
55 // overload
57 const te::rst::Raster& raster1,
58 const std::vector< unsigned int >& raster1Bands,
59 const te::rst::Raster& raster2,
60 const std::vector< unsigned int >& raster2Bands,
61 te::rst::Raster& raster3,
62 const std::vector< unsigned int >& raster3Bands,
63 const te::rst::Interpolator::Method& interpMethod1,
64 const te::rst::Interpolator::Method& interpMethod2,
65 const double& noDataValue,
66 const bool forceRaster1NoDataValue,
67 const bool forceRaster2NoDataValue,
68 const std::vector< double >& pixelOffsets1,
69 const std::vector< double >& pixelScales1,
70 const std::vector< double >& pixelOffsets2,
71 const std::vector< double >& pixelScales2 );
72
73 private :
74
75 std::size_t m_raster1BandsSize;
76
77 te::srs::Converter m_converter1; //<! Raster 1 converter.
78
79 te::srs::Converter m_converter2; //<! Raster 2 converter.
80
81 std::unique_ptr< te::rst::Interpolator > m_interpolator1Ptr; //<! Raster 1 interpolator.
82
83 std::unique_ptr< te::rst::Interpolator > m_interpolator2Ptr; //<! Raster 1 interpolator.
84
85 std::vector< std::complex< double > > m_noDataValues1;
86
87 std::vector< std::complex< double > > m_noDataValues2;
88
89 // variables used by getComposedValues method
92 mutable std::complex< double > m_getComposedValues_PixelValue;
99
101
103
104 void initState();
105
106 void clear();
107
108 };
109
110 } // end namespace rp
111} // end namespace te
112
113#endif
114
A basic composer rule capable of choosing the valid pixels (all bands with no no-data values).
std::unique_ptr< te::rst::Interpolator > m_interpolator1Ptr
ComposerRuleValidPixel(const ComposerRuleValidPixel &other)
std::vector< std::complex< double > > m_noDataValues1
void getComposedValues(const double &line, const double &col, double *const composedValuesPtr) const
Compose a pixel value using the current parameters.
std::unique_ptr< te::rst::Interpolator > m_interpolator2Ptr
ComposerRule * clone() const
Create a clone of this instance.
std::complex< double > m_getComposedValues_PixelValue
bool initialize(const te::rst::Raster &raster1, const std::vector< unsigned int > &raster1Bands, const te::rst::Raster &raster2, const std::vector< unsigned int > &raster2Bands, te::rst::Raster &raster3, const std::vector< unsigned int > &raster3Bands, const te::rst::Interpolator::Method &interpMethod1, const te::rst::Interpolator::Method &interpMethod2, const double &noDataValue, const bool forceRaster1NoDataValue, const bool forceRaster2NoDataValue, const std::vector< double > &pixelOffsets1, const std::vector< double > &pixelScales1, const std::vector< double > &pixelOffsets2, const std::vector< double > &pixelScales2)
Inititate the instance.
const ComposerRuleValidPixel & operator=(const ComposerRuleValidPixel &other)
std::vector< std::complex< double > > m_noDataValues2
An abstract class for raster data strucutures.
Definition: Raster.h:72
A Converter is responsible for the conversion of coordinates between different Coordinate Systems (CS...
Definition: Converter.h:54
InterpolationMethod
Allowed interpolation methods.
Definition: Enums.h:93
TerraLib.
#define TERPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:139