Commit 152bc858 authored by Michaël Roynard's avatar Michaël Roynard
Browse files

Fix comment code review

parent 0f0dfbdc
......@@ -69,6 +69,8 @@ namespace mln
template <typename InputImage>
void imsave(InputImage ima, std::ostream& os, FREE_IMAGE_FORMAT fif)
{
static_assert(is_a<InputImage, mln::experimental::Image>());
mln_entering("mln::io::imsave");
freeimage_writer_plugin plugin(os, fif);
......@@ -81,6 +83,8 @@ namespace mln
template <typename InputImage>
void imsave(InputImage ima, const std::string& path)
{
static_assert(is_a<InputImage, mln::experimental::Image>());
if (path == "-")
imsave(ima, std::cout);
else
......
......@@ -68,6 +68,8 @@ namespace mln
template <class I>
void Saver<I>::save_experimental(I ima, PluginWriter* plugin, bool permissive) const
{
static_assert(is_a<I, mln::experimental::Image>());
if (not plugin->can_write(typeid(mln_value(I))))
{
std::string msg = "The plugin does not support writing " + internal::demangle(typeid(mln_value(I)).name());
......
......@@ -20,7 +20,7 @@ namespace mln
namespace experimental
{
template <class Label_t, class InputImage, class N>
mln_ch_value(InputImage, Label_t) watershed(InputImage ima, const Neighborhood<N>& nbh, int& nlabel);
image_ch_value_t<InputImage, Label_t> watershed(InputImage ima, const Neighborhood<N>& nbh, int& nlabel);
}
......@@ -185,7 +185,7 @@ namespace mln
{
template <class Label_t, class InputImage, class N>
mln_ch_value(InputImage, Label_t) watershed(InputImage ima, const Neighborhood<N>& nbh_, int& nlabel)
image_ch_value_t<InputImage, Label_t> watershed(InputImage ima, const Neighborhood<N>& nbh_, int& nlabel)
{
static_assert(is_a<InputImage, Image>());
static_assert(std::is_integral<Label_t>::value, "The label type must integral.");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment