colormap.h
Go to the documentation of this file.
1 /**************************************************************************************************
2  Software License Agreement (BSD License)
3 
4  Copyright (c) 2011-2013, LAR toolkit developers - University of Aveiro - http://lars.mec.ua.pt
5  All rights reserved.
6 
7  Redistribution and use in source and binary forms, with or without modification, are permitted
8  provided that the following conditions are met:
9 
10  *Redistributions of source code must retain the above copyright notice, this list of
11  conditions and the following disclaimer.
12  *Redistributions in binary form must reproduce the above copyright notice, this list of
13  conditions and the following disclaimer in the documentation and/or other materials provided
14  with the distribution.
15  *Neither the name of the University of Aveiro nor the names of its contributors may be used to
16  endorse or promote products derived from this software without specific prior written permission.
17 
18  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
19  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
20  FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
21  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
24  IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 ***************************************************************************************************/
33 #ifndef _colormap_H_
34 #define _colormap_H_
35 
36 //####################################################################
37 // Includes:
38 //####################################################################
39 #include <ros/ros.h>
40 #include <sensor_msgs/PointCloud2.h>
41 #include <sensor_msgs/PointCloud.h>
42 #include <visualization_msgs/Marker.h>
43 #include <tf/transform_broadcaster.h>
44 
45 #include <opencv2/core/core.hpp>
46 
47 
49 {
50  public:
51  class_colormap(std::string name, int total, float alfa, bool reverse=false);
52  ~class_colormap(void);
53 
54  std_msgs::ColorRGBA color(int i);
55  cv::Scalar cv_color(int i);
56 
57  private:
58  std::vector<std_msgs::ColorRGBA> cm;
59  int max_index;
60 
61 
62 
63  int setup_colormap(int total, float alfa, bool reverse, float* r, float* g, float* b);
64 
65  int init_colormap_jet(int total, float alfa, bool reverse);
66  int init_colormap_hsv(int total, float alfa, bool reverse);
67  int init_colormap_hot(int total, float alfa, bool reverse);
68  int init_colormap_cool(int total, float alfa, bool reverse);
69  int init_colormap_spring(int total, float alfa, bool reverse);
70  int init_colormap_summer(int total, float alfa, bool reverse);
71  int init_colormap_autumn(int total, float alfa, bool reverse);
72  int init_colormap_winter(int total, float alfa, bool reverse);
73  int init_colormap_gray(int total, float alfa, bool reverse);
74  int init_colormap_bone(int total, float alfa, bool reverse);
75  int init_colormap_copper(int total, float alfa, bool reverse);
76  int init_colormap_pink(int total, float alfa, bool reverse);
77  int init_colormap_lines(int total, float alfa, bool reverse);
78 };
79 
80 #endif
81 
~class_colormap(void)
Definition: colormap.cpp:45
int init_colormap_hsv(int total, float alfa, bool reverse)
Definition: colormap.cpp:158
int init_colormap_hot(int total, float alfa, bool reverse)
Definition: colormap.cpp:166
class_colormap(std::string name, int total, float alfa, bool reverse=false)
Definition: colormap.cpp:87
int init_colormap_bone(int total, float alfa, bool reverse)
Definition: colormap.cpp:230
int init_colormap_summer(int total, float alfa, bool reverse)
Definition: colormap.cpp:194
cv::Scalar cv_color(int i)
Definition: colormap.cpp:63
int init_colormap_copper(int total, float alfa, bool reverse)
Definition: colormap.cpp:239
int setup_colormap(int total, float alfa, bool reverse, float *r, float *g, float *b)
Definition: colormap.cpp:122
int init_colormap_jet(int total, float alfa, bool reverse)
Definition: colormap.cpp:150
int init_colormap_cool(int total, float alfa, bool reverse)
Definition: colormap.cpp:177
int init_colormap_winter(int total, float alfa, bool reverse)
Definition: colormap.cpp:212
int init_colormap_spring(int total, float alfa, bool reverse)
Definition: colormap.cpp:185
std::vector< std_msgs::ColorRGBA > cm
Definition: colormap.h:58
int init_colormap_autumn(int total, float alfa, bool reverse)
Definition: colormap.cpp:203
int init_colormap_gray(int total, float alfa, bool reverse)
Definition: colormap.cpp:221
int init_colormap_lines(int total, float alfa, bool reverse)
Definition: colormap.cpp:257
int init_colormap_pink(int total, float alfa, bool reverse)
Definition: colormap.cpp:248
std_msgs::ColorRGBA color(int i)
Definition: colormap.cpp:47


colormap
Author(s): Miguel Oliveira
autogenerated on Mon Mar 2 2015 01:31:33