Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
6bc39367
Commit
6bc39367
authored
Aug 20, 2013
by
ozantonkal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cv::viz::get(window_name) implementation
parent
c37f091c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
6 deletions
+9
-6
viz.cpp
modules/viz/src/viz.cpp
+5
-1
viz3d.cpp
modules/viz/src/viz3d.cpp
+2
-1
viz3d_impl.cpp
modules/viz/src/viz3d_impl.cpp
+2
-4
No files found.
modules/viz/src/viz.cpp
View file @
6bc39367
...
...
@@ -112,7 +112,11 @@ cv::viz::VizAccessor * cv::viz::VizAccessor::getInstance()
cv
::
viz
::
Viz3d
cv
::
viz
::
VizAccessor
::
get
(
const
String
&
window_name
)
{
VizMap
::
iterator
vm_itr
=
viz_map_
.
find
(
window_name
);
// Add the prefix Viz
String
name
(
"Viz"
);
name
=
window_name
.
empty
()
?
name
:
name
+
" - "
+
window_name
;
VizMap
::
iterator
vm_itr
=
viz_map_
.
find
(
name
);
bool
exists
=
vm_itr
!=
viz_map_
.
end
();
if
(
exists
)
return
vm_itr
->
second
;
else
return
viz_map_
.
insert
(
VizPair
(
window_name
,
Viz3d
(
window_name
))).
first
->
second
;
...
...
modules/viz/src/viz3d.cpp
View file @
6bc39367
...
...
@@ -28,13 +28,14 @@ void cv::viz::Viz3d::create(const String &window_name)
impl_
=
new
VizImpl
(
window_name
);
impl_
->
ref_counter
=
1
;
// Register the window
//
cv::viz::VizAccessor::getInstance()->add(*this);
cv
::
viz
::
VizAccessor
::
getInstance
()
->
add
(
*
this
);
}
void
cv
::
viz
::
Viz3d
::
release
()
{
if
(
impl_
&&
CV_XADD
(
&
impl_
->
ref_counter
,
-
1
)
==
1
)
{
// Erase the window
cv
::
viz
::
VizAccessor
::
getInstance
()
->
remove
(
getWindowName
());
delete
impl_
;
impl_
=
0
;
...
...
modules/viz/src/viz3d_impl.cpp
View file @
6bc39367
...
...
@@ -83,10 +83,8 @@ cv::viz::Viz3d::VizImpl::VizImpl (const std::string &name)
/////////////////////////////////////////////////////////////////////////////////////////////
cv
::
viz
::
Viz3d
::
VizImpl
::~
VizImpl
()
{
if
(
interactor_
!=
NULL
)
interactor_
->
DestroyTimer
(
timer_id_
);
if
(
renderer_
)
renderer_
->
Clear
();
if
(
interactor_
)
interactor_
->
DestroyTimer
(
timer_id_
);
}
/////////////////////////////////////////////////////////////////////////////////////////////
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment