![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <VisualizerForAlignment.h>


Public Member Functions | |
| VisualizerForAlignment (visualization::VisualizerWithEditing &source, visualization::VisualizerWithEditing &target, double voxel_size=-1.0, double max_correspondence_distance=-1.0, bool with_scaling=true, bool use_dialog=true, const std::string &polygon_filename="", const std::string &directory="") | |
| ~VisualizerForAlignment () override | |
| void | PrintVisualizerHelp () override |
| bool | AddSourceAndTarget (std::shared_ptr< ccPointCloud > source, std::shared_ptr< ccPointCloud > target) |
Public Member Functions inherited from cloudViewer::visualization::Visualizer | |
| Visualizer () | |
| virtual | ~Visualizer () |
| Visualizer (Visualizer &&)=delete | |
| Visualizer (const Visualizer &)=delete | |
| Visualizer & | operator= (const Visualizer &)=delete |
| bool | CreateVisualizerWindow (const std::string &window_name="CloudViewer", const int width=640, const int height=480, const int left=50, const int top=50, const bool visible=true) |
| Function to create a window and initialize GLFW. More... | |
| void | DestroyVisualizerWindow () |
| Function to destroy a window. More... | |
| void | RegisterAnimationCallback (std::function< bool(Visualizer *)> callback_func) |
| Function to register a callback function for animation. More... | |
| void | Run () |
| Function to activate the window. More... | |
| void | Close () |
| Function to to notify the window to be closed. More... | |
| bool | WaitEvents () |
| Function to process the event queue and return if the window is closed. More... | |
| bool | PollEvents () |
| virtual bool | AddGeometry (std::shared_ptr< const ccHObject > geometry_ptr, bool reset_bounding_box=true) |
| Function to add geometry to the scene and create corresponding shaders. More... | |
| virtual bool | RemoveGeometry (std::shared_ptr< const ccHObject > geometry_ptr, bool reset_bounding_box=true) |
| Function to remove geometry from the scene. More... | |
| virtual bool | ClearGeometries () |
| virtual bool | UpdateGeometry (std::shared_ptr< const ccHObject > geometry_ptr=nullptr) |
| Function to update geometry. More... | |
| virtual bool | HasGeometry () const |
| virtual void | UpdateRender () |
| Function to inform render needed to be updated. More... | |
| virtual void | SetFullScreen (bool fullscreen) |
| Functions to change between fullscreen and windowed modes. More... | |
| virtual void | ToggleFullScreen () |
| virtual bool | IsFullScreen () |
| virtual void | UpdateWindowTitle () |
| virtual void | BuildUtilities () |
| ViewControl & | GetViewControl () |
| Function to retrieve the associated ViewControl. More... | |
| RenderOption & | GetRenderOption () |
| Function to retrieve the associated RenderOption. More... | |
| std::shared_ptr< geometry::Image > | CaptureScreenFloatBuffer (bool do_render=true) |
| Function to capture screen and store RGB in a float buffer. More... | |
| void | CaptureScreenImage (const std::string &filename="", bool do_render=true) |
| Function to capture and save a screen image. More... | |
| std::shared_ptr< geometry::Image > | CaptureDepthFloatBuffer (bool do_render=true) |
| void | CaptureDepthImage (const std::string &filename="", bool do_render=true, double depth_scale=1000.0) |
| void | CaptureDepthPointCloud (const std::string &filename="", bool do_render=true, bool convert_to_world_coordinate=false) |
| Function to capture and save local point cloud. More... | |
| void | CaptureRenderOption (const std::string &filename="") |
| void | ResetViewPoint (bool reset_bounding_box=false) |
| Function to reset view point. More... | |
| const std::string & | GetWindowName () const |
Protected Member Functions | |
| void | KeyPressCallback (GLFWwindow *window, int key, int scancode, int action, int mods) override |
| bool | SaveSessionToFile (const std::string &filename) |
| bool | LoadSessionFromFile (const std::string &filename) |
| bool | AlignWithManualAnnotation () |
| void | PrintTransformation () |
| void | EvaluateAlignmentAndSave (const std::string &filename) |
Protected Member Functions inherited from cloudViewer::visualization::Visualizer | |
| virtual bool | InitOpenGL () |
| Function to initialize OpenGL. More... | |
| virtual bool | InitViewControl () |
| Function to initialize ViewControl. More... | |
| virtual bool | InitRenderOption () |
| Function to initialize RenderOption. More... | |
| virtual void | Render (bool render_screen=false) |
| void | CopyViewStatusToClipboard () |
| void | CopyViewStatusFromClipboard () |
| virtual void | WindowRefreshCallback (GLFWwindow *window) |
| virtual void | WindowResizeCallback (GLFWwindow *window, int w, int h) |
| virtual void | MouseMoveCallback (GLFWwindow *window, double x, double y) |
| virtual void | MouseScrollCallback (GLFWwindow *window, double x, double y) |
| virtual void | MouseButtonCallback (GLFWwindow *window, int button, int action, int mods) |
| virtual void | WindowCloseCallback (GLFWwindow *window) |
| Function to notify the window to be closed. More... | |
Protected Attributes | |
| visualization::VisualizerWithEditing & | source_visualizer_ |
| visualization::VisualizerWithEditing & | target_visualizer_ |
| double | voxel_size_ = -1.0 |
| double | max_correspondence_distance_ = -1.0 |
| bool | with_scaling_ = true |
| bool | use_dialog_ = true |
| Eigen::Matrix4d | transformation_ = Eigen::Matrix4d::Identity() |
| std::string | polygon_filename_ = "" |
| std::shared_ptr< ccPointCloud > | source_copy_ptr_ |
| std::shared_ptr< ccPointCloud > | target_copy_ptr_ |
| AlignmentSession | alignment_session_ |
| std::string | default_directory_ |
Protected Attributes inherited from cloudViewer::visualization::Visualizer | |
| GLFWwindow * | window_ = nullptr |
| std::string | window_name_ = "CloudViewer" |
| std::shared_ptr< GLFWContext > | glfw_context_ = nullptr |
| Shared GLFW context. More... | |
| Eigen::Vector2i | saved_window_size_ = Eigen::Vector2i::Zero() |
| Eigen::Vector2i | saved_window_pos_ = Eigen::Vector2i::Zero() |
| std::function< bool(Visualizer *)> | animation_callback_func_ = nullptr |
| std::function< bool(Visualizer *)> | animation_callback_func_in_loop_ |
| MouseControl | mouse_control_ |
| bool | is_redraw_required_ = true |
| bool | is_initialized_ = false |
| GLuint | vao_id_ = 0 |
| GLuint | render_fbo_ = 0 |
| GLuint | render_rgb_tex_ = 0 |
| GLuint | render_depth_stencil_rbo_ = 0 |
| std::unique_ptr< ViewControl > | view_control_ptr_ |
| std::unique_ptr< RenderOption > | render_option_ptr_ |
| std::unordered_set< std::shared_ptr< const ccHObject > > | geometry_ptrs_ |
| std::unordered_set< std::shared_ptr< glsl::GeometryRenderer > > | geometry_renderer_ptrs_ |
| std::vector< std::shared_ptr< const ccHObject > > | utility_ptrs_ |
| std::vector< std::shared_ptr< glsl::GeometryRenderer > > | utility_renderer_ptrs_ |
| std::unordered_map< std::shared_ptr< glsl::GeometryRenderer >, RenderOption > | utility_renderer_opts_ |
| std::shared_ptr< ccMesh > | coordinate_frame_mesh_ptr_ |
| std::shared_ptr< glsl::CoordinateFrameRenderer > | coordinate_frame_mesh_renderer_ptr_ |
Definition at line 27 of file VisualizerForAlignment.h.
|
inline |
Definition at line 29 of file VisualizerForAlignment.h.
|
inlineoverride |
Definition at line 45 of file VisualizerForAlignment.h.
| bool cloudViewer::VisualizerForAlignment::AddSourceAndTarget | ( | std::shared_ptr< ccPointCloud > | source, |
| std::shared_ptr< ccPointCloud > | target | ||
| ) |
Definition at line 31 of file VisualizerForAlignment.cpp.
References cloudViewer::visualization::Visualizer::AddGeometry(), alignment_session_, cloudViewer::visualization::Visualizer::GetRenderOption(), cloudViewer::visualization::RenderOption::point_size_, source_copy_ptr_, cloudViewer::AlignmentSession::source_ptr_, target_copy_ptr_, and cloudViewer::AlignmentSession::target_ptr_.
Referenced by main().
|
protected |
Definition at line 267 of file VisualizerForAlignment.cpp.
References alignment_session_, cloudViewer::pipelines::registration::TransformationEstimationPointToPoint::ComputeRMSE(), cloudViewer::pipelines::registration::TransformationEstimationPointToPoint::ComputeTransformation(), cloudViewer::visualization::VisualizerWithEditing::GetPickedPoints(), LogInfo, LogWarning, PrintTransformation(), source_copy_ptr_, cloudViewer::AlignmentSession::source_ptr_, source_visualizer_, cloudViewer::AlignmentSession::target_ptr_, target_visualizer_, transformation_, and with_scaling_.
Referenced by KeyPressCallback().
|
protected |
Definition at line 315 of file VisualizerForAlignment.cpp.
References filename, cloudViewer::utility::filesystem::FOpen(), cloudViewer::utility::filesystem::GetFileNameWithoutExtension(), LogError, source_copy_ptr_, target_copy_ptr_, and cloudViewer::io::WritePointCloud().
Referenced by KeyPressCallback().
|
overrideprotectedvirtual |
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 44 of file VisualizerForAlignment.cpp.
References alignment_session_, AlignWithManualAnnotation(), default_directory_, EvaluateAlignmentAndSave(), cloudViewer::utility::filesystem::FileExists(), filename, format, cloudViewer::visualization::Visualizer::KeyPressCallback(), LoadSessionFromFile(), LogError, LogInfo, LogWarning, max_correspondence_distance_, polygon_filename_, PrintTransformation(), cloudViewer::io::ReadIJsonConvertible(), cloudViewer::pipelines::registration::RegistrationICP(), cloudViewer::visualization::Visualizer::ResetViewPoint(), result, SaveSessionToFile(), source_copy_ptr_, cloudViewer::AlignmentSession::source_ptr_, target_copy_ptr_, cloudViewer::AlignmentSession::target_ptr_, transformation_, cloudViewer::visualization::Visualizer::UpdateGeometry(), use_dialog_, and voxel_size_.
|
protected |
Definition at line 248 of file VisualizerForAlignment.cpp.
References alignment_session_, filename, cloudViewer::visualization::VisualizerWithEditing::GetPickedPoints(), cloudViewer::AlignmentSession::max_correspondence_distance_, max_correspondence_distance_, cloudViewer::io::ReadIJsonConvertible(), cloudViewer::visualization::Visualizer::ResetViewPoint(), source_copy_ptr_, cloudViewer::AlignmentSession::source_indices_, cloudViewer::AlignmentSession::source_ptr_, source_visualizer_, cloudViewer::AlignmentSession::target_indices_, target_visualizer_, cloudViewer::AlignmentSession::transformation_, transformation_, cloudViewer::visualization::Visualizer::UpdateGeometry(), cloudViewer::visualization::Visualizer::UpdateRender(), cloudViewer::AlignmentSession::voxel_size_, voxel_size_, cloudViewer::AlignmentSession::with_scaling_, and with_scaling_.
Referenced by KeyPressCallback().
|
protected |
Definition at line 299 of file VisualizerForAlignment.cpp.
References LogInfo, and transformation_.
Referenced by AlignWithManualAnnotation(), and KeyPressCallback().
|
overridevirtual |
Reimplemented from cloudViewer::visualization::Visualizer.
Definition at line 16 of file VisualizerForAlignment.cpp.
References LogInfo, and cloudViewer::visualization::Visualizer::PrintVisualizerHelp().
|
protected |
Definition at line 237 of file VisualizerForAlignment.cpp.
References alignment_session_, filename, cloudViewer::visualization::VisualizerWithEditing::GetPickedPoints(), cloudViewer::AlignmentSession::max_correspondence_distance_, max_correspondence_distance_, cloudViewer::AlignmentSession::source_indices_, source_visualizer_, cloudViewer::AlignmentSession::target_indices_, target_visualizer_, cloudViewer::AlignmentSession::transformation_, transformation_, cloudViewer::AlignmentSession::voxel_size_, voxel_size_, cloudViewer::AlignmentSession::with_scaling_, with_scaling_, and cloudViewer::io::WriteIJsonConvertible().
Referenced by KeyPressCallback().
|
protected |
Definition at line 75 of file VisualizerForAlignment.h.
Referenced by AddSourceAndTarget(), AlignWithManualAnnotation(), KeyPressCallback(), LoadSessionFromFile(), and SaveSessionToFile().
|
protected |
Definition at line 76 of file VisualizerForAlignment.h.
Referenced by KeyPressCallback().
|
protected |
Definition at line 68 of file VisualizerForAlignment.h.
Referenced by KeyPressCallback(), LoadSessionFromFile(), and SaveSessionToFile().
|
protected |
Definition at line 72 of file VisualizerForAlignment.h.
Referenced by KeyPressCallback().
|
protected |
Definition at line 73 of file VisualizerForAlignment.h.
Referenced by AddSourceAndTarget(), AlignWithManualAnnotation(), EvaluateAlignmentAndSave(), KeyPressCallback(), and LoadSessionFromFile().
|
protected |
Definition at line 65 of file VisualizerForAlignment.h.
Referenced by AlignWithManualAnnotation(), LoadSessionFromFile(), and SaveSessionToFile().
|
protected |
Definition at line 74 of file VisualizerForAlignment.h.
Referenced by AddSourceAndTarget(), EvaluateAlignmentAndSave(), and KeyPressCallback().
|
protected |
Definition at line 66 of file VisualizerForAlignment.h.
Referenced by AlignWithManualAnnotation(), LoadSessionFromFile(), and SaveSessionToFile().
|
protected |
Definition at line 71 of file VisualizerForAlignment.h.
Referenced by AlignWithManualAnnotation(), KeyPressCallback(), LoadSessionFromFile(), PrintTransformation(), and SaveSessionToFile().
|
protected |
Definition at line 70 of file VisualizerForAlignment.h.
Referenced by KeyPressCallback().
|
protected |
Definition at line 67 of file VisualizerForAlignment.h.
Referenced by KeyPressCallback(), LoadSessionFromFile(), and SaveSessionToFile().
|
protected |
Definition at line 69 of file VisualizerForAlignment.h.
Referenced by AlignWithManualAnnotation(), LoadSessionFromFile(), and SaveSessionToFile().