Classes | Public Slots | Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
CloudEditorWidget Class Reference

class declaration for the widget for editing and viewing point clouds. More...

#include <cloudEditorWidget.h>

List of all members.

Classes

struct  ExtCompare

Public Slots

void cancelSelect ()
 Cancels the current selection.
void colorByPure ()
 Colors the unselected points using an single color.
void colorByRGB ()
 Colors the unselected points by its native color.
void colorByX ()
 Colors the unselected points with a color ramp based on the X values of the points.
void colorByY ()
 Colors the unselected points with a color ramp based on the Y values of the points.
void colorByZ ()
 Colors the unselected points with a color ramp based on the Z values of the points.
void copy ()
 Copies the selected points.
void cut ()
 Copies and then removes the selected points.
void decreasePointSize ()
 Decreases the size of the unselected points.
void decreaseSelectedPointSize ()
 Decreases the size of the selected points.
void denoise ()
 Denoises the current cloud.
void increasePointSize ()
 Increases the size of the unselected points.
void increaseSelectedPointSize ()
 Increases the size of the selected points.
void invertSelect ()
 Inverts the current selection.
void load ()
 Loads a new cloud.
void paste ()
 Pastes the copied points to the cloud.
void remove ()
 Removes the selected points.
void save ()
 Saves a cloud to a .pcd file. The current format is ASCII.
void select1D ()
 Enters click selection mode.
void select2D ()
 Enters 2D selection mode.
void select3D ()
 Enters 3D selection mode.
void setPointSize (int size)
 Sets the size of the unselected points.
void setSelectedPointSize (int size)
 Sets the size of the selected points.
void showStat ()
 Turn on the dialog box showing the statistics of the cloud.
void toggleBlendMode ()
 Toggles the blend mode used to render the non-selected points.
void transform ()
 Enters the mode where users are able to translate the selecte points.
void undo ()
 Undoes last change.
void view ()
 Switches to the view mode.

Public Member Functions

 CloudEditorWidget (QWidget *parent=0)
 Constructor.
void loadFile (const std::string &filename)
 Attempts to load the point cloud designated by the passed file name.
 ~CloudEditorWidget ()
 Destructor.

Protected Member Functions

void initializeGL ()
 initializes GL
void keyPressEvent (QKeyEvent *event)
 key press control
void mouseMoveEvent (QMouseEvent *event)
 mouse move control
void mousePressEvent (QMouseEvent *event)
 mouse press control
void mouseReleaseEvent (QMouseEvent *event)
 mouse release control
void paintGL ()
 the rendering function.
void resizeGL (int width, int height)
 resizes widget

Private Types

typedef boost::function< void(CloudEditorWidget
*, const std::string &) 
FileLoadFunc )
typedef std::map< std::string,
FileLoadFunc, ExtCompare
FileLoadMap
typedef boost::function< void(CloudEditorWidget *) KeyMapFunc )

Private Member Functions

void initFileLoadMap ()
 Adds all of our file loader functions to the extension map.
void initKeyMap ()
 initializes the map between key press events and the corresponding functors.
void initTexture ()
 Initialize the texture used for rendering the cloud.
bool isColored (const std::string &fileName) const
 Returns true if the cloud stored in a file is colored.
void loadFilePCD (const std::string &filename)
 Attempts to load a pcd file.
void swapRBValues ()
 swap the values of r and b in each point of the cloud.

Private Attributes

double cam_aspect_
 The camera aspect ratio.
double cam_far_
 The camera far clipping plane.
double cam_fov_
 The camera field of view.
double cam_near_
 The camera near clipping plane.
FileLoadMap cloud_load_func_map_
 a map of file type extensions to loader functions.
CloudPtr cloud_ptr_
 a pointer to the cloud being edited.
ColorScheme color_scheme_
 The current scheme used for coloring the whole cloud.
CommandQueuePtr command_queue_ptr_
 a pointer to the command queue object
CopyBufferPtr copy_buffer_ptr_
 a pointer to the copy buffer object.
bool is_colored_
 A flag indicates whether the cloud is initially colored or not.
std::map< int, KeyMapFunckey_map_
 map between pressed key and the corresponding functor
unsigned int point_size_
 The display size, in pixels, of the cloud points.
unsigned int selected_point_size_
 The display size, in pixels, of the selected cloud points.
SelectionPtr selection_ptr_
 a pointer to the selection object
StatisticsDialog stat_dialog_
 a dialog displaying the statistics of the cloud editor
boost::shared_ptr< ToolInterfacetool_ptr_

Detailed Description

class declaration for the widget for editing and viewing point clouds.

Definition at line 55 of file cloudEditorWidget.h.


Member Typedef Documentation

typedef boost::function<void (CloudEditorWidget*, const std::string&) CloudEditorWidget::FileLoadFunc) [private]

Definition at line 258 of file cloudEditorWidget.h.

Definition at line 259 of file cloudEditorWidget.h.

typedef boost::function<void (CloudEditorWidget*) CloudEditorWidget::KeyMapFunc) [private]

Definition at line 307 of file cloudEditorWidget.h.


Constructor & Destructor Documentation

CloudEditorWidget::CloudEditorWidget ( QWidget *  parent = 0)

Constructor.

Parameters:
parenta pointer which points to the parent widget

Definition at line 65 of file cloudEditorWidget.cpp.

Destructor.

Definition at line 78 of file cloudEditorWidget.cpp.


Member Function Documentation

Cancels the current selection.

Definition at line 225 of file cloudEditorWidget.cpp.

Colors the unselected points using an single color.

Definition at line 408 of file cloudEditorWidget.cpp.

Colors the unselected points by its native color.

Definition at line 383 of file cloudEditorWidget.cpp.

void CloudEditorWidget::colorByX ( ) [slot]

Colors the unselected points with a color ramp based on the X values of the points.

Definition at line 390 of file cloudEditorWidget.cpp.

void CloudEditorWidget::colorByY ( ) [slot]

Colors the unselected points with a color ramp based on the Y values of the points.

Definition at line 396 of file cloudEditorWidget.cpp.

void CloudEditorWidget::colorByZ ( ) [slot]

Colors the unselected points with a color ramp based on the Z values of the points.

Definition at line 402 of file cloudEditorWidget.cpp.

void CloudEditorWidget::copy ( ) [slot]

Copies the selected points.

Definition at line 234 of file cloudEditorWidget.cpp.

void CloudEditorWidget::cut ( ) [slot]

Copies and then removes the selected points.

Definition at line 272 of file cloudEditorWidget.cpp.

Decreases the size of the unselected points.

Definition at line 328 of file cloudEditorWidget.cpp.

Decreases the size of the selected points.

Definition at line 351 of file cloudEditorWidget.cpp.

void CloudEditorWidget::denoise ( ) [slot]

Denoises the current cloud.

Definition at line 295 of file cloudEditorWidget.cpp.

Increases the size of the unselected points.

Definition at line 317 of file cloudEditorWidget.cpp.

Increases the size of the selected points.

Definition at line 339 of file cloudEditorWidget.cpp.

Adds all of our file loader functions to the extension map.

Definition at line 550 of file cloudEditorWidget.cpp.

void CloudEditorWidget::initializeGL ( ) [protected]

initializes GL

Definition at line 422 of file cloudEditorWidget.cpp.

void CloudEditorWidget::initKeyMap ( ) [private]

initializes the map between key press events and the corresponding functors.

Definition at line 587 of file cloudEditorWidget.cpp.

void CloudEditorWidget::initTexture ( ) [private]

Initialize the texture used for rendering the cloud.

Definition at line 616 of file cloudEditorWidget.cpp.

Inverts the current selection.

Definition at line 215 of file cloudEditorWidget.cpp.

bool CloudEditorWidget::isColored ( const std::string fileName) const [private]

Returns true if the cloud stored in a file is colored.

Parameters:
fileNamea reference to a string storing the path of a cloud

Definition at line 557 of file cloudEditorWidget.cpp.

void CloudEditorWidget::keyPressEvent ( QKeyEvent *  event) [protected]

key press control

Definition at line 506 of file cloudEditorWidget.cpp.

void CloudEditorWidget::load ( ) [slot]

Loads a new cloud.

Definition at line 94 of file cloudEditorWidget.cpp.

void CloudEditorWidget::loadFile ( const std::string filename)

Attempts to load the point cloud designated by the passed file name.

Parameters:
filenameThe name of the point cloud file to be loaded.
Remarks:
throws if the passed file can not be loaded.

Definition at line 83 of file cloudEditorWidget.cpp.

void CloudEditorWidget::loadFilePCD ( const std::string filename) [private]

Attempts to load a pcd file.

Parameters:
filenameThe name of the pcd file to be loaded.
Remarks:
throws if the passed file can not be loaded.

Definition at line 518 of file cloudEditorWidget.cpp.

void CloudEditorWidget::mouseMoveEvent ( QMouseEvent *  event) [protected]

mouse move control

Definition at line 486 of file cloudEditorWidget.cpp.

void CloudEditorWidget::mousePressEvent ( QMouseEvent *  event) [protected]

mouse press control

Definition at line 476 of file cloudEditorWidget.cpp.

void CloudEditorWidget::mouseReleaseEvent ( QMouseEvent *  event) [protected]

mouse release control

Definition at line 496 of file cloudEditorWidget.cpp.

void CloudEditorWidget::paintGL ( ) [protected]

the rendering function.

Definition at line 438 of file cloudEditorWidget.cpp.

void CloudEditorWidget::paste ( ) [slot]

Pastes the copied points to the cloud.

Definition at line 246 of file cloudEditorWidget.cpp.

void CloudEditorWidget::remove ( ) [slot]

Removes the selected points.

Definition at line 259 of file cloudEditorWidget.cpp.

void CloudEditorWidget::resizeGL ( int  width,
int  height 
) [protected]

resizes widget

Definition at line 464 of file cloudEditorWidget.cpp.

void CloudEditorWidget::save ( ) [slot]

Saves a cloud to a .pcd file. The current format is ASCII.

Definition at line 115 of file cloudEditorWidget.cpp.

void CloudEditorWidget::select1D ( ) [slot]

Enters click selection mode.

Definition at line 185 of file cloudEditorWidget.cpp.

void CloudEditorWidget::select2D ( ) [slot]

Enters 2D selection mode.

Definition at line 195 of file cloudEditorWidget.cpp.

void CloudEditorWidget::select3D ( ) [slot]

Enters 3D selection mode.

Definition at line 205 of file cloudEditorWidget.cpp.

void CloudEditorWidget::setPointSize ( int  size) [slot]

Sets the size of the unselected points.

Definition at line 363 of file cloudEditorWidget.cpp.

void CloudEditorWidget::setSelectedPointSize ( int  size) [slot]

Sets the size of the selected points.

Definition at line 373 of file cloudEditorWidget.cpp.

void CloudEditorWidget::showStat ( ) [slot]

Turn on the dialog box showing the statistics of the cloud.

Definition at line 414 of file cloudEditorWidget.cpp.

void CloudEditorWidget::swapRBValues ( ) [private]

swap the values of r and b in each point of the cloud.

Definition at line 574 of file cloudEditorWidget.cpp.

Toggles the blend mode used to render the non-selected points.

Definition at line 162 of file cloudEditorWidget.cpp.

Enters the mode where users are able to translate the selecte points.

Definition at line 285 of file cloudEditorWidget.cpp.

void CloudEditorWidget::undo ( ) [slot]

Undoes last change.

Definition at line 308 of file cloudEditorWidget.cpp.

void CloudEditorWidget::view ( ) [slot]

Switches to the view mode.

Definition at line 176 of file cloudEditorWidget.cpp.


Member Data Documentation

The camera aspect ratio.

Definition at line 289 of file cloudEditorWidget.h.

double CloudEditorWidget::cam_far_ [private]

The camera far clipping plane.

Definition at line 295 of file cloudEditorWidget.h.

double CloudEditorWidget::cam_fov_ [private]

The camera field of view.

Definition at line 286 of file cloudEditorWidget.h.

double CloudEditorWidget::cam_near_ [private]

The camera near clipping plane.

Definition at line 292 of file cloudEditorWidget.h.

a map of file type extensions to loader functions.

Definition at line 261 of file cloudEditorWidget.h.

a pointer to the cloud being edited.

Definition at line 264 of file cloudEditorWidget.h.

The current scheme used for coloring the whole cloud.

Definition at line 302 of file cloudEditorWidget.h.

a pointer to the command queue object

Definition at line 283 of file cloudEditorWidget.h.

a pointer to the copy buffer object.

Definition at line 280 of file cloudEditorWidget.h.

A flag indicates whether the cloud is initially colored or not.

Definition at line 305 of file cloudEditorWidget.h.

std::map<int, KeyMapFunc> CloudEditorWidget::key_map_ [private]

map between pressed key and the corresponding functor

Definition at line 309 of file cloudEditorWidget.h.

unsigned int CloudEditorWidget::point_size_ [private]

The display size, in pixels, of the cloud points.

Definition at line 267 of file cloudEditorWidget.h.

The display size, in pixels, of the selected cloud points.

Definition at line 270 of file cloudEditorWidget.h.

a pointer to the selection object

Definition at line 277 of file cloudEditorWidget.h.

a dialog displaying the statistics of the cloud editor

Definition at line 312 of file cloudEditorWidget.h.

boost::shared_ptr<ToolInterface> CloudEditorWidget::tool_ptr_ [private]

The transformation tool being used. Either a cloud transform tool or a selection transform tool is activated at a time.

Definition at line 274 of file cloudEditorWidget.h.


The documentation for this class was generated from the following files:


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:38:49