selxGDOptimizer3rdPartyComponent.h 2.46 KB
Newer Older
Floris Berendsen's avatar
Floris Berendsen committed
1
2
/*=========================================================================
 *
3
 *  Copyright Leiden University Medical Center, Erasmus University Medical
Floris Berendsen's avatar
Floris Berendsen committed
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *  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.
 *
 *=========================================================================*/

20
21
22
#ifndef GDOptimizer3rdPartyComponent_h
#define GDOptimizer3rdPartyComponent_h

23
#include "selxSuperElastixComponent.h"
24
#include "selxExamplesInterfaces.h"
25
26
#include "selxExample3rdPartyCode.h"
#include "selxMetric3rdPartyWrapper.h"
27
#include <string.h>
28

Floris Berendsen's avatar
Floris Berendsen committed
29
namespace selx
30
{
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
class GDOptimizer3rdPartyComponent :
  public SuperElastixComponent<
  Accepting< MetricValueInterface, MetricDerivativeInterface >,
  Providing< OptimizerUpdateInterface >
  >
{
public:

  /** Standard class typedefs. */
  typedef GDOptimizer3rdPartyComponent    Self;
  typedef ComponentBase                   Superclass;
  typedef itk::SmartPointer< Self >       Pointer;
  typedef itk::SmartPointer< const Self > ConstPointer;

  /** New macro for creation of through the object factory. */
  itkNewMacro( Self );

  /** Run-time type information (and related methods). */
  itkTypeMacro( GDOptimizer3rdPartyComponent, Superclass );
50

51
52
53
54
55
56
  GDOptimizer3rdPartyComponent();
  virtual ~GDOptimizer3rdPartyComponent();
  Example3rdParty::GDOptimizer3rdParty * theImplementation;
  Metric3rdPartyWrapper *                MetricObject;
  //virtual int ConnectFrom(const char *, ComponentBase*);
  virtual int Set( MetricValueInterface * ) override;
57

58
  virtual int Set( MetricDerivativeInterface * ) override;
59

60
  virtual int Update() override;
61

62
63
  //virtual bool MeetsCriteria(const CriteriaType &criteria);
  virtual bool MeetsCriterion( const CriterionType & criterion ) override;
64

65
66
67
  //static const char * GetName() { return "GDOptimizer3rdPartyComponent"; } ;
  static const char * GetDescription() { return "GD Optimizer 3rd Party Component"; }
};
Floris Berendsen's avatar
Floris Berendsen committed
68
} //end namespace selx
69
#endif // #define GDOptimizer3rdPartyComponent_h