Utils.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 /*!
21  \file terralib/color/Utils.h
22 
23  \brief This file contains utility functions for custom color bar.
24 */
25 
26 #ifndef __TERRALIB_COLOR_INTERNAL_UTILS_H
27 #define __TERRALIB_COLOR_INTERNAL_UTILS_H
28 
29 // TerraLib
30 #include "Config.h"
31 #include "ColorSchemeCatalog.h"
32 #include "RGBAColor.h"
33 
34 // STL
35 #include <vector>
36 
37 namespace te
38 {
39  namespace color
40  {
41  /*!
42  \brief This file contains utility functions for color bar.
43 
44  \ingroup color
45  */
46 
47  /*!
48  \brief
49  This methods reads the JSON file for color schemes definitions.
50  \exception te::srs::Exception if the JSON file is not well formed.
51  */
52  TECOLOREXPORT te::color::ColorSchemeCatalog* loadColorBar(const std::string& jsonfile, const std::string& catalogName);
53 
54  /*! \brief This method save the custom color bar in a JSON file. */
55  TECOLOREXPORT bool saveCustomColorBar(const std::string& groupName, const std::string& schemeName, const std::vector<te::color::RGBAColor> rgbaVec);
56 
58 
59  } // end namespace color
60 } // end namespace te
61 
62 #endif // __TERRALIB_COLOR_INTERNAL_UTILS_H
63 
te::color::GetSchemeCatalog
TECOLOREXPORT te::color::ColorSchemeCatalog * GetSchemeCatalog(std::string catalogName)
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::color::loadColorBar
TECOLOREXPORT te::color::ColorSchemeCatalog * loadColorBar(const std::string &jsonfile, const std::string &catalogName)
This file contains utility functions for color bar.
te::color::ColorSchemeCatalog
A catalog for color schemes.
Definition: ColorSchemeCatalog.h:59
RGBAColor.h
A helper class for 24-bit RGBA (Red-Green-Blue-Alpha channel) color.
TECOLOREXPORT
#define TECOLOREXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:73
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
ColorSchemeCatalog.h
A catalog for color schemes groups.
te::color::saveCustomColorBar
TECOLOREXPORT bool saveCustomColorBar(const std::string &groupName, const std::string &schemeName, const std::vector< te::color::RGBAColor > rgbaVec)
This method save the custom color bar in a JSON file.