GCC Code Coverage Report


./
File: modules/filter/image/images_substract.hpp
Date: 2025-01-21 16:21:04
Lines:
0/2
0.0%
Functions:
0/6
0.0%
Branches:
0/9
0.0%

Line Branch Exec Source
1 /************************************************************************
2 *
3 * Copyright (C) 2009-2024 IRCAD France
4 * Copyright (C) 2012-2019 IHU Strasbourg
5 *
6 * This file is part of Sight.
7 *
8 * Sight is free software: you can redistribute it and/or modify it under
9 * the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * Sight is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with Sight. If not, see <https://www.gnu.org/licenses/>.
20 *
21 ***********************************************************************/
22
23 #pragma once
24
25 #include <data/image.hpp>
26
27 #include <service/filter.hpp>
28
29 namespace sight::module::filter::image
30 {
31
32 /**
33 * @brief Compute the substraction of two images.
34
35 * @section XML XML Configuration
36 *
37 * @code{.xml}
38 <service type="sight::module::filter::image::images_substract">
39 <in key="image1" uid="..." />
40 <in key="image2" uid="..." />
41 <inout key="result" uid="..." />
42 </service>
43 @endcode
44 * @subsection In In
45 * - \b image1 [sight::data::image]: first image.
46 * - \b image2 [sight::data::image]: second image.
47 * @subsection InOut InOut
48 * - \b result [sight::data::image]: substract image.
49 */
50
51 class images_substract final : public service::filter
52 {
53 public:
54
55 SIGHT_DECLARE_SERVICE(images_substract, sight::service::filter);
56
57 images_substract();
58 ~images_substract() override = default;
59
60 protected:
61
62 void configuring() override;
63
64 /// Overrides
65 void starting() override;
66
67 /// Overrides
68 void stopping() override;
69
70 /// Overrides
71 void updating() override;
72
73 private:
74
75 sight::data::ptr<sight::data::image, sight::data::access::in> m_image1 {this, "image1"};
76 sight::data::ptr<sight::data::image, sight::data::access::in> m_image2 {this, "image2"};
77 sight::data::ptr<sight::data::image, sight::data::access::inout> m_result {this, "result"};
78 };
79
80 } // namespace sight::module::filter::image
81