image_viewer.h 747 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef DEPTHGUIDE_IMAGE_VIEWER_H
  2. #define DEPTHGUIDE_IMAGE_VIEWER_H
  3. #include "object_manager.h"
  4. #include "render/render_utility.h"
  5. #include <memory>
  6. enum image_viewer_mode {
  7. VIEW_COLOR_DEPTH,
  8. VIEW_STEREO
  9. };
  10. class image_viewer {
  11. public:
  12. struct create_config {
  13. image_viewer_mode mode = VIEW_COLOR_DEPTH;
  14. bool flip_y = false;
  15. smart_cuda_stream *stream = nullptr;
  16. union {
  17. struct {
  18. obj_name_type c_name, d_name;
  19. } color_depth;
  20. } extra = {};
  21. };
  22. explicit image_viewer(create_config conf);
  23. ~image_viewer();
  24. void show();
  25. void render();
  26. private:
  27. struct impl;
  28. std::unique_ptr<impl> pimpl;
  29. };
  30. #endif //DEPTHGUIDE_IMAGE_VIEWER_H