00001 /* 00002 * Software License Agreement (BSD License) 00003 * 00004 * Point Cloud Library (PCL) - www.pointclouds.org 00005 * Copyright (c) 2009-2012, Willow Garage, Inc. 00006 * Copyright (c) 2012-, Open Perception, Inc. 00007 * 00008 * All rights reserved. 00009 * 00010 * Redistribution and use in source and binary forms, with or without 00011 * modification, are permitted provided that the following conditions 00012 * are met: 00013 * 00014 * * Redistributions of source code must retain the above copyright 00015 * notice, this list of conditions and the following disclaimer. 00016 * * Redistributions in binary form must reproduce the above 00017 * copyright notice, this list of conditions and the following 00018 * disclaimer in the documentation and/or other materials provided 00019 * with the distribution. 00020 * * Neither the name of the copyright holder(s) nor the names of its 00021 * contributors may be used to endorse or promote products derived 00022 * from this software without specific prior written permission. 00023 * 00024 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 00025 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 00026 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 00027 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE 00028 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 00029 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00030 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00031 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 00032 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 00033 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN 00034 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00035 * POSSIBILITY OF SUCH DAMAGE. 00036 * 00037 * $Id$ 00038 * 00039 */ 00040 00041 #ifndef PCL_APPS_IN_HAND_SCANNER_MAIN_WINDOW_H 00042 #define PCL_APPS_IN_HAND_SCANNER_MAIN_WINDOW_H 00043 00044 #include <QMainWindow> 00045 00046 #include <pcl/apps/in_hand_scanner/in_hand_scanner.h> 00047 00049 // Forward declarations 00051 00052 namespace Ui 00053 { 00054 class MainWindow; 00055 } 00056 00057 namespace pcl 00058 { 00059 namespace ihs 00060 { 00061 class HelpWindow; 00062 } // End namespace ihs 00063 } // End namespace pcl 00064 00066 // MainWindow 00068 00069 namespace pcl 00070 { 00071 namespace ihs 00072 { 00073 class MainWindow : public QMainWindow 00074 { 00075 Q_OBJECT 00076 00077 public: 00078 00079 typedef pcl::ihs::InHandScanner InHandScanner; 00080 typedef pcl::ihs::HelpWindow HelpWindow; 00081 typedef InHandScanner::RunningMode RunningMode; 00082 00083 explicit MainWindow (QWidget* parent = 0); 00084 ~MainWindow (); 00085 00086 public slots: 00087 00088 void showHelp (); 00089 void saveAs (); 00090 00091 // In hand scanner 00092 void runningModeChanged (const RunningMode mode); 00093 void keyPressEvent (QKeyEvent* event); 00094 00095 // Input data processing. 00096 void setXMin (const int x_min); 00097 void setXMax (const int x_max); 00098 void setYMin (const int y_min); 00099 void setYMax (const int y_max); 00100 void setZMin (const int z_min); 00101 void setZMax (const int z_max); 00102 00103 void setHMin (const int h_min); 00104 void setHMax (const int h_max); 00105 void setSMin (const int s_min); 00106 void setSMax (const int s_max); 00107 void setVMin (const int v_min); 00108 void setVMax (const int v_max); 00109 00110 void setColorSegmentationInverted (const bool is_inverted); 00111 void setColorSegmentationEnabled (const bool is_enabled); 00112 00113 void setXYZErodeSize (const int size); 00114 void setHSVDilateSize (const int size); 00115 00116 // Registration 00117 void setEpsilon (); 00118 void setMaxIterations (const int iterations); 00119 void setMinOverlap (const int overlap); 00120 void setMaxFitness (); 00121 00122 void setCorrespondenceRejectionFactor (const double factor); 00123 void setCorrespondenceRejectionMaxAngle (const int angle); 00124 00125 // Integration 00126 void setMaxSquaredDistance (); 00127 void setAveragingMaxAngle (const int angle); 00128 void setMaxAge (const int age); 00129 void setMinDirections (const int directions); 00130 00131 private: 00132 00133 Ui::MainWindow* ui_; 00134 HelpWindow* help_window_; 00135 InHandScanner* ihs_; 00136 }; 00137 } // End namespace ihs 00138 } // End namespace pcl 00139 00140 #endif // PCL_APPS_IN_HAND_SCANNER_MAIN_WINDOW_H