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
c0dc33a4
Commit
c0dc33a4
authored
16 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
TEST: call to Fl::check
parent
1aaae972
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Testing/Code/Visualization/otbImageWidgetWithVectorDataGlComponent.cxx
+9
-9
9 additions, 9 deletions
...Visualization/otbImageWidgetWithVectorDataGlComponent.cxx
with
9 additions
and
9 deletions
Testing/Code/Visualization/otbImageWidgetWithVectorDataGlComponent.cxx
+
9
−
9
View file @
c0dc33a4
...
...
@@ -35,21 +35,21 @@ int otbImageWidgetWithVectorDataGlComponent( int argc, char * argv[] )
typedef
otb
::
ImageFileReader
<
ImageType
>
ReaderType
;
// VectorData component typedef
// VectorData component typedef
typedef
otb
::
VectorData
<
double
,
2
>
VectorDataType
;
typedef
otb
::
VectorDataGlComponent
<
VectorDataType
>
VectorDataGlComponentType
;
typedef
VectorDataType
::
DataNodeType
DataNodeType
;
typedef
DataNodeType
::
PointType
PointType
;
typedef
DataNodeType
::
LineType
LineType
;
typedef
DataNodeType
::
PolygonType
PolygonType
;
// Reading the input image
ReaderType
::
Pointer
reader
=
ReaderType
::
New
();
reader
->
SetFileName
(
infname
);
reader
->
Update
();
ImageType
::
RegionType
region
=
reader
->
GetOutput
()
->
GetLargestPossibleRegion
();
// Create a VectorData
// Create a VectorData
VectorDataType
::
Pointer
data
=
VectorDataType
::
New
();
DataNodeType
::
Pointer
document
=
DataNodeType
::
New
();
DataNodeType
::
Pointer
folder
=
DataNodeType
::
New
();
...
...
@@ -62,7 +62,7 @@ int otbImageWidgetWithVectorDataGlComponent( int argc, char * argv[] )
point
->
SetNodeId
(
"FEATURE_POINT"
);
line
->
SetNodeId
(
"FEATURE_LINE"
);
polygon
->
SetNodeId
(
"FEATURE_POLYGON"
);
// Create a point on the first quarter of the image
PointType
p
;
...
...
@@ -82,7 +82,7 @@ int otbImageWidgetWithVectorDataGlComponent( int argc, char * argv[] )
line
->
SetLine
(
l
);
// Create a complex polygon shape on the remaning of the image
// Outer ring
PolygonType
::
Pointer
outer
=
PolygonType
::
New
();
cindex
[
0
]
=
region
.
GetIndex
()[
0
]
+
region
.
GetSize
()[
0
]
/
16
;
...
...
@@ -100,7 +100,7 @@ int otbImageWidgetWithVectorDataGlComponent( int argc, char * argv[] )
polygon
->
SetPolygonExteriorRing
(
outer
);
// Inner ring
PolygonType
::
Pointer
inner
=
PolygonType
::
New
();
PolygonType
::
Pointer
inner
=
PolygonType
::
New
();
cindex
[
0
]
=
region
.
GetIndex
()[
0
]
+
2
*
region
.
GetSize
()[
0
]
/
16
;
cindex
[
1
]
=
region
.
GetIndex
()[
1
]
+
10
*
region
.
GetSize
()[
1
]
/
16
;
inner
->
AddVertex
(
cindex
);
...
...
@@ -140,16 +140,16 @@ int otbImageWidgetWithVectorDataGlComponent( int argc, char * argv[] )
widget
->
redraw
();
// Refresh display
Fl
::
check
();
// Create the VectorDataGlComponent
VectorDataGlComponentType
::
Pointer
vdgl
=
VectorDataGlComponentType
::
New
();
vdgl
->
SetVectorData
(
data
);
widget
->
AddGlComponent
(
vdgl
);
widget
->
redraw
();
Fl
::
run
();
Fl
::
check
();
return
EXIT_SUCCESS
;
}
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