MCPcopy Create free account
hub / github.com/Anttwo/SuGaR / ImageView

Method ImageView

gaussian_splatting/SIBR_viewers/src/core/view/ImageView.cpp:20–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18namespace sibr {
19
20 ImageView::ImageView(bool interactiveMode)
21 {
22 _display.init("Display", sibr::loadFile(
23 sibr::getShadersDirectory("core") + "/image_viewer.vert"),
24 sibr::loadFile(sibr::getShadersDirectory("core") + "/image_viewer.frag"));
25
26 _minVal.init(_display, "minVal");
27 _maxVal.init(_display, "maxVal");
28 _channels.init(_display, "channels");
29 _size.init(_display, "size");
30 _pos.init(_display, "pos");
31 _scale.init(_display, "scale");
32 _correctRatio.init(_display, "correctRatio");
33
34 _minVal = { 0.0f, 0.0f, 0.0f, 0.0f };
35 _maxVal = {1.0f, 1.0f, 1.0f, 1.0f};
36 _showChannels[0] = _showChannels[1] = _showChannels[2] = _showChannels[3] = true;
37 _bgColor = {0.25f, 0.25f, 0.25f};
38 _pos = {0.0f, 0.0f};
39 _scale = 1.0f;
40 // When in "fixed" mode, don't respect the aspect ratio, to make sure that the full image is visible to the viewer.
41 _correctRatio = interactiveMode;
42 _showGUI = interactiveMode;
43 _allowInteraction = interactiveMode;
44 }
45
46 void ImageView::onUpdate(Input& input, const Viewport & vp) {
47 if(!_allowInteraction) {

Callers

nothing calls this directly

Calls 2

loadFileFunction · 0.50
initMethod · 0.45

Tested by

no test coverage detected