Loading...
Searching...
No Matches
elxBaseComponent.h
Go to the documentation of this file.
/*=========================================================================
*
* Copyright UMC Utrecht 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 elxBaseComponent_h
#define elxBaseComponent_h
#include "itkMacro.h" // itkTypeMacroNoParent
#include <string>
namespace elastix
{
class BaseComponent
{
public:
ITK_DISALLOW_COPY_AND_MOVE(BaseComponent);
virtual int
BeforeAllBase()
{
return 0;
}
virtual int
BeforeAll()
{
return 0;
}
virtual void
BeforeRegistrationBase()
{}
virtual void
BeforeEachResolutionBase()
{}
virtual void
AfterEachResolutionBase()
{}
virtual void
AfterEachIterationBase()
{}
virtual void
AfterRegistrationBase()
{}
virtual void
BeforeRegistration()
{}
virtual void
BeforeEachResolution()
{}
virtual void
AfterEachResolution()
{}
virtual void
AfterEachIteration()
{}
virtual void
AfterRegistration()
{}
virtual const char *
elxGetClassName() const;
itkTypeMacroNoParent(BaseComponent);
void
SetComponentLabel(const char * label, unsigned int idx);
const char *
GetComponentLabel() const;
static bool
IsElastixLibrary();
static void
InitializeElastixExecutable();
template <typename TBaseComponent>
static auto
AsITKBaseType(TBaseComponent * const baseComponent) -> decltype(baseComponent->GetAsITKBaseType())
{
return (baseComponent == nullptr) ? nullptr : baseComponent->GetAsITKBaseType();
}
protected:
BaseComponent() = default;
virtual ~BaseComponent() = default;
private:
std::string m_ComponentLabel;
};
} // end namespace elastix
namespace elx = elastix;
#endif // end #ifndef elxBaseComponent_h
elastix::BaseComponent::SetComponentLabel
void SetComponentLabel(const char *label, unsigned int idx)
elastix::BaseComponent::AfterRegistration
virtual void AfterRegistration()
Definition elxBaseComponent.h:116
elastix::BaseComponent::elxGetClassName
virtual const char * elxGetClassName() const
elastix::BaseComponent::AfterEachResolutionBase
virtual void AfterEachResolutionBase()
Definition elxBaseComponent.h:88
elastix::BaseComponent::BeforeRegistrationBase
virtual void BeforeRegistrationBase()
Definition elxBaseComponent.h:82
elastix::BaseComponent::BaseComponent
BaseComponent()=default
elastix::BaseComponent::BeforeRegistration
virtual void BeforeRegistration()
Definition elxBaseComponent.h:104
elastix::BaseComponent::BeforeAll
virtual int BeforeAll()
Definition elxBaseComponent.h:70
elastix::BaseComponent::BeforeEachResolutionBase
virtual void BeforeEachResolutionBase()
Definition elxBaseComponent.h:85
elastix::BaseComponent::InitializeElastixExecutable
static void InitializeElastixExecutable()
elastix::BaseComponent::IsElastixLibrary
static bool IsElastixLibrary()
elastix::BaseComponent::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(BaseComponent)
elastix::BaseComponent::BeforeAllBase
virtual int BeforeAllBase()
Definition elxBaseComponent.h:65
elastix::BaseComponent::~BaseComponent
virtual ~BaseComponent()=default
elastix::BaseComponent::GetComponentLabel
const char * GetComponentLabel() const
elastix::BaseComponent::AfterEachIteration
virtual void AfterEachIteration()
Definition elxBaseComponent.h:113
elastix::BaseComponent::BeforeEachResolution
virtual void BeforeEachResolution()
Definition elxBaseComponent.h:107
elastix::BaseComponent::m_ComponentLabel
std::string m_ComponentLabel
Definition elxBaseComponent.h:164
elastix::BaseComponent::AfterEachResolution
virtual void AfterEachResolution()
Definition elxBaseComponent.h:110
elastix::BaseComponent::AsITKBaseType
static auto AsITKBaseType(TBaseComponent *const baseComponent) -> decltype(baseComponent->GetAsITKBaseType())
Definition elxBaseComponent.h:154
elastix::BaseComponent::AfterEachIterationBase
virtual void AfterEachIterationBase()
Definition elxBaseComponent.h:91
elastix::BaseComponent::itkTypeMacroNoParent
itkTypeMacroNoParent(BaseComponent)
elastix::BaseComponent::AfterRegistrationBase
virtual void AfterRegistrationBase()
Definition elxBaseComponent.h:94
elastix
Definition elxDefaultConstruct.h:25

Generated on 1768596610 for elastix by 1.15.0 |