34 #ifndef MAINWINDOW_HPP_ 35 #define MAINWINDOW_HPP_ 37 #include <vtkSmartPointer.h> 38 #include <vtkCamera.h> 39 #include <vtkCameraRepresentation.h> 40 #include <vtkCameraInterpolator.h> 41 #include <vtkCommand.h> 42 #include <vtkRenderer.h> 43 #include <vtkRendererCollection.h> 44 #include <vtkRenderWindow.h> 45 #include <vtkRenderWindowInteractor.h> 46 #include <vtkViewport.h> 47 #include <vtkObjectFactory.h> 48 #include <vtkGraphicsFactory.h> 49 #include <vtkOrientationMarkerWidget.h> 50 #include <vtkAxesActor.h> 51 #include <vtkOpenGLRenderer.h> 54 #include <vtkCullerCollection.h> 57 #ifdef LVR2_USE_VTK_GE_7_1 58 #include <vtkEDLShading.h> 59 #include <vtkRenderStepsPass.h> 64 #include "ui_LVRMainWindowQVTKOGLUI.h" 66 #include "ui_LVRMainWindowUI.h" 68 #include "ui_LVRAboutDialogUI.h" 69 #include "ui_LVRTooltipDialogUI.h" 73 #include "../widgets/LVRPlotter.hpp" 74 #include "../vtkBridge/LVRModelBridge.hpp" 75 #include "../widgets/LVRModelItem.hpp" 76 #include "../widgets/LVRPointCloudItem.hpp" 77 #include "../widgets/LVRMeshItem.hpp" 78 #include "../widgets/LVRItemTypes.hpp" 79 #include "../widgets/LVRRenameDialog.hpp" 80 #include "../widgets/LVRAnimationDialog.hpp" 81 #include "../widgets/LVRTransformationDialog.hpp" 82 #include "../widgets/LVRCorrespondanceDialog.hpp" 83 #include "../widgets/LVRLabelDialog.hpp" 84 #include "../widgets/LVRReconstructionEstimateNormalsDialog.hpp" 85 #include "../widgets/LVRReconstructionMarchingCubesDialog.hpp" 86 #include "../widgets/LVRReconstructionExtendedMarchingCubesDialog.hpp" 87 #include "../widgets/LVROptimizationPlanarOptimizationDialog.hpp" 88 #include "../widgets/LVROptimizationRemoveArtifactsDialog.hpp" 89 #include "../widgets/LVRFilteringMLSProjectionDialog.hpp" 90 #include "../widgets/LVRFilteringRemoveOutliersDialog.hpp" 91 #include "../widgets/LVRBackgroundDialog.hpp" 92 #include "../widgets/LVRHistogram.hpp" 93 #include "../widgets/LVRScanDataItem.hpp" 94 #include "../widgets/LVRCamDataItem.hpp" 95 #include "../widgets/LVRBoundingBoxItem.hpp" 96 #include "../widgets/LVRPointInfo.hpp" 97 #include "../vtkBridge/LVRPickingInteractor.hpp" 98 #include "../vtkBridge/LVRLabelInteractor.hpp" 99 #include "../vtkBridge/LVRVtkArrow.hpp" 105 #include <boost/format.hpp> 107 #include "../vtkBridge/LVRChunkedMeshBridge.hpp" 108 #include "../vtkBridge/LVRChunkedMeshCuller.hpp" 110 #define LABEL_NAME_COLUMN 0 111 #define LABELED_POINT_COLUMN 1 112 #define LABEL_VISIBLE_COLUMN 2 113 #define LABEL_ID_COLUMN 3 146 void loadModels(
const QStringList& filenames);
148 void loadChunkedMesh(
const QStringList& filenames, std::vector<std::string> layers,
int cacheSize,
float highResDistance);
235 QTreeWidgetItem*
addScans(std::shared_ptr<ScanDataManager> sdm, QTreeWidgetItem *parent);
384 #ifdef LVR2_USE_VTK_GE_7_1 385 vtkSmartPointer<vtkRenderStepsPass> m_basicPasses;
386 vtkSmartPointer<vtkEDLShading> m_edl;
QAction * m_actionOpenChunkedMesh
QAction * m_actionRenameModelItem
void updatePointPreview(int pointId, PointBufferPtr points)
Changes the Point displayed by the PointPreview.
void exportSelectedModel()
void buildIncompatibilityBox(string actionName, unsigned char allowedTypes)
QAction * m_actionShowSpectralPointPreview
QPushButton * m_buttonCameraPathTool
QAction * m_actionSetViewToCamera
QSlider * m_horizontalSliderPointSize
QAction * m_actionShow_Wireframe
LVRLabelInteractorStyle * m_labelInteractor
QLineEdit * m_gradientLineEdit
vtkSmartPointer< vtkCamera > m_camera
QComboBox * m_comboBoxGradient
void showLabelTreeContextMenu(const QPoint &)
std::set< LVRModelItem * > getSelectedModelItems()
void onSpectralSliderChanged(int action=-1)
Determines if changeSpectralColor() should be called. Updates the m_spectralLineEdit to the value fro...
void connectSignalsAndSlots()
QPushButton * m_buttonTransformModel
QList< QTreeWidgetItem * > m_items_copied
QAction * m_actionRemove_Outliers
void loadModels(const QStringList &filenames)
QAction * m_actionPlanar_Optimization
QAction * m_actionMatch_Textures_from_Package
LVRPointCloudItem * getPointCloudItem(QTreeWidgetItem *item)
QMessageBox * m_incompatibilityBox
LVRPlotter * m_PointPreviewPlotter
void cellSelected(QTreeWidgetItem *item, int column)
void changePicker(bool labeling)
ChunkedMeshBridgePtr m_chunkBridge
void highlightBoundingBoxes()
void addNewInstance(QTreeWidgetItem *)
std::unordered_map< size_t, vtkSmartPointer< vtkActor > > actorMap
QAction * m_actionExtract_labeling
QAction * m_actionStop_labeling
QAction * m_actionRemoveInstance
void correspondenceDialogOpened()
QAction * m_actionExtract_and_Rematch_Patterns
ChunkedMeshCuller * m_chunkCuller
QAction * m_actionShowSpectralColorGradient
void onSpectralLineEditSubmit()
Same as onSpectralLineEditChanged(), but triggers changeSpectralView()
LVRMeshItem * getMeshItem(QTreeWidgetItem *item)
QAction * m_actionUnloadPointCloudData
std::map< LVRPointCloudItem *, LVRHistogram * > m_histograms
std::set< LVRPointCloudItem * > getSelectedPointCloudItems()
QAction * m_actionMLS_Projection
QAction * m_actionReset_Camera
QAction * m_actionAddNewInstance
LVRLabelDialog * m_labelDialog
QSlider * m_gradientSlider
static const string UNKNOWNNAME
vtkSmartPointer< vtkRenderWindowInteractor > m_renderWindowInteractor
std::shared_ptr< PointBuffer > PointBufferPtr
QAction * m_actionExportModelTransformed
void labelLoaded(int, std::vector< int >)
QAction * m_actionShow_Normals
QAction * m_actionGlobal_Relaxation
LVRTreeWidgetHelper * m_treeWidgetHelper
void reconstructUsingMarchingCubes()
void showTreeContextMenu(const QPoint &)
void onGradientSliderChanged(int action=-1)
Determines if changeGradientColor() should be called. Updates the m_gradientLineEdit to the value fro...
void showTransformationDialog()
void reconstructUsingPlanarMarchingCubes()
QAction * m_actionLoadPointCloudData
QSlider * m_horizontalSliderTransparency
void updateSpectralGradientEnabled(bool checked)
Switches between Sliders and Gradients. checked == true => Gradient DockWidget enabled.
void showBackgroundDialog()
QPushButton * m_buttonExportData
vtkSmartPointer< vtkOrientationMarkerWidget > m_axesWidget
void changeTransparency(int transparencyValue)
QList< LVRPointCloudItem * > getPointCloudItems(QList< QTreeWidgetItem *> items)
QAction * m_actionStart_labeling
void updateSpectralSlidersEnabled(bool checked)
Switches between Sliders and Gradients. checked == true => Slider DockWidget enabled.
LVRModelItem * loadModelItem(QString name)
QAction * m_actionPasteModelItem
void showErrorDialog()
Shows a Popup Dialog saying that no PointClouds with spectral data are selected.
QAction * m_actionRemove_Artifacts
void changeShading(int shader)
QLabel * m_spectralLabels[3]
QMenu * m_treeChildItemContextMenu
QMenu * m_labelTreeParentItemContextMenu
void onSpectralLineEditChanged()
Updates the m_spectralSlider to the value from m_spectralLineEdit.
LVRMainWindow()
MainWindow.
QAction * m_actionStore_Current_View
QTreeWidgetItem * m_selectedLabelItem
void changeGradientColor()
Updates all selected LVRPointCloudItems to the desired Gradient. can take seconds ...
QCheckBox * m_spectralCheckboxes[3]
void toogleEDL(bool checkboxstate)
QAction * m_actionShowSpectralSlider
QAction * m_actionICP_Using_Manual_Correspondance
std::set< LVRMeshItem * > getSelectedMeshItems()
QAction * m_actionICP_Using_Pose_Estimations
QMenu * m_treeParentItemContextMenu
void onGradientLineEditSubmit()
Same as onGradientLineEditChanged(), but triggers changeGradientView()
void unloadPointCloudData()
void changePointSize(int pointSize)
QAction * m_actionCopyModelItem
void openCameraPathTool()
void visibilityChanged(QTreeWidgetItem *, int)
QSlider * m_spectralSliders[3]
void removeArrow(LVRVtkArrow *)
QTreeWidgetItem * addScans(std::shared_ptr< ScanDataManager > sdm, QTreeWidgetItem *parent)
void onGradientLineEditChanged()
Updates the m_gradientSlider to the value from m_gradientLineEdit.
QAction * m_actionExtended_Marching_Cubes
void comboBoxIndexChanged(int index)
void loadPointCloudData()
QAction * m_actionPlanar_Marching_Cubes
bool childNameExists(QTreeWidgetItem *item, const QString &name)
LVRPickingInteractor * m_pickingInteractor
QAction * m_actionShowColorDialog
QAction * m_actionShowBackgroundSettings
QAction * m_actionCameraPathTool
QAction * m_actionMarching_Cubes
QAction * m_actionEstimate_Normals
QLineEdit * m_spectralLineEdits[3]
QPushButton * m_buttonCreateMesh
QAction * m_actionFurniture_Recognition
vtkSmartPointer< vtkAxesActor > m_axes
A wrapper class to generate arrow actors for vtk based on VTK's oriented arrow example.
void reconstructUsingExtendedMarchingCubes()
QAction * m_actionShow_Mesh
void toggleWireframe(bool checkboxState)
void setModelVisibility(QTreeWidgetItem *treeWidgetItem, int column)
void parseCommandLine(int argc, char **argv)
void changeSpectralColor()
Updates all selected LVRPointCloudItems to the desired Spectral. can take seconds ...
QComboBox * m_comboBoxShading
QAction * m_actionRecall_Stored_View
QAction * m_actionShow_Points
void togglePoints(bool checkboxState)
void updateDisplayLists(actorMap lowRes, actorMap highRes)
void toggleNormals(bool checkboxState)
void labelChanged(uint16_t)
LVRModelItem * getModelItem(QTreeWidgetItem *item)
void showHistogramDialog()
Shows a Popup Dialog with the average Intensity per Spectral Channel.
QAction * m_actionAddLabelClass
void restoreSliders()
Adjusts all the Sliders, LineEdits and CheckBoxes to the currently selected Items.
QAction * m_actionSimple_Plane_Classification
QAction * m_actionDeleteModelItem
void hidePoints(int, bool)
vtkSmartPointer< vtkRenderer > m_renderer
void addArrow(LVRVtkArrow *)
QString increaseFilename(QString filename)
QAction * m_actionShowSpectralHistogram
QAction * m_actionCompute_Textures
QMenu * m_labelTreeChildItemContextMenu
boost::shared_ptr< LVRChunkedMeshBridge > ChunkedMeshBridgePtr
QAction * m_actionShowImage
void updatePointCount(const uint16_t, const int)
void applyMLSProjection()
void showPointInfoDialog()
Shows a Popup Dialog with Information about a Point.
PointBufferPtr m_previewPointBuffer
void labelAdded(QTreeWidgetItem *)
LVRCorrespondanceDialog * m_correspondanceDialog
void showPointPreview(vtkActor *actor, int point)
Shows the DockerWidget with the preview of the PointInfoDialog.
vtkSmartPointer< vtkCameraRepresentation > m_pathCamera
void toggleMeshes(bool checkboxState)