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

23
24
#include "selxComponentBase.h"
#include "selxInterfaces.hxx"
25
26
27
#include "Example4thPartyCode.h"
#include "Metric4thPartyWrapper.h"

Floris Berendsen's avatar
Floris Berendsen committed
28
namespace selx
29
30
{
  // wrapping into components: 
31
32
33
  class GDOptimizer4thPartyComponent : 
    public Implements <
    Accepting< MetricValueInterface >,
34
    Providing < OptimizerUpdateInterface, ConflictinUpdateInterface >
35
36
    >

37
38
  {
  public:
39
40
41
42
43
44
45
46
47
48
49
50
    /** Standard class typedefs. */
    typedef GDOptimizer4thPartyComponent                        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(GDOptimizer4thPartyComponent, Superclass);

51
    GDOptimizer4thPartyComponent();
52
    virtual ~GDOptimizer4thPartyComponent();
53
54
    Example4thParty::GDOptimizer4thParty* theImplementation;
    Metric4thPartyWrapper* MetricObject;
55
    //virtual int ConnectFrom(const char *, ComponentBase*);
56
57
    virtual int Set(MetricValueInterface*) override;
    virtual int Update() override;
58
59
60

    //template <class ConflictinUpdateInterface> virtual int Update() { return 5; };
    // "error" : member function templates cannot be virtual
61
    virtual int Update(ConflictinUpdateInterface*) override { return 5; };
62
    //virtual bool MeetsCriteria(const CriteriaType &criteria);
63
    virtual bool MeetsCriterion(const CriterionType &criterion) override;
64
    //static const char * GetName(){ return "GDOptimizer4thPartyComponent"; };
Floris Berendsen's avatar
Floris Berendsen committed
65
    static const char * GetDescription(){ return "GD Optimizer 4th Party Component"; };
66
67
  };

Floris Berendsen's avatar
Floris Berendsen committed
68
} //end namespace selx
69
#endif // #define GDOptimizer4thPartyComponent_h