Loading...
Searching...
No Matches
elxComponentInstaller.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 elxComponentInstaller_h
#define elxComponentInstaller_h
#include "elxInstallFunctions.h"
#include "elxPrepareImageTypeSupport.h" // For ElastixTypedef.
#include "elxSupportedImageTypes.h" // For NrOfSupportedImageTypes.
namespace elastix
{
template <template <class TElastix> class TComponent, unsigned VIndex = 1>
class ComponentInstaller
{
public:
static int
DO(ComponentDatabase * cdb)
{
using ElastixType = typename ElastixTypedef<VIndex>::ElastixType;
const auto name = TComponent<ElastixType>::elxGetClassNameStatic();
const int dummy = InstallFunctions<TComponent<ElastixType>>::InstallComponent(name, VIndex, cdb);
if (ElastixTypedef<VIndex + 1>::IsDefined)
{
return ComponentInstaller<TComponent, VIndex + 1>::DO(cdb);
}
return dummy;
}
};
template <template <class TElastix> class TComponent>
class ComponentInstaller<TComponent, NrOfSupportedImageTypes + 1>
{
public:
static int
DO(ComponentDatabase * )
{
return 0;
}
};
} // namespace elastix
#endif
elastix::ComponentDatabase
The ComponentDatabase class is a class that stores the New() functions of all components.
Definition elxComponentDatabase.h:53
elastix::ComponentInstaller< TComponent, NrOfSupportedImageTypes+1 >::DO
static int DO(ComponentDatabase *)
Definition elxComponentInstaller.h:55
elastix::ComponentInstaller
Definition elxComponentInstaller.h:33
elastix::ComponentInstaller::DO
static int DO(ComponentDatabase *cdb)
Definition elxComponentInstaller.h:36
elastix::ElastixTypedef::IsDefined
static constexpr bool IsDefined
Definition elxPrepareImageTypeSupport.h:45
elastix::ElastixTypedef::ElastixType
::itk::Object ElastixType
Definition elxPrepareImageTypeSupport.h:39
elastix::InstallFunctions
A class with functions that are used to install elastix components.
Definition elxInstallFunctions.h:47
elxInstallFunctions.h
elxPrepareImageTypeSupport.h
elxSupportedImageTypes.h
elastix
Definition elxDefaultConstruct.h:25
elastix::NrOfSupportedImageTypes
const unsigned int NrOfSupportedImageTypes
Definition elxSupportedImageTypes.h:53

Generated on 1768596610 for elastix by 1.15.0 |