My Project
divcurl.hh
Go to the documentation of this file.
1/* -*- mia-c++ -*-
2 *
3 * This file is part of MIA - a toolbox for medical image analysis
4 * Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
5 *
6 * MIA is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with MIA; if not, see <http://www.gnu.org/licenses/>.
18 *
19 */
20
21#ifndef mia_internal_divcurl_hh
22#define mia_internal_divcurl_hh
23
24
26
27
29
31
32template <typename Transform>
33class EXPORT TDivCurlFullCost : public TFullCost<Transform>
34{
35public:
36 typedef typename TFullCost<Transform>::Size Size;
37 TDivCurlFullCost(double weight_div, double weight_curl, double weight);
38private:
39 double do_evaluate(const Transform& t, CDoubleVector& gradient) const;
40 double do_value(const Transform& t) const;
41 double do_value() const;
42 void do_set_size();
43 bool do_get_full_size(Size& size) const;
44 double m_weight_div;
45 double m_weight_curl;
46 double m_size_scale;
47};
48
49template <typename T>
50class TDivcurlFullCostPlugin: public TFullCostPlugin<T>
51{
52public:
53 TDivcurlFullCostPlugin();
54private:
55 TFullCost<T> *do_create(float weight) const;
56 const std::string do_get_descr() const;
57 float m_div;
58 float m_curl;
59};
60
63
64#endif
A wrapper around the c-array to provide an STL like interface for iterators.
the base class for the TFullCost cost function plug-ins.
Base class for a general cost function.
Transform::Size Size
Typedef of the size of the data considered by this cost function.
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
#define EXPORT
Macro to set visibility to default, resp. __declspec(dllexport)
Definition defines.hh:105
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36