Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Julien Cabieces
otb
Commits
a0b6a5a9
Commit
a0b6a5a9
authored
12 years ago
by
Otmane Lahlou
Browse files
Options
Downloads
Patches
Plain Diff
ENH: work for linking QGLImageWidget with the Qt MainWindow
parent
81ec28ec
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Code/Application/mvdMainWindow.cxx
+9
-0
9 additions, 0 deletions
Code/Application/mvdMainWindow.cxx
Code/Application/mvdMainWindow.h
+16
-0
16 additions, 0 deletions
Code/Application/mvdMainWindow.h
Code/Application/otbQtViewer.cxx_wip
+48
-0
48 additions, 0 deletions
Code/Application/otbQtViewer.cxx_wip
with
73 additions
and
0 deletions
Code/Application/mvdMainWindow.cxx
+
9
−
0
View file @
a0b6a5a9
...
...
@@ -19,6 +19,7 @@
#include
"mvdMainWindow.h"
#include
"ui_mvdMainWindow.h"
//
// System includes (sorted by alphabetic order)
...
...
@@ -55,6 +56,14 @@ MainWindow
addDockWidget( Qt::LeftDockWidgetArea, dock_widget );
*/
// TODO : uncomment to use the otbQGLImageWiget
// glWidget = new otb::QGLImageWidget();
// QHBoxLayout *mainLayout = new QHBoxLayout;
// mainLayout->addWidget(m_QGLWidget);
// setLayout(mainLayout);
// setWindowTitle(tr("OTB QGL Window"));
QObject
::
connect
(
m_UI
->
action_Quit
,
SIGNAL
(
activated
()
),
qApp
,
SLOT
(
quit
()
)
...
...
This diff is collapsed.
Click to expand it.
Code/Application/mvdMainWindow.h
+
16
−
0
View file @
a0b6a5a9
...
...
@@ -28,6 +28,7 @@
//
// OTB includes (sorted by alphabetic order)
//#include "otbQGLImageWidget.h"
//
// Monteverdi includes (sorted by alphabetic order)
...
...
@@ -39,6 +40,13 @@ namespace Ui
class
MainWindow
;
}
// namespace otb
// {
// class QGLImageWidget;
// };
namespace
mvd
{
/** \class MainWindow
...
...
@@ -59,6 +67,12 @@ public:
/** Destructor */
virtual
~
MainWindow
();
// /** Method to get the instance*/
// otb::QGLImageWidget* GetGLImageWidget()
// {
// return m_QGLWidget;
// }
//
//
protected:
...
...
@@ -68,6 +82,8 @@ protected:
private:
Ui
::
MainWindow
*
m_UI
;
//otb::QGLImageWidget * m_QGLWidget;
//
// SLOTS
private
slots
:
...
...
This diff is collapsed.
Click to expand it.
Code/Application/otbQtViewer.cxx_wip
0 → 100644
+
48
−
0
View file @
a0b6a5a9
/*=========================================================================
Program: Monteverdi2
Language: C++
Date: $Date$
Version: $Revision$
Copyright (c) Centre National d'Etudes Spatiales. All rights reserved.
See OTBCopyright.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notices for more information.
=========================================================================*/
#include "mvdMainWindow.h"
#include "otbQGLImageWidget.h"
#include "otbImageFileReader.h"
int
main( int argc, char* argv[] )
{
mvd::Application application( argc, argv );
// image reader
typedef otb::ImageFileReader<ImageType> ReaderType;
ReaderType::Pointer reader = ReaderType::New();
reader->SetFileName(argv[1]);
reader->Update();
ImageType::Pointer image = reader->GetOutput();
RegionType region = image->GetLargestPossibleRegion();
mvd::MainWindow * main_window = new mvd::MainWindow;
main_window->GetGLImageWidget()->SetIsotropicZoom(1);
main_window->GetGLImageWidget()->ReadBuffer(image, region);
main_window->resize( region.GetSize()[0], region.GetSize()[1] );
main_window->show();
return application.exec();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment