intensity_to_color_points_processor.h
Go to the documentation of this file.
1 /*
2  * Copyright 2016 The Cartographer Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef CARTOGRAPHER_IO_INTENSITY_TO_COLOR_POINTS_PROCESSOR_H_
18 #define CARTOGRAPHER_IO_INTENSITY_TO_COLOR_POINTS_PROCESSOR_H_
19 
20 #include <memory>
21 
25 
26 namespace cartographer {
27 namespace io {
28 
30  public:
31  constexpr static const char* kConfigurationFileActionName =
32  "intensity_to_color";
33 
34  // Applies ('intensity' - min ) / (max - min) * 255 and color the point grey
35  // with this value for each point that comes from the sensor with 'frame_id'.
36  // If 'frame_id' is empty, this applies to all points.
37  IntensityToColorPointsProcessor(float min_intensity, float max_intensity,
38  const string& frame_id,
39  PointsProcessor* next);
40 
41  static std::unique_ptr<IntensityToColorPointsProcessor> FromDictionary(
43 
45 
47  delete;
49  const IntensityToColorPointsProcessor&) = delete;
50 
51  void Process(std::unique_ptr<PointsBatch> batch) override;
52  FlushResult Flush() override;
53 
54  private:
55  const float min_intensity_;
56  const float max_intensity_;
57  const string frame_id_;
59 };
60 
61 } // namespace io
62 } // namespace cartographer
63 
64 #endif // CARTOGRAPHER_IO_INTENSITY_TO_COLOR_POINTS_PROCESSOR_H_
IntensityToColorPointsProcessor & operator=(const IntensityToColorPointsProcessor &)=delete
IntensityToColorPointsProcessor(float min_intensity, float max_intensity, const string &frame_id, PointsProcessor *next)
void Process(std::unique_ptr< PointsBatch > batch) override
static std::unique_ptr< IntensityToColorPointsProcessor > FromDictionary(common::LuaParameterDictionary *dictionary, PointsProcessor *next)


cartographer
Author(s):
autogenerated on Mon Jun 10 2019 12:51:38