Commit ba576452 authored by Julien Michel's avatar Julien Michel

ENH: Add Functor module with FunctorImageFilter, VariadicInputsImageFilter,...

ENH: Add Functor module with FunctorImageFilter, VariadicInputsImageFilter, VariadicNamedInputsImageFilter

Squashed commit of the following:

commit 5de2770a
Merge: 72b6a700 54e30088
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 16:24:52 2018 +0100

    Merge branch 'functor_filter_named_inputs' into 'functorfilter'

    Named inputs in FunctorImageFilter

    See merge request !290

commit 54e30088
Merge: 3fca72a9 72b6a700
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 15:59:50 2018 +0100

    MRG

commit 72b6a700
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 15:48:44 2018 +0100

    DOC: Fix ingroup tags

commit 266e71b2
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 15:47:14 2018 +0100

    ENH: Only pad input image that correspond to neighborhood

commit edbd1a2e
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 14:57:51 2018 +0100

    TEST: Test support of built-in math functions

commit 3fca72a9
Merge: 7cf407e6 dbe6f862
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 14:34:12 2018 +0100

    Merge branch 'functorfilter' into functor_filter_named_inputs

commit dbe6f862
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 14:33:49 2018 +0100

    COMP: Fix compilation error

commit 7cf407e6
Merge: 10f1592e 894e496f
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 14:31:54 2018 +0100

    MRG

commit 894e496f
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 14:14:30 2018 +0100

    DOC: Enhance doc of separate functors

commit fdd99a96
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 14:08:54 2018 +0100

    DOC: Enhance code documentation

commit d9aa111b
Merge: 4987d73d f34b7ce3
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 13:52:12 2018 +0100

    MRG

commit 10f1592e
Merge: a5e6a982 f34b7ce3
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 13:46:27 2018 +0100

    MRG

commit f34b7ce3
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 13:44:54 2018 +0100

    ENH: replace non const GetFunctor() by GetModifiableFunctor()

commit 60968460
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 13:40:03 2018 +0100

    TEST: Add more testing cases, and support non const operators

commit a5e6a982
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 13:29:19 2018 +0100

    ENH: VNamed -> VariadicNamed

commit f4d94a68
Merge: 0397595a 490d8c35
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 19 13:22:04 2018 +0100

    MRG

commit 4987d73d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Nov 16 17:35:34 2018 +0100

    ENH: Also support functors of the form void ()(Out&, const In&...)

commit 490d8c35
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Nov 16 16:35:06 2018 +0100

    DOC: Enhance documentation

commit d8dffd44
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Nov 16 16:19:33 2018 +0100

    ENH: Rename (VInput -> VariadicInput) and add more checks

commit db803d3c
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Nov 16 09:46:15 2018 +0100

    COMP: Fix static_asserts on pixel type detection

commit cbea423c
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Nov 15 13:25:17 2018 +0100

    ENH: C++17 will ease this

commit 7eeb1909
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Nov 15 13:25:00 2018 +0100

    ENH: Add static_assert check to see if all parameters (and return type) of TFunction can be mapped to valid pixel types for Image/VectorImage

commit 0397595a
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Nov 13 16:25:58 2018 +0100

    ENH: Introducing named inputs

commit 09877b54
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Nov 9 16:36:38 2018 +0100

    COMP: Missing headers

commit 37527191
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Nov 9 15:57:07 2018 +0100

    TEST: Use static number of inputs in tests

commit 1c18762d
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Nov 9 15:49:56 2018 +0100

    ENH: Add helper value for number of inputs

commit af3cc15b
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Nov 9 14:23:49 2018 +0100

    ENH: Add template using to ease the retrieval of input image types

commit cec70438
Author: Victor Poughon <victor.poughon@cnes.fr>
Date:   Fri Nov 9 12:34:34 2018 +0100

    BUG: fix comment in macro syntax error

commit 17a4c5a4
Author: Victor Poughon <victor.poughon@cnes.fr>
Date:   Fri Nov 9 12:29:53 2018 +0100

    ENH: FunctorFilter: fix legacy SetInput and improve tests

commit 2d8c2a48
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Thu Nov 8 15:42:37 2018 +0100

    ENH: Add tests and move useful functors to separate headers

commit e14ab465
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Nov 6 11:55:06 2018 +0100

    TEST: Fix header test

commit 28662af3
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Nov 6 11:53:25 2018 +0100

    ENH: Move functor filter to a dedicated Module

commit d10945d9
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Nov 6 09:19:39 2018 +0100

    ENH: Undef macro once used

commit 415c6219
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Mon Nov 5 16:49:38 2018 +0100

    ENH: Add macro and SFINAE to enable the old-style setters

commit 21ec65b5
Author: Julien Michel <julien.michel@orfeo-toolbox.org>
Date:   Mon Oct 29 16:01:18 2018 +0000

    TEST: More exhaustive testing of new filter

commit d487b755
Author: Julien Michel <julien.michel@orfeo-toolbox.org>
Date:   Mon Oct 29 15:37:20 2018 +0000

    TEST: Static checks for test

commit 0693ea95
Author: Julien Michel <julien.michel@orfeo-toolbox.org>
Date:   Mon Oct 29 15:37:07 2018 +0000

    DOC: typo in documentation

commit 8a214792
Author: Julien Michel <julien.michel@orfeo-toolbox.org>
Date:   Mon Oct 29 14:41:19 2018 +0000

    DOC: Enhance documentation

commit f5f6bcf0
Author: Julien Michel <julien.michel@orfeo-toolbox.org>
Date:   Mon Oct 29 14:18:41 2018 +0000

    COMP: Code review (and adding a few examples with std::complex)

commit 82b8d997
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Oct 23 16:44:05 2018 +0200

    COMP: include fixes

commit 0846f1a8
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Oct 23 16:34:28 2018 +0200

    DOC: add documentation (WIP)

commit 6eb7f0ca
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Oct 23 15:52:48 2018 +0200

    ENH: Handle lambdas returning VariableLengthVector

commit 8f1f7f3b
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Oct 23 13:00:06 2018 +0200

    ENH: Filter working with neighborhoods

commit 5586c569
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Oct 23 10:11:43 2018 +0200

    ENH: Handle output size

commit 6a49f5df
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Oct 23 10:08:42 2018 +0200

    ENH: Handle output size (WIP)

commit e3585999
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Oct 12 11:12:56 2018 +0200

    ENH: FunctorImageFilter starts to be fully implemented (WIP)

commit 6d10b558
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Fri Oct 5 16:57:03 2018 +0200

    ENH: FunctorImageFilter is now fully variadic from Functor definition

commit a6399f2c
Author: Julien Michel <julien.michel@cnes.fr>
Date:   Tue Oct 2 13:28:29 2018 +0200

    ENH: experiment with variadic types (WIP)

commit d05c3374
Author: Jordi Inglada <jordi.inglada@cesbio.cnes.fr>
Date:   Tue Oct 2 15:17:55 2018 +0200

    ADD: draft FunctorImageFilter

commit 8d4e8f1b
Author: Jordi Inglada <jordi.inglada@cesbio.cnes.fr>
Date:   Sun Sep 30 19:02:08 2018 +0200

    ADD: start of FunctorImageFilter

    A generic functor filter which
    1. can take and produce vector and scalar images
    2. with or without the use of image neighborhoods in input
    3. with NbInputs >=1
    4. and with any number of output bands
parent 1adcf817
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
project(OTBFunctor)
otb_module_impl()
This diff is collapsed.
This diff is collapsed.
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otb_VariadicAddFunctor_h
#define otb_VariadicAddFunctor_h
#include <numeric>
namespace otb
{
namespace Functor
{
/**
* \class VariadicAdd
* \brief This functor adds any number of compile time scalar inputs
* \ingroup OTBFunctor
*/
template <typename TOut, typename ...TIns> struct VariadicAdd
{
auto operator()(TIns... ins) const
{
std::vector<TOut> outVector{static_cast<TOut>(ins)...};
return std::accumulate(outVector.begin(), outVector.end(),0);
}
};
} // end namespace Functor
} // end namespace otb
#endif
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otb_VariadicConcatenateFunctor_h
#define otb_VariadicConcatenateFunctor_h
#include "itkVariableLengthVector.h"
#include <vector>
#include <numeric>
#include <array>
namespace otb
{
namespace Functor
{
namespace variadic_concatenate_details
{
// helper function to implement next functor (convert a scalar value
// to a VariableLengthVector)
template <typename T> itk::VariableLengthVector<T> toVector(const T & in)
{
itk::VariableLengthVector<T> out;
out.SetSize(1);
out[0] = in;
return out;
}
// helper function to implement next functor, VariableLengthVectorVersion (returns in)
template <typename T> const itk::VariableLengthVector<T> & toVector(const itk::VariableLengthVector<T> & in)
{
return in;
}
// helper function to implement next functor, Merge two VariableLengthVector in-place
template <typename v1, typename v2> void concatenateVectors(v1 & a, const v2 & b)
{
const size_t previousSizeOfA = a.GetSize();
a.SetSize(previousSizeOfA+b.GetSize());
for(size_t it = 0; it<b.Size();++it)
{
a[previousSizeOfA+it] = static_cast<typename v1::ValueType>(b[it]);
}
}
// helper function to implement next functor, Merge N VariableLengthVector in-place
template <typename v1, typename v2, typename ...vn> void concatenateVectors(v1 & a, const v2 & b, const vn&... z)
{
concatenateVectors(a,b);
concatenateVectors(a,z...);
}
} // end namespace variadic_concatenate_details
// N images (all types) -> vector image
// This functor concatenates N images (N = variadic) of type
// VectorImage and or Image, into a single VectorImage
/**
* \class VariadicConcatenate
* \brief This functor concatenates any number of input of scalar type
* or VariableLengthVector.
* \ingroup OTBFunctor
*/
template<typename TOut, typename ...TIns> struct VariadicConcatenate
{
auto operator()(const TIns &... ins) const
{
itk::VariableLengthVector<TOut> out;
variadic_concatenate_details::concatenateVectors(out, variadic_concatenate_details::toVector(ins)...);
return out;
}
// Must define OutputSize because output pixel is vector
constexpr size_t OutputSize(const std::array<size_t, sizeof...(TIns)> inputsNbBands) const
{
return std::accumulate(inputsNbBands.begin(),inputsNbBands.end(),0);
}
};
} // end namespace Functor
} // end namespace otb
#endif
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otb_VariadicInputsImageFilter_h
#define otb_VariadicInputsImageFilter_h
#include "itkImageSource.h"
namespace otb {
/**
* \brief Base class for image filter with variadic inputs.
*
* This filter act as a base class for all filters that will take
* several input images with different types and produce an output
* image.
*
* Type for each input is taken from the variadic template parameter
* TInputs.
*
* Inputs get be set/get with SetVariadicInput<N>() and
* GetVariadicInput<N>(), when N is the index (first input is 0) of
* the input. This is resolved at compile time: you can not call
* SetVariadicInput<N>() with an argument not matching the Nth input
* type (it will lead to type mismatch compilation error).
*
* Alternatively, you can call SetVariadicInputs() with all the input
* image in the same order as in the template parameters.
*
* Last, there is a macro that generates SetInput1() ... SetInput10()
* (iff the number of varidic input types is large enough) for
* backward compatibility.
*
*/
template<class TOuptut, class ... TInputs> class VariadicInputsImageFilter : public itk::ImageSource<TOuptut>
{
public:
using Self = VariadicInputsImageFilter<TOuptut, TInputs...>;
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;
using Superclass = itk::ImageSource<TOuptut>;
using InputTypesTupleType = std::tuple<TInputs...>;
template <size_t I> using InputImageType = typename std::tuple_element<I,InputTypesTupleType>::type;
static constexpr size_t NumberOfInputs = std::tuple_size<InputTypesTupleType>::value;
// Good old new macro
itkNewMacro(Self);
/**
* \param Set the Ith input
*/
template <std::size_t I> void SetVariadicInput(const typename std::tuple_element<I,InputTypesTupleType>::type * inputPtr)
{
static_assert(std::tuple_size<InputTypesTupleType>::value>I,"Template value I is out of range.");
this->SetNthInput(I,const_cast<typename std::tuple_element<I,InputTypesTupleType>::type *>(inputPtr));
}
#define DefineLegacySetInputMacro(n) \
template<typename Tuple = InputTypesTupleType, typename Check = typename std::enable_if<n<=std::tuple_size<Tuple>::value >::type> \
void SetInput ## n(const typename std::tuple_element<n-1,Tuple>::type * img) \
{ \
this->template SetVariadicInput<n-1>(img); \
}
// The following defines legacy setters SetInput1()
// ... SetInput10(), only if the number of input type is sufficient
DefineLegacySetInputMacro(1);
DefineLegacySetInputMacro(2);
DefineLegacySetInputMacro(3);
DefineLegacySetInputMacro(4);
DefineLegacySetInputMacro(5);
DefineLegacySetInputMacro(6);
DefineLegacySetInputMacro(7);
DefineLegacySetInputMacro(8);
DefineLegacySetInputMacro(9);
DefineLegacySetInputMacro(10);
#undef DefineLegacySetInputMacro
/**
* \return the Ith variadic input
*/
template <std::size_t I> const typename std::tuple_element<I,InputTypesTupleType>::type * GetVariadicInput()
{
static_assert(std::tuple_size<InputTypesTupleType>::value>I,"Template value I is out of range.");
using ImageType = typename std::tuple_element<I,InputTypesTupleType>::type;
return dynamic_cast<const ImageType *>(this->GetInput(I));
}
/**
* \param inputs A vararg list of inputs
*/
void SetVariadicInputs(TInputs*... inputs)
{
auto inTuple = std::make_tuple(inputs...);
SetInputsImpl(inTuple,std::make_index_sequence<sizeof...(inputs)>{});
}
/**
* \return A tuple with all inputs
*/
auto GetVariadicInputs()
{
return GetInputsImpl(std::make_index_sequence<sizeof...(TInputs)>{});
}
protected:
VariadicInputsImageFilter()
{
this->SetNumberOfRequiredInputs(sizeof...(TInputs));
};
~VariadicInputsImageFilter() = default;
private:
template<class Tuple, size_t...Is> auto SetInputsImpl(Tuple& t, std::index_sequence<Is...>)
{
return std::initializer_list<int>{(this->SetVariadicInput<Is>(std::get<Is>(t)),0)...};
}
template <size_t...Is> auto GetInputsImpl(std::index_sequence<Is...>)
{
return std::make_tuple(this->GetVariadicInput<Is>()...);
}
VariadicInputsImageFilter(const Self&) = delete;
void operator=(const Self&) = delete;
};
}
#endif
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#ifndef otb_VariadicNamedInputsImageFilter_h
#define otb_VariadicNamedInputsImageFilter_h
#include "otbVariadicInputsImageFilter.h"
namespace otb {
/// TODO: Documentation
namespace internal
{
template<typename Arg, typename Tuple> struct tuple_index;
template<typename Arg, typename...Args> struct tuple_index<Arg, std::tuple<Arg,Args...> >
{
static constexpr std::size_t value = 0;
};
template<typename Arg, typename NotMatching, typename...Args> struct tuple_index<Arg, std::tuple<NotMatching,Args...>>
{
static_assert(sizeof...(Args)>0,"Could not find requested type in tuple");
static constexpr std::size_t value = 1 + tuple_index<Arg,std::tuple<Args...>>::value;
};
}
template<class TOuptut, class TInputNameMap, class ... TInputs> class VariadicNamedInputsImageFilter : public VariadicInputsImageFilter<TOuptut,TInputs...>
{
public:
using Self = VariadicNamedInputsImageFilter<TOuptut,TInputNameMap, TInputs...>;
using Pointer = itk::SmartPointer<Self>;
using ConstPointer = itk::SmartPointer<const Self>;
using Superclass = VariadicInputsImageFilter<TOuptut, TInputs...>;;
using InputTypesTupleType = typename Superclass::InputTypesTupleType;
template <size_t I> using InputImageType = typename Superclass::template InputImageType<I>;
static constexpr size_t NumberOfInputs = Superclass::NumberOfInputs;
static_assert(std::tuple_size<TInputNameMap>::value == NumberOfInputs,"Tuple for input name does not match the size of ... TInputs");
itkNewMacro(Self);
template <typename Tag> void SetVariadicNamedInput(const InputImageType<internal::tuple_index<Tag, TInputNameMap>::value> * inputPtr)
{
constexpr size_t idx = internal::tuple_index<Tag, TInputNameMap>::value;
this->SetNthInput(idx,const_cast<InputImageType<idx> *>(inputPtr));
}
template <typename Tag> const InputImageType<internal::tuple_index<Tag,TInputNameMap>::value> * GetVariadicNamedInput()
{
constexpr size_t idx = internal::tuple_index<Tag, TInputNameMap>::value;
return dynamic_cast<const InputImageType<idx> *>(this->GetInput(idx));
}
protected:
VariadicNamedInputsImageFilter() = default;
~VariadicNamedInputsImageFilter() = default;
private:
VariadicNamedInputsImageFilter(const Self&) = delete;
void operator=(const Self&) = delete;
};
}
#endif
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
set(DOCUMENTATION "This module contains a set of classes that allow parsing
metadata files from different types of sensor (both optical and radar sensor types
are supported. for instance: Pleiades, SPOT6, TerraSar, and so on).")
otb_module(OTBFunctor
DEPENDS
OTBITK
OTBCommon
OTBImageBase
TEST_DEPENDS
OTBTestKernel
DESCRIPTION
"${DOCUMENTATION}"
)
#
# Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
#
# This file is part of Orfeo Toolbox
#
# https://www.orfeo-toolbox.org/
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
otb_module_test()
set(OTBFunctorTests
otbFunctorTestDriver.cxx
otbFunctorImageFilter.cxx
)
add_executable(otbFunctorTestDriver ${OTBFunctorTests})
target_link_libraries(otbFunctorTestDriver ${OTBFunctor-Test_LIBRARIES})
otb_module_target_label(otbFunctorTestDriver)
otb_add_test(NAME bfTvFunctorImageFilter COMMAND otbImageManipulationTestDriver
otbFunctorImageFilter)
This diff is collapsed.
/*
* Copyright (C) 2005-2017 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "otbTestMain.h"
void RegisterTests()
{
REGISTER_TEST(otbFunctorImageFilter);
}
......@@ -40,7 +40,6 @@ set(OTBImageBaseTests
otbImageTest.cxx
otbImageFunctionAdaptor.cxx
otbMetaImageFunction.cxx
)
add_executable(otbImageBaseTestDriver ${OTBImageBaseTests})
......
Markdown is supported
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