Open3D (C++ API)
0.17.0
cpp
open3d
visualization
gui
ImageWidget.h
Go to the documentation of this file.
1
// ----------------------------------------------------------------------------
2
// - Open3D: www.open3d.org -
3
// ----------------------------------------------------------------------------
4
// Copyright (c) 2018-2023 www.open3d.org
5
// SPDX-License-Identifier: MIT
6
// ----------------------------------------------------------------------------
7
8
#pragma once
9
10
#include "
open3d/visualization/gui/Widget.h
"
11
12
#include "
open3d/visualization/gui/UIImage.h
"
13
14
namespace
open3d
{
15
namespace
visualization {
16
namespace
gui {
17
18
class
ImageWidget
:
public
Widget
{
19
using
Super
=
Widget
;
20
21
public
:
22
ImageWidget
();
25
explicit
ImageWidget
(
const
char
* image_path);
27
explicit
ImageWidget
(std::shared_ptr<geometry::Image>
image
);
29
explicit
ImageWidget
(std::shared_ptr<t::geometry::Image>
image
);
33
explicit
ImageWidget
(
visualization::rendering::TextureHandle
texture_id,
34
float
u0 = 0.0f,
35
float
v0 = 0.0f,
36
float
u1 = 1.0f,
37
float
v1 = 1.0f);
38
ImageWidget
(std::shared_ptr<UIImage>
image
);
39
~ImageWidget
();
40
49
void
UpdateImage
(std::shared_ptr<geometry::Image>
image
);
50
void
UpdateImage
(std::shared_ptr<t::geometry::Image>
image
);
51
52
std::shared_ptr<UIImage>
GetUIImage
()
const
;
53
void
SetUIImage
(std::shared_ptr<UIImage>
image
);
54
55
Size
CalcPreferredSize
(
const
LayoutContext
&
context
,
56
const
Constraints
& constraints)
const override
;
57
58
void
Layout
(
const
LayoutContext
&
context
)
override
;
59
60
DrawResult
Draw
(
const
DrawContext
&
context
)
override
;
61
62
private
:
63
struct
Impl
;
64
std::unique_ptr<Impl> impl_;
65
};
66
67
}
// namespace gui
68
}
// namespace visualization
69
}
// namespace open3d
image
std::shared_ptr< core::Tensor > image
Definition:
FilamentRenderer.cpp:183
UIImage.h
Widget.h
context
ImGuiContext * context
Definition:
Window.cpp:76
open3d::visualization::gui::ImageWidget
Definition:
ImageWidget.h:18
open3d::visualization::gui::ImageWidget::Layout
void Layout(const LayoutContext &context) override
Definition:
ImageWidget.cpp:90
open3d::visualization::gui::ImageWidget::ImageWidget
ImageWidget()
Definition:
ImageWidget.cpp:24
open3d::visualization::gui::ImageWidget::Draw
DrawResult Draw(const DrawContext &context) override
Definition:
ImageWidget.cpp:94
open3d::visualization::gui::ImageWidget::GetUIImage
std::shared_ptr< UIImage > GetUIImage() const
Definition:
ImageWidget.cpp:68
open3d::visualization::gui::ImageWidget::UpdateImage
void UpdateImage(std::shared_ptr< geometry::Image > image)
Definition:
ImageWidget.cpp:60
open3d::visualization::gui::ImageWidget::~ImageWidget
~ImageWidget()
Definition:
ImageWidget.cpp:58
open3d::visualization::gui::ImageWidget::SetUIImage
void SetUIImage(std::shared_ptr< UIImage > image)
Definition:
ImageWidget.cpp:72
open3d::visualization::gui::ImageWidget::CalcPreferredSize
Size CalcPreferredSize(const LayoutContext &context, const Constraints &constraints) const override
Definition:
ImageWidget.cpp:76
open3d::visualization::gui::Widget
Definition:
Widget.h:49
open3d::visualization::gui::Widget::Widget
Widget()
Definition:
Widget.cpp:34
open3d::visualization::gui::Widget::DrawResult
DrawResult
Definition:
Widget.h:95
open3d
Definition:
PinholeCameraIntrinsic.cpp:16
open3d::visualization::gui::DrawContext
Definition:
Widget.h:37
open3d::visualization::gui::ImageWidget::Impl
Definition:
ImageWidget.cpp:20
open3d::visualization::gui::LayoutContext
Definition:
Widget.h:32
open3d::visualization::gui::Size
Definition:
Gui.h:22
open3d::visualization::gui::Widget::Constraints
Definition:
Widget.h:84
open3d::visualization::rendering::REHandle< EntityType::Texture >
Generated by
1.9.1