template/multicost.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_internal_multicost_hh
#define mia_internal_multicost_hh
#include <mia/template/fullcost.hh>
NS_MIA_BEGIN
template <typename Transform>
class EXPORT_HANDLER TFullCostList : public TFullCost<Transform>
{
public:
TFullCostList();
typedef typename TFullCost<Transform>::Pointer Pointer;
typedef typename TFullCost<Transform>::Size Size;
void push(typename TFullCost<Transform>::Pointer cost);
private:
bool do_has(const char *property) const;
virtual double do_evaluate(const Transform& t, CDoubleVector& gradient) const;
double do_value(const Transform& t) const;
double do_value() const;
void do_set_size();
void do_reinit();
bool do_get_full_size(Size& size) const;
std::vector<typename TFullCost<Transform>::Pointer> m_costs;
};
NS_MIA_END
#endif
TFullCostList< C2DTransformation >::Size
TFullCost< C2DTransformation >::Size Size
Definition template/multicost.hh:45
TFullCostList< C2DTransformation >::Pointer
TFullCost< C2DTransformation >::Pointer Pointer
Definition template/multicost.hh:42
TFullCostList::push
void push(typename TFullCost< Transform >::Pointer cost)
TFullCostList::TFullCostList
TFullCostList()
TFullCost::TFullCost
TFullCost(double weight)
TFullCost::Pointer
std::shared_ptr< TFullCost< Transform > > Pointer
The shatred pointer type for this cost function.
Definition template/fullcost.hh:63
TFullCost::Size
Transform::Size Size
Typedef of the size of the data considered by this cost function.
Definition template/fullcost.hh:48
EXPORT_HANDLER
#define EXPORT_HANDLER
Definition core/cost.hh:32
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
CDoubleVector
TCArrayWrapper< double > CDoubleVector
Definition core/vector.hh:266
fullcost.hh