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
David Youssefi
otb
Commits
8c457170
Commit
8c457170
authored
16 years ago
by
Julien Michel
Browse files
Options
Downloads
Patches
Plain Diff
ENH: (Visu Refactoring) Adding a base class for GlComponents
parent
93e66a5a
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Code/VisuRefac/otbCurve2D.h
+9
-15
9 additions, 15 deletions
Code/VisuRefac/otbCurve2D.h
Code/VisuRefac/otbGlComponent.h
+80
-0
80 additions, 0 deletions
Code/VisuRefac/otbGlComponent.h
with
89 additions
and
15 deletions
Code/VisuRefac/otbCurve2D.h
+
9
−
15
View file @
8c457170
...
...
@@ -18,10 +18,7 @@
#ifndef __otbCurve2D_h
#define __otbCurve2D_h
#include
"itkObject.h"
#include
"itkImageRegion.h"
#include
"itkAffineTransform.h"
#include
"itkFixedArray.h"
#include
"otbGlComponent.h"
// FLTK includes
#include
<FL/gl.h>
...
...
@@ -32,31 +29,28 @@ namespace otb
/** \class Curve2D
* \brief Base class Curves to be rendered in Curves2DWidget.
*
* \sa
ImageViewerModel
* \sa
Curves2DWidget
*/
class
Curve2D
:
public
itk
::
Objec
t
:
public
GlComponen
t
{
public:
/** Standard class typedefs */
typedef
Curve2D
Self
;
typedef
itk
::
Objec
t
Superclass
;
typedef
GlComponen
t
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
typedef
itk
::
ImageRegion
<
2
>
RegionType
;
// affine transform
typedef
itk
::
AffineTransform
<
double
,
2
>
AffineTransformType
;
typedef
AffineTransformType
::
InputPointType
PointType
;
typedef
AffineTransformType
::
InputVectorType
VectorType
;
typedef
itk
::
FixedArray
<
double
,
4
>
ColorType
;
typedef
Superclass
::
AffineTransform
Type
AffineTransformType
;
typedef
Superclass
::
PointType
PointType
;
typedef
Superclass
::
VectorType
VectorType
;
typedef
Superclass
::
ColorType
ColorType
;
/** Runtime information */
itkTypeMacro
(
Curve2D
,
Object
);
/// Render the curve according to display extent and axis characteristics
virtual
void
Render
(
const
RegionType
&
extent
,
const
AffineTransformType
*
space2ScreenTransform
)
=
0
;
itkTypeMacro
(
Curve2D
,
GlComponent
);
/// This method is provided to do some computation before rendering
virtual
void
BeforeRendering
()
{};
...
...
This diff is collapsed.
Click to expand it.
Code/VisuRefac/otbGlComponent.h
0 → 100644
+
80
−
0
View file @
8c457170
/*=========================================================================
Program: ORFEO Toolbox
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.
=========================================================================*/
#ifndef __otbGlComponent_h
#define __otbGlComponent_h
#include
"itkObject.h"
#include
"itkImageRegion.h"
#include
"itkAffineTransform.h"
#include
"itkFixedArray.h"
// FLTK includes
#include
<FL/gl.h>
#include
"FL/Fl_Gl_Window.H"
namespace
otb
{
/** \class GlComponent
* \brief Base class for openGl rendered components.
*/
class
GlComponent
:
public
itk
::
Object
{
public:
/** Standard class typedefs */
typedef
GlComponent
Self
;
typedef
itk
::
Object
Superclass
;
typedef
itk
::
SmartPointer
<
Self
>
Pointer
;
typedef
itk
::
SmartPointer
<
const
Self
>
ConstPointer
;
typedef
itk
::
ImageRegion
<
2
>
RegionType
;
// affine transform
typedef
itk
::
AffineTransform
<
double
,
2
>
AffineTransformType
;
typedef
AffineTransformType
::
InputPointType
PointType
;
typedef
AffineTransformType
::
InputVectorType
VectorType
;
typedef
itk
::
FixedArray
<
double
,
4
>
ColorType
;
/** Runtime information */
itkTypeMacro
(
GlComponent
,
Object
);
/// Render the curve according to display extent and axis characteristics
virtual
void
Render
(
const
RegionType
&
extent
,
const
AffineTransformType
*
space2ScreenTransform
)
=
0
;
protected:
/** Constructor */
GlComponent
()
{}
/** Destructor */
virtual
~
GlComponent
(){}
/** Printself method */
void
PrintSelf
(
std
::
ostream
&
os
,
itk
::
Indent
indent
)
const
{
Superclass
::
PrintSelf
(
os
,
indent
);
}
private
:
GlComponent
(
const
Self
&
);
// purposely not implemented
void
operator
=
(
const
Self
&
);
// purposely not implemented
};
// end class
}
// end namespace otb
#endif
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