Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
vt-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor 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
morpheme
vt-python
Commits
01697a3b
Commit
01697a3b
authored
5 years ago
by
MALANDAIN Gregoire
Browse files
Options
Downloads
Patches
Plain Diff
remove some unecessary test
parent
c307f35e
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
wrp/python/vtImageBridgePython.cpp
+39
-48
39 additions, 48 deletions
wrp/python/vtImageBridgePython.cpp
with
39 additions
and
48 deletions
wrp/python/vtImageBridgePython.cpp
+
39
−
48
View file @
01697a3b
...
...
@@ -149,30 +149,25 @@ namespace vt {
std
::
string
proc
=
"copy_img_to_py_array"
;
py
::
object
o
;
if
(
img
.
dims
()
!=
1
)
{
std
::
cerr
<<
proc
<<
": is not implemented for vectorial images"
<<
std
::
endl
;
}
else
{
std
::
type_index
type
=
img
.
type
();
if
(
type
==
std
::
type_index
(
typeid
(
double
)))
{
o
=
_copy_img_to_py_array
<
double
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
char
)))
{
o
=
_copy_img_to_py_array
<
unsigned
char
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
char
)))
{
o
=
_copy_img_to_py_array
<
char
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
short
int
)))
{
o
=
_copy_img_to_py_array
<
unsigned
short
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
short
int
)))
{
o
=
_copy_img_to_py_array
<
short
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
int
)))
{
o
=
_copy_img_to_py_array
<
unsigned
int
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
int
)))
{
o
=
_copy_img_to_py_array
<
int
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
float
)))
{
o
=
_copy_img_to_py_array
<
float
>
(
img
);
}
else
{
std
::
cerr
<<
proc
<<
": is not implemented for this type "
<<
std
::
endl
;
}
std
::
type_index
type
=
img
.
type
();
if
(
type
==
std
::
type_index
(
typeid
(
double
)))
{
o
=
_copy_img_to_py_array
<
double
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
char
)))
{
o
=
_copy_img_to_py_array
<
unsigned
char
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
char
)))
{
o
=
_copy_img_to_py_array
<
char
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
short
int
)))
{
o
=
_copy_img_to_py_array
<
unsigned
short
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
short
int
)))
{
o
=
_copy_img_to_py_array
<
short
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
int
)))
{
o
=
_copy_img_to_py_array
<
unsigned
int
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
int
)))
{
o
=
_copy_img_to_py_array
<
int
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
float
)))
{
o
=
_copy_img_to_py_array
<
float
>
(
img
);
}
else
{
std
::
cerr
<<
proc
<<
": is not implemented for this type "
<<
std
::
endl
;
}
return
o
;
}
...
...
@@ -265,31 +260,27 @@ namespace vt {
std
::
string
proc
=
"mv_img_pointer_to_py_array"
;
py
::
object
o
;
if
(
img
.
dims
()
!=
1
)
{
std
::
cerr
<<
proc
<<
": is not implemented for vectorial images"
<<
std
::
endl
;
}
else
{
std
::
type_index
type
=
img
.
type
();
if
(
type
==
std
::
type_index
(
typeid
(
double
)))
{
o
=
_mv_img_pointer_to_py_array
<
double
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
char
)))
{
o
=
_mv_img_pointer_to_py_array
<
unsigned
char
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
char
)))
{
o
=
_mv_img_pointer_to_py_array
<
char
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
short
int
)))
{
o
=
_mv_img_pointer_to_py_array
<
unsigned
short
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
short
int
)))
{
o
=
_mv_img_pointer_to_py_array
<
short
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
int
)))
{
o
=
_mv_img_pointer_to_py_array
<
unsigned
int
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
int
)))
{
o
=
_mv_img_pointer_to_py_array
<
int
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
float
)))
{
o
=
_mv_img_pointer_to_py_array
<
float
>
(
img
);
}
else
{
std
::
cerr
<<
proc
<<
": is not implemented for this type "
<<
std
::
endl
;
}
std
::
type_index
type
=
img
.
type
();
if
(
type
==
std
::
type_index
(
typeid
(
double
)))
{
o
=
_mv_img_pointer_to_py_array
<
double
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
char
)))
{
o
=
_mv_img_pointer_to_py_array
<
unsigned
char
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
char
)))
{
o
=
_mv_img_pointer_to_py_array
<
char
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
short
int
)))
{
o
=
_mv_img_pointer_to_py_array
<
unsigned
short
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
short
int
)))
{
o
=
_mv_img_pointer_to_py_array
<
short
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
unsigned
int
)))
{
o
=
_mv_img_pointer_to_py_array
<
unsigned
int
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
int
)))
{
o
=
_mv_img_pointer_to_py_array
<
int
>
(
img
);
}
else
if
(
type
==
std
::
type_index
(
typeid
(
float
)))
{
o
=
_mv_img_pointer_to_py_array
<
float
>
(
img
);
}
else
{
std
::
cerr
<<
proc
<<
": is not implemented for this type "
<<
std
::
endl
;
}
return
o
;
}
...
...
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