Loading...
Searching...
No Matches
elxRegistrationBase.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 elxRegistrationBase_h
#define elxRegistrationBase_h
#include "elxMacro.h"
#include "elxBaseComponentSE.h"
#include "itkMultiResolutionImageRegistrationMethod2.h"
#include "itkImageMaskSpatialObject.h"
#include "itkErodeMaskImageFilter.h"
namespace elastix
{
template <class TElastix>
class ITK_TEMPLATE_EXPORT RegistrationBase : public BaseComponentSE<TElastix>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(RegistrationBase);
using Self = RegistrationBase;
using Superclass = BaseComponentSE<TElastix>;
itkTypeMacro(RegistrationBase, BaseComponentSE);
using typename Superclass::ElastixType;
using typename Superclass::RegistrationType;
using FixedImageType = typename ElastixType::FixedImageType;
using MovingImageType = typename ElastixType::MovingImageType;
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
using ITKBaseType = itk::MultiResolutionImageRegistrationMethod2<FixedImageType, MovingImageType>;
using UseMaskErosionArrayType = std::vector<bool>;
ITKBaseType *
GetAsITKBaseType()
{
return &(this->GetSelf());
}
const ITKBaseType *
GetAsITKBaseType() const
{
return &(this->GetSelf());
}
virtual bool
ReadMaskParameters(UseMaskErosionArrayType & useMaskErosionArray,
const unsigned int nrOfMasks,
const std::string & whichMask,
const unsigned int level) const;
protected:
RegistrationBase() = default;
~RegistrationBase() override = default;
using MaskPixelType = typename ElastixType::MaskPixelType;
using FixedMaskImageType = typename ElastixType::FixedMaskType;
using MovingMaskImageType = typename ElastixType::MovingMaskType;
using FixedMaskImagePointer = typename FixedMaskImageType::Pointer;
using MovingMaskImagePointer = typename MovingMaskImageType::Pointer;
using FixedMaskSpatialObjectType = itk::ImageMaskSpatialObject<Self::FixedImageDimension>;
using MovingMaskSpatialObjectType = itk::ImageMaskSpatialObject<Self::MovingImageDimension>;
using FixedMaskSpatialObjectPointer = typename FixedMaskSpatialObjectType::Pointer;
using MovingMaskSpatialObjectPointer = typename MovingMaskSpatialObjectType::Pointer;
using FixedImagePyramidType = typename ITKBaseType::FixedImagePyramidType;
using MovingImagePyramidType = typename ITKBaseType::MovingImagePyramidType;
using FixedMaskErodeFilterType = itk::ErodeMaskImageFilter<FixedMaskImageType>;
using FixedMaskErodeFilterPointer = typename FixedMaskErodeFilterType::Pointer;
using MovingMaskErodeFilterType = itk::ErodeMaskImageFilter<MovingMaskImageType>;
using MovingMaskErodeFilterPointer = typename MovingMaskErodeFilterType::Pointer;
FixedMaskSpatialObjectPointer
GenerateFixedMaskSpatialObject(const FixedMaskImageType * maskImage,
bool useMaskErosion,
const FixedImagePyramidType * pyramid,
unsigned int level) const;
MovingMaskSpatialObjectPointer
GenerateMovingMaskSpatialObject(const MovingMaskImageType * maskImage,
bool useMaskErosion,
const MovingImagePyramidType * pyramid,
unsigned int level) const;
private:
elxDeclarePureVirtualGetSelfMacro(ITKBaseType);
};
} // end namespace elastix
#ifndef ITK_MANUAL_INSTANTIATION
# include "elxRegistrationBase.hxx"
#endif
#endif // end #ifndef elxRegistrationBase_h
elastix::BaseComponentSE::BaseComponentSE
BaseComponentSE()=default
elastix::BaseComponentSE::RegistrationType
typename ElastixType::RegistrationBaseType RegistrationType
Definition elxBaseComponentSE.h:62
elastix::BaseComponentSE::ElastixType
TElastix ElastixType
Definition elxBaseComponentSE.h:57
elastix::BaseComponentSE::GetSelf
virtual const itk::Object & GetSelf() const =0
elastix::RegistrationBase::GenerateFixedMaskSpatialObject
FixedMaskSpatialObjectPointer GenerateFixedMaskSpatialObject(const FixedMaskImageType *maskImage, bool useMaskErosion, const FixedImagePyramidType *pyramid, unsigned int level) const
elastix::RegistrationBase::GetAsITKBaseType
const ITKBaseType * GetAsITKBaseType() const
Definition elxRegistrationBase.h:116
elastix::RegistrationBase::Superclass
BaseComponentSE< TElastix > Superclass
Definition elxRegistrationBase.h:82
elastix::RegistrationBase::MaskPixelType
typename ElastixType::MaskPixelType MaskPixelType
Definition elxRegistrationBase.h:155
elastix::RegistrationBase::FixedMaskSpatialObjectType
itk::ImageMaskSpatialObject< Self::FixedImageDimension > FixedMaskSpatialObjectType
Definition elxRegistrationBase.h:160
elastix::RegistrationBase::MovingImagePyramidType
typename ITKBaseType::MovingImagePyramidType MovingImagePyramidType
Definition elxRegistrationBase.h:166
elastix::RegistrationBase::itkStaticConstMacro
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
elastix::RegistrationBase::FixedImagePyramidType
typename ITKBaseType::FixedImagePyramidType FixedImagePyramidType
Definition elxRegistrationBase.h:165
elastix::RegistrationBase::MovingMaskErodeFilterPointer
typename MovingMaskErodeFilterType::Pointer MovingMaskErodeFilterPointer
Definition elxRegistrationBase.h:172
elastix::RegistrationBase::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(RegistrationBase)
elastix::RegistrationBase::MovingMaskSpatialObjectPointer
typename MovingMaskSpatialObjectType::Pointer MovingMaskSpatialObjectPointer
Definition elxRegistrationBase.h:163
elastix::RegistrationBase::elxDeclarePureVirtualGetSelfMacro
elxDeclarePureVirtualGetSelfMacro(ITKBaseType)
elastix::RegistrationBase::~RegistrationBase
~RegistrationBase() override=default
elastix::RegistrationBase::FixedMaskSpatialObjectPointer
typename FixedMaskSpatialObjectType::Pointer FixedMaskSpatialObjectPointer
Definition elxRegistrationBase.h:162
elastix::RegistrationBase::FixedMaskImagePointer
typename FixedMaskImageType::Pointer FixedMaskImagePointer
Definition elxRegistrationBase.h:158
elastix::RegistrationBase::ReadMaskParameters
virtual bool ReadMaskParameters(UseMaskErosionArrayType &useMaskErosionArray, const unsigned int nrOfMasks, const std::string &whichMask, const unsigned int level) const
elastix::RegistrationBase::FixedImageType
typename ElastixType::FixedImageType FixedImageType
Definition elxRegistrationBase.h:92
elastix::RegistrationBase::MovingMaskSpatialObjectType
itk::ImageMaskSpatialObject< Self::MovingImageDimension > MovingMaskSpatialObjectType
Definition elxRegistrationBase.h:161
elastix::RegistrationBase::MovingMaskImagePointer
typename MovingMaskImageType::Pointer MovingMaskImagePointer
Definition elxRegistrationBase.h:159
elastix::RegistrationBase::RegistrationBase
RegistrationBase()=default
elastix::RegistrationBase::FixedMaskErodeFilterPointer
typename FixedMaskErodeFilterType::Pointer FixedMaskErodeFilterPointer
Definition elxRegistrationBase.h:170
elastix::RegistrationBase::GetAsITKBaseType
ITKBaseType * GetAsITKBaseType()
Definition elxRegistrationBase.h:108
elastix::RegistrationBase::UseMaskErosionArrayType
std::vector< bool > UseMaskErosionArrayType
Definition elxRegistrationBase.h:104
elastix::RegistrationBase::MovingMaskErodeFilterType
itk::ErodeMaskImageFilter< MovingMaskImageType > MovingMaskErodeFilterType
Definition elxRegistrationBase.h:171
elastix::RegistrationBase::MovingMaskImageType
typename ElastixType::MovingMaskType MovingMaskImageType
Definition elxRegistrationBase.h:157
elastix::RegistrationBase::itkStaticConstMacro
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
elastix::RegistrationBase::MovingImageType
typename ElastixType::MovingImageType MovingImageType
Definition elxRegistrationBase.h:93
elastix::RegistrationBase::Self
RegistrationBase Self
Definition elxRegistrationBase.h:81
elastix::RegistrationBase::ITKBaseType
itk::MultiResolutionImageRegistrationMethod2< FixedImageType, MovingImageType > ITKBaseType
Definition elxRegistrationBase.h:101
elastix::RegistrationBase::GenerateMovingMaskSpatialObject
MovingMaskSpatialObjectPointer GenerateMovingMaskSpatialObject(const MovingMaskImageType *maskImage, bool useMaskErosion, const MovingImagePyramidType *pyramid, unsigned int level) const
elastix::RegistrationBase::FixedMaskErodeFilterType
itk::ErodeMaskImageFilter< FixedMaskImageType > FixedMaskErodeFilterType
Definition elxRegistrationBase.h:169
elastix::RegistrationBase::FixedMaskImageType
typename ElastixType::FixedMaskType FixedMaskImageType
Definition elxRegistrationBase.h:156
itk::ErodeMaskImageFilter
Definition itkErodeMaskImageFilter.h:58
itk::ErodeMaskImageFilter< FixedMaskImageType >::Pointer
SmartPointer< Self > Pointer
Definition itkErodeMaskImageFilter.h:65
itk::MultiResolutionImageRegistrationMethod2
Base class for multi-resolution image registration methods.
Definition itkMultiResolutionImageRegistrationMethod2.h:98
itk::MultiResolutionImageRegistrationMethod2< FixedImageType, MovingImageType >::FixedImagePyramidType
MultiResolutionPyramidImageFilter< FixedImageType, FixedImageType > FixedImagePyramidType
Definition itkMultiResolutionImageRegistrationMethod2.h:147
itk::MultiResolutionImageRegistrationMethod2< FixedImageType, MovingImageType >::MovingImagePyramidType
MultiResolutionPyramidImageFilter< MovingImageType, MovingImageType > MovingImagePyramidType
Definition itkMultiResolutionImageRegistrationMethod2.h:151
elxBaseComponentSE.h
elxMacro.h
itkErodeMaskImageFilter.h
itkMultiResolutionImageRegistrationMethod2.h
elastix
Definition elxDefaultConstruct.h:25

Generated on 1768596610 for elastix by 1.15.0 |