Medical Imaging Interaction Toolkit  2018.4.99-4c24e3cb
Medical Imaging Interaction Toolkit
mitkConstraintCheckerBase.cpp
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
14 
15 
18 {
19  PenaltyValueType result = 0.0;
20  PenaltyArrayType penalties = GetPenalties(parameters);
21 
22  for (PenaltyArrayType::iterator penaltyPos = penalties.begin(); penaltyPos != penalties.end(); ++penaltyPos)
23  {
24  result += *penaltyPos;
25  }
26 
27  return result;
28 };
Superclass::PenaltyValueType PenaltyValueType
virtual PenaltyArrayType GetPenalties(const ParametersType &parameters) const =0
Superclass::PenaltyArrayType PenaltyArrayType
PenaltyValueType GetPenaltySum(const ParametersType &parameters) const override
Superclass::ParametersType ParametersType