selxItkGradientDescentOptimizerv4.h 2.59 KB
Newer Older
1
2
/*=========================================================================
 *
3
 *  Copyright Leiden University Medical Center, Erasmus University Medical
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
 *  Center and contributors
 *
 *  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.txt
 *
 *  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 selxItkGradientDescentOptimizerv4Component_h
#define selxItkGradientDescentOptimizerv4Component_h

23
24
#include "selxComponentBase.h"
#include "selxInterfaces.h"
25
26
27
28
29
#include "itkGradientDescentOptimizerv4.h"
#include <string.h>
#include "selxMacro.h"
namespace selx
{
30
31
32
33
template< class InternalComputationValueType >
class ItkGradientDescentOptimizerv4Component :
  public SuperElastixComponent<
  Accepting< >,
34
  Providing< itkOptimizerv4Interface< InternalComputationValueType > >
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
  >
{
public:

  selxNewMacro( ItkGradientDescentOptimizerv4Component, ComponentBase );

  //itkStaticConstMacro(Dimensionality, unsigned int, Dimensionality);

  ItkGradientDescentOptimizerv4Component();
  virtual ~ItkGradientDescentOptimizerv4Component();

  /**  Type of the optimizer. */
  typedef typename itk::ObjectToObjectOptimizerBaseTemplate< InternalComputationValueType > OptimizerType;
  typedef typename OptimizerType::Pointer                                                   Optimizerv4Pointer;

  typedef typename itk::GradientDescentOptimizerv4Template< InternalComputationValueType > GradientDescentOptimizerv4Type;
51

52
  virtual Optimizerv4Pointer GetItkOptimizerv4() override;
53

54
  virtual bool MeetsCriterion( const ComponentBase::CriterionType & criterion ) override;
55

56
57
  //static const char * GetName() { return "ItkGradientDescentOptimizerv4"; } ;
  static const char * GetDescription() { return "ItkGradientDescentOptimizerv4 Component"; }
58

59
private:
60

61
  typename GradientDescentOptimizerv4Type::Pointer m_Optimizer;
62

63
protected:
64

65
66
67
  /* The following struct returns the string name of computation type */
  /* default implementation */
};
68
69
70
71
} //end namespace selx
#ifndef ITK_MANUAL_INSTANTIATION
#include "selxItkGradientDescentOptimizerv4.hxx"
#endif
72
#endif // #define selxItkGradientDescentOptimizerv4Component_h