Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Olena
pylene
Commits
c8006f2a
Commit
c8006f2a
authored
Dec 10, 2018
by
Michaël Roynard
Browse files
Fix ndimage for Indexable
parent
dc530938
Changes
4
Hide whitespace changes
Inline
Side-by-side
pylene/include/mln/core/concept/new/archetype/image.hpp
View file @
c8006f2a
...
...
@@ -125,8 +125,8 @@ namespace mln::archetypes
using
indexable
=
std
::
true_type
;
image_reference_t
<
IndexableImage
>
operator
[](
image_index_t
<
IndexableImage
>
)
const
;
image_point_t
<
IndexableImage
>
new_point_
of
_index
(
image_index_t
<
IndexableImage
>
)
const
;
image_index_t
<
IndexableImage
>
index_
at
_point
(
image_point_t
<
IndexableImage
>
)
const
;
image_point_t
<
IndexableImage
>
new_point_
at
_index
(
image_index_t
<
IndexableImage
>
)
const
;
image_index_t
<
IndexableImage
>
new_
index_
of
_point
(
image_point_t
<
IndexableImage
>
)
const
;
image_index_t
<
IndexableImage
>
delta_index
(
image_point_t
<
IndexableImage
>
)
const
;
};
...
...
@@ -277,8 +277,8 @@ namespace mln::archetypes
using
accessible
=
std
::
true_type
;
image_reference_t
<
RawImage
>
operator
[](
image_index_t
<
RawImage
>
)
const
;
image_point_t
<
RawImage
>
new_point_
of
_index
(
image_index_t
<
RawImage
>
)
const
;
image_index_t
<
RawImage
>
index_
at
_point
(
image_point_t
<
RawImage
>
)
const
;
image_point_t
<
RawImage
>
new_point_
at
_index
(
image_index_t
<
RawImage
>
)
const
;
image_index_t
<
RawImage
>
new_
index_
of
_point
(
image_point_t
<
RawImage
>
)
const
;
image_index_t
<
RawImage
>
delta_index
(
image_point_t
<
RawImage
>
)
const
;
image_reference_t
<
RawImage
>
operator
()(
image_point_t
<
RawImage
>
)
const
;
...
...
pylene/include/mln/core/concept/new/images.hpp
View file @
c8006f2a
...
...
@@ -108,8 +108,8 @@ namespace mln::concepts
image_indexable_v
<
Ima
>
&&
requires
(
const
Ima
cima
,
image_index_t
<
Ima
>
k
,
image_point_t
<
Ima
>
p
)
{
{
cima
[
k
]
}
->
image_reference_t
<
Ima
>
;
{
cima
.
new_point_
of
_index
(
k
)
}
->
image_point_t
<
Ima
>
;
{
cima
.
index_
at
_point
(
p
)
}
->
image_index_t
<
Ima
>
;
{
cima
.
new_point_
at
_index
(
k
)
}
->
image_point_t
<
Ima
>
;
{
cima
.
new_
index_
of
_point
(
p
)
}
->
image_index_t
<
Ima
>
;
{
cima
.
delta_index
(
p
)
}
->
image_index_t
<
Ima
>
;
};
...
...
pylene/include/mln/core/image/ndimage.hpp
View file @
c8006f2a
...
...
@@ -184,7 +184,7 @@ namespace mln
/// \copydoc image::size_type
using
size_type
[[
deprecated
]]
=
unsigned
;
using
index_type
=
unsigned
;
using
index_type
=
int
;
using
pointer
=
T
*
;
using
const_pointer
=
const
T
*
;
...
...
@@ -251,10 +251,12 @@ namespace mln
const_reference
operator
()(
const
site_type
&
p
)
const
;
/// \copydoc image::operator[](size_type i) const
reference
operator
[](
size_type
i
);
[[
deprecated
]]
reference
operator
[](
size_type
i
);
reference
operator
[](
index_type
i
);
/// \copydoc image::operator[](size_type i) const
const_reference
operator
[](
size_type
i
)
const
;
[[
deprecated
]]
const_reference
operator
[](
size_type
i
)
const
;
reference
operator
[](
index_type
i
)
const
;
/// \copydoc image::at(const site_type& p) const
reference
at
(
const
site_type
&
p
);
...
...
@@ -329,7 +331,8 @@ namespace mln
/// \{
/// \copydoc image::index_of_point(const point_type&) const
size_type
index_of_point
(
const
point_type
&
p
)
const
;
[[
deprecated
]]
size_type
index_of_point
(
const
point_type
&
p
)
const
;
index_type
new_index_of_point
(
const
new_point_type
&
p
)
const
;
/// \copydoc image::point_at_index(size_type i) const
[[
deprecated
]]
point_type
point_at_index
(
size_type
i
)
const
;
...
...
tests/core/image/ndimage.cpp
View file @
c8006f2a
...
...
@@ -11,7 +11,7 @@
namespace
concepts
=
mln
::
concepts
;
#ifdef PYLENE_CONCEPT_TS_ENABLED
template
<
concepts
::
Image
Ima
>
template
<
concepts
::
Indexable
Image
Ima
>
void
foo
(
Ima
)
{
}
...
...
@@ -25,7 +25,7 @@ TEST(Core, Image_Image2D)
foo
(
mln
::
image2d
<
int
>
{});
static_assert
(
concepts
::
Image
<
mln
::
image2d
<
int
>>
);
//
static_assert(concepts::IndexableImage<mln::image2d<int>>);
static_assert
(
concepts
::
IndexableImage
<
mln
::
image2d
<
int
>>
);
// static_assert(concepts::AccessibleImage<mln::image2d<int>>);
// static_assert(concepts::BidirectionalImage<mln::image2d<int>>);
// static_assert(concepts::RawImage<mln::image2d<int>>);
...
...
Write
Preview
Supports
Markdown
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