Loading...
Searching...
No Matches
itkImageToImageMetricWithFeatures.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 itkImageToImageMetricWithFeatures_h
#define itkImageToImageMetricWithFeatures_h
#include "itkAdvancedImageToImageMetric.h"
#include "itkInterpolateImageFunction.h"
namespace itk
{
template <class TFixedImage,
class TMovingImage,
class TFixedFeatureImage = TFixedImage,
class TMovingFeatureImage = TMovingImage>
class ITK_TEMPLATE_EXPORT ImageToImageMetricWithFeatures : public AdvancedImageToImageMetric<TFixedImage, TMovingImage>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetricWithFeatures);
using Self = ImageToImageMetricWithFeatures;
using Superclass = AdvancedImageToImageMetric<TFixedImage, TMovingImage>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkTypeMacro(ImageToImageMetricWithFeatures, AdvancedImageToImageMetric);
using typename Superclass::CoordinateRepresentationType;
using typename Superclass::MovingImageType;
using typename Superclass::MovingImagePixelType;
using typename Superclass::MovingImageConstPointer;
using typename Superclass::FixedImageType;
using typename Superclass::FixedImageConstPointer;
using typename Superclass::FixedImageRegionType;
using typename Superclass::TransformType;
using typename Superclass::TransformPointer;
using typename Superclass::InputPointType;
using typename Superclass::OutputPointType;
using typename Superclass::TransformParametersType;
using typename Superclass::TransformJacobianType;
using typename Superclass::InterpolatorType;
using typename Superclass::InterpolatorPointer;
using typename Superclass::RealType;
using typename Superclass::GradientPixelType;
using typename Superclass::GradientImageType;
using typename Superclass::GradientImagePointer;
using typename Superclass::FixedImageMaskType;
using typename Superclass::FixedImageMaskPointer;
using typename Superclass::MovingImageMaskType;
using typename Superclass::MovingImageMaskPointer;
using typename Superclass::MeasureType;
using typename Superclass::DerivativeType;
using typename Superclass::ParametersType;
using typename Superclass::FixedImagePixelType;
using typename Superclass::MovingImageRegionType;
using typename Superclass::ImageSamplerType;
using typename Superclass::ImageSamplerPointer;
using typename Superclass::ImageSampleContainerType;
using typename Superclass::ImageSampleContainerPointer;
using typename Superclass::InternalMaskPixelType;
using typename Superclass::InternalMovingImageMaskType;
using typename Superclass::MovingImageMaskInterpolatorType;
using typename Superclass::FixedImageLimiterType;
using typename Superclass::MovingImageLimiterType;
using typename Superclass::FixedImageLimiterOutputType;
using typename Superclass::MovingImageLimiterOutputType;
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension);
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension);
using FixedFeatureImageType = TFixedFeatureImage;
using FixedFeatureImagePointer = typename FixedFeatureImageType::Pointer;
using MovingFeatureImageType = TMovingFeatureImage;
using MovingFeatureImagePointer = typename MovingFeatureImageType::Pointer;
using FixedFeatureImageVectorType = std::vector<FixedFeatureImagePointer>;
using MovingFeatureImageVectorType = std::vector<MovingFeatureImagePointer>;
using FixedFeatureInterpolatorType = InterpolateImageFunction<FixedFeatureImageType, double>;
using MovingFeatureInterpolatorType = InterpolateImageFunction<MovingFeatureImageType, double>;
using FixedFeatureInterpolatorPointer = typename FixedFeatureInterpolatorType::Pointer;
using MovingFeatureInterpolatorPointer = typename MovingFeatureInterpolatorType::Pointer;
using FixedFeatureInterpolatorVectorType = std::vector<FixedFeatureInterpolatorPointer>;
using MovingFeatureInterpolatorVectorType = std::vector<MovingFeatureInterpolatorPointer>;
void
SetNumberOfFixedFeatureImages(unsigned int arg);
itkGetConstMacro(NumberOfFixedFeatureImages, unsigned int);
void
SetFixedFeatureImage(unsigned int i, FixedFeatureImageType * im);
void
SetFixedFeatureImage(FixedFeatureImageType * im)
{
this->SetFixedFeatureImage(0, im);
}
const FixedFeatureImageType *
GetFixedFeatureImage(unsigned int i) const;
const FixedFeatureImageType *
GetFixedFeatureImage() const
{
return this->GetFixedFeatureImage(0);
}
void
SetFixedFeatureInterpolator(unsigned int i, FixedFeatureInterpolatorType * interpolator);
void
SetFixedFeatureInterpolator(FixedFeatureInterpolatorType * interpolator)
{
this->SetFixedFeatureInterpolator(0, interpolator);
}
const FixedFeatureInterpolatorType *
GetFixedFeatureInterpolator(unsigned int i) const;
const FixedFeatureInterpolatorType *
GetFixedFeatureInterpolator() const
{
return this->GetFixedFeatureInterpolator(0);
}
void
SetNumberOfMovingFeatureImages(unsigned int arg);
itkGetConstMacro(NumberOfMovingFeatureImages, unsigned int);
void
SetMovingFeatureImage(unsigned int i, MovingFeatureImageType * im);
void
SetMovingFeatureImage(MovingFeatureImageType * im)
{
this->SetMovingFeatureImage(0, im);
}
const MovingFeatureImageType *
GetMovingFeatureImage(unsigned int i) const;
const MovingFeatureImageType *
GetMovingFeatureImage() const
{
return this->GetMovingFeatureImage(0);
}
void
SetMovingFeatureInterpolator(unsigned int i, MovingFeatureInterpolatorType * interpolator);
void
SetMovingFeatureInterpolator(MovingFeatureInterpolatorType * interpolator)
{
this->SetMovingFeatureInterpolator(0, interpolator);
}
const MovingFeatureInterpolatorType *
GetMovingFeatureInterpolator(unsigned int i) const;
const MovingFeatureInterpolatorType *
GetMovingFeatureInterpolator() const
{
return this->GetMovingFeatureInterpolator(0);
}
virtual void
Initialize();
protected:
ImageToImageMetricWithFeatures() = default;
virtual ~ImageToImageMetricWithFeatures() {}
void
PrintSelf(std::ostream & os, Indent indent) const;
using typename Superclass::BSplineInterpolatorType;
using BSplineInterpolatorPointer = typename BSplineInterpolatorType::Pointer;
using BSplineFeatureInterpolatorVectorType = std::vector<BSplineInterpolatorPointer>;
using typename Superclass::FixedImagePointType;
using typename Superclass::MovingImagePointType;
using typename Superclass::MovingImageDerivativeType;
using typename Superclass::MovingImageContinuousIndexType;
unsigned int m_NumberOfFixedFeatureImages{ 0 };
unsigned int m_NumberOfMovingFeatureImages{ 0 };
FixedFeatureImageVectorType m_FixedFeatureImages{};
MovingFeatureImageVectorType m_MovingFeatureImages{};
FixedFeatureInterpolatorVectorType m_FixedFeatureInterpolators{};
MovingFeatureInterpolatorVectorType m_MovingFeatureInterpolators{};
std::vector<bool> m_FeatureInterpolatorsIsBSpline{};
BSplineFeatureInterpolatorVectorType m_MovingFeatureBSplineInterpolators{};
virtual void
CheckForBSplineFeatureInterpolators();
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkImageToImageMetricWithFeatures.hxx"
#endif
#endif // end #ifndef itkImageToImageMetricWithFeatures_h
itk::AdvancedImageToImageMetric::MovingImagePointType
typename TransformType::OutputPointType MovingImagePointType
Definition itkAdvancedImageToImageMetric.h:338
itk::AdvancedImageToImageMetric::ImageSampleContainerPointer
typename ImageSamplerType::OutputVectorContainerPointer ImageSampleContainerPointer
Definition itkAdvancedImageToImageMetric.h:145
itk::AdvancedImageToImageMetric::MovingImageRegionType
typename MovingImageType::RegionType MovingImageRegionType
Definition itkAdvancedImageToImageMetric.h:138
itk::AdvancedImageToImageMetric::FixedImagePixelType
typename FixedImageType::PixelType FixedImagePixelType
Definition itkAdvancedImageToImageMetric.h:137
itk::AdvancedImageToImageMetric::ImageSampleContainerType
typename ImageSamplerType::OutputVectorContainerType ImageSampleContainerType
Definition itkAdvancedImageToImageMetric.h:144
itk::AdvancedImageToImageMetric::FixedImageMaskType
ImageMaskSpatialObject< Self::FixedImageDimension > FixedImageMaskType
Definition itkAdvancedImageToImageMetric.h:124
itk::AdvancedImageToImageMetric::MovingImageMaskPointer
SmartPointer< MovingImageMaskType > MovingImageMaskPointer
Definition itkAdvancedImageToImageMetric.h:128
itk::AdvancedImageToImageMetric::FixedImageLimiterType
LimiterFunctionBase< RealType, FixedImageDimension > FixedImageLimiterType
Definition itkAdvancedImageToImageMetric.h:148
itk::AdvancedImageToImageMetric::AdvancedImageToImageMetric
AdvancedImageToImageMetric()
itk::AdvancedImageToImageMetric::ImageSamplerType
ImageSamplerBase< FixedImageType > ImageSamplerType
Definition itkAdvancedImageToImageMetric.h:142
itk::AdvancedImageToImageMetric::MovingImageDerivativeType
typename BSplineInterpolatorType::CovariantVectorType MovingImageDerivativeType
Definition itkAdvancedImageToImageMetric.h:353
itk::AdvancedImageToImageMetric::MovingImageLimiterType
LimiterFunctionBase< RealType, MovingImageDimension > MovingImageLimiterType
Definition itkAdvancedImageToImageMetric.h:151
itk::AdvancedImageToImageMetric::MovingImageLimiterOutputType
typename MovingImageLimiterType::OutputType MovingImageLimiterOutputType
Definition itkAdvancedImageToImageMetric.h:153
itk::AdvancedImageToImageMetric::FixedImagePointType
typename TransformType::InputPointType FixedImagePointType
Definition itkAdvancedImageToImageMetric.h:337
itk::AdvancedImageToImageMetric::FixedImageLimiterOutputType
typename FixedImageLimiterType::OutputType FixedImageLimiterOutputType
Definition itkAdvancedImageToImageMetric.h:150
itk::AdvancedImageToImageMetric::FixedImageMaskPointer
SmartPointer< FixedImageMaskType > FixedImageMaskPointer
Definition itkAdvancedImageToImageMetric.h:125
itk::AdvancedImageToImageMetric::BSplineInterpolatorType
BSplineInterpolateImageFunction< MovingImageType, CoordinateRepresentationType, double > BSplineInterpolatorType
Definition itkAdvancedImageToImageMetric.h:342
itk::AdvancedImageToImageMetric::ImageSamplerPointer
typename ImageSamplerType::Pointer ImageSamplerPointer
Definition itkAdvancedImageToImageMetric.h:143
itk::AdvancedImageToImageMetric::MovingImageContinuousIndexType
typename InterpolatorType::ContinuousIndexType MovingImageContinuousIndexType
Definition itkAdvancedImageToImageMetric.h:339
itk::AdvancedImageToImageMetric::MovingImageMaskType
ImageMaskSpatialObject< Self::MovingImageDimension > MovingImageMaskType
Definition itkAdvancedImageToImageMetric.h:127
itk::ImageToImageMetricWithFeatures::m_NumberOfMovingFeatureImages
unsigned int m_NumberOfMovingFeatureImages
Definition itkImageToImageMetricWithFeatures.h:240
itk::ImageToImageMetricWithFeatures::m_MovingFeatureImages
MovingFeatureImageVectorType m_MovingFeatureImages
Definition itkImageToImageMetricWithFeatures.h:242
itk::ImageToImageMetricWithFeatures::SetMovingFeatureImage
void SetMovingFeatureImage(unsigned int i, MovingFeatureImageType *im)
itk::ImageToImageMetricWithFeatures::FixedFeatureInterpolatorPointer
typename FixedFeatureInterpolatorType::Pointer FixedFeatureInterpolatorPointer
Definition itkImageToImageMetricWithFeatures.h:113
itk::ImageToImageMetricWithFeatures::FixedFeatureImagePointer
typename FixedFeatureImageType::Pointer FixedFeatureImagePointer
Definition itkImageToImageMetricWithFeatures.h:104
itk::ImageToImageMetricWithFeatures::m_FixedFeatureImages
FixedFeatureImageVectorType m_FixedFeatureImages
Definition itkImageToImageMetricWithFeatures.h:241
itk::ImageToImageMetricWithFeatures::GetMovingFeatureInterpolator
const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator() const
Definition itkImageToImageMetricWithFeatures.h:214
itk::ImageToImageMetricWithFeatures::GetMovingFeatureImage
const MovingFeatureImageType * GetMovingFeatureImage() const
Definition itkImageToImageMetricWithFeatures.h:192
itk::ImageToImageMetricWithFeatures::MovingFeatureImageVectorType
std::vector< MovingFeatureImagePointer > MovingFeatureImageVectorType
Definition itkImageToImageMetricWithFeatures.h:108
itk::ImageToImageMetricWithFeatures::GetMovingFeatureInterpolator
const MovingFeatureInterpolatorType * GetMovingFeatureInterpolator(unsigned int i) const
itk::ImageToImageMetricWithFeatures::SetNumberOfFixedFeatureImages
void SetNumberOfFixedFeatureImages(unsigned int arg)
itk::ImageToImageMetricWithFeatures::Self
ImageToImageMetricWithFeatures Self
Definition itkImageToImageMetricWithFeatures.h:47
itk::ImageToImageMetricWithFeatures::SetFixedFeatureImage
void SetFixedFeatureImage(FixedFeatureImageType *im)
Definition itkImageToImageMetricWithFeatures.h:130
itk::ImageToImageMetricWithFeatures::~ImageToImageMetricWithFeatures
virtual ~ImageToImageMetricWithFeatures()
Definition itkImageToImageMetricWithFeatures.h:226
itk::ImageToImageMetricWithFeatures::Superclass
AdvancedImageToImageMetric< TFixedImage, TMovingImage > Superclass
Definition itkImageToImageMetricWithFeatures.h:48
itk::ImageToImageMetricWithFeatures::itkStaticConstMacro
itkStaticConstMacro(MovingImageDimension, unsigned int, MovingImageType::ImageDimension)
itk::ImageToImageMetricWithFeatures::GetFixedFeatureInterpolator
const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator() const
Definition itkImageToImageMetricWithFeatures.h:163
itk::ImageToImageMetricWithFeatures::SetMovingFeatureInterpolator
void SetMovingFeatureInterpolator(unsigned int i, MovingFeatureInterpolatorType *interpolator)
itk::ImageToImageMetricWithFeatures::m_MovingFeatureInterpolators
MovingFeatureInterpolatorVectorType m_MovingFeatureInterpolators
Definition itkImageToImageMetricWithFeatures.h:244
itk::ImageToImageMetricWithFeatures::CheckForBSplineFeatureInterpolators
virtual void CheckForBSplineFeatureInterpolators()
itk::ImageToImageMetricWithFeatures::SetMovingFeatureImage
void SetMovingFeatureImage(MovingFeatureImageType *im)
Definition itkImageToImageMetricWithFeatures.h:181
itk::ImageToImageMetricWithFeatures::itkStaticConstMacro
itkStaticConstMacro(FixedImageDimension, unsigned int, FixedImageType::ImageDimension)
itk::ImageToImageMetricWithFeatures::GetMovingFeatureImage
const MovingFeatureImageType * GetMovingFeatureImage(unsigned int i) const
itk::ImageToImageMetricWithFeatures::MovingFeatureInterpolatorVectorType
std::vector< MovingFeatureInterpolatorPointer > MovingFeatureInterpolatorVectorType
Definition itkImageToImageMetricWithFeatures.h:116
itk::ImageToImageMetricWithFeatures::FixedFeatureInterpolatorType
InterpolateImageFunction< FixedFeatureImageType, double > FixedFeatureInterpolatorType
Definition itkImageToImageMetricWithFeatures.h:111
itk::ImageToImageMetricWithFeatures::GetFixedFeatureImage
const FixedFeatureImageType * GetFixedFeatureImage() const
Definition itkImageToImageMetricWithFeatures.h:141
itk::ImageToImageMetricWithFeatures::SetNumberOfMovingFeatureImages
void SetNumberOfMovingFeatureImages(unsigned int arg)
itk::ImageToImageMetricWithFeatures::BSplineFeatureInterpolatorVectorType
std::vector< BSplineInterpolatorPointer > BSplineFeatureInterpolatorVectorType
Definition itkImageToImageMetricWithFeatures.h:232
itk::ImageToImageMetricWithFeatures::m_NumberOfFixedFeatureImages
unsigned int m_NumberOfFixedFeatureImages
Definition itkImageToImageMetricWithFeatures.h:239
itk::ImageToImageMetricWithFeatures::SetMovingFeatureInterpolator
void SetMovingFeatureInterpolator(MovingFeatureInterpolatorType *interpolator)
Definition itkImageToImageMetricWithFeatures.h:203
itk::ImageToImageMetricWithFeatures::SetFixedFeatureInterpolator
void SetFixedFeatureInterpolator(unsigned int i, FixedFeatureInterpolatorType *interpolator)
itk::ImageToImageMetricWithFeatures::ImageToImageMetricWithFeatures
ImageToImageMetricWithFeatures()=default
itk::ImageToImageMetricWithFeatures::MovingFeatureInterpolatorPointer
typename MovingFeatureInterpolatorType::Pointer MovingFeatureInterpolatorPointer
Definition itkImageToImageMetricWithFeatures.h:114
itk::ImageToImageMetricWithFeatures::m_FeatureInterpolatorsIsBSpline
std::vector< bool > m_FeatureInterpolatorsIsBSpline
Definition itkImageToImageMetricWithFeatures.h:246
itk::ImageToImageMetricWithFeatures::MovingFeatureImagePointer
typename MovingFeatureImageType::Pointer MovingFeatureImagePointer
Definition itkImageToImageMetricWithFeatures.h:106
itk::ImageToImageMetricWithFeatures::SetFixedFeatureImage
void SetFixedFeatureImage(unsigned int i, FixedFeatureImageType *im)
itk::ImageToImageMetricWithFeatures::FixedFeatureInterpolatorVectorType
std::vector< FixedFeatureInterpolatorPointer > FixedFeatureInterpolatorVectorType
Definition itkImageToImageMetricWithFeatures.h:115
itk::ImageToImageMetricWithFeatures::MovingFeatureImageType
TMovingFeatureImage MovingFeatureImageType
Definition itkImageToImageMetricWithFeatures.h:105
itk::ImageToImageMetricWithFeatures::PrintSelf
void PrintSelf(std::ostream &os, Indent indent) const
itk::ImageToImageMetricWithFeatures::GetFixedFeatureImage
const FixedFeatureImageType * GetFixedFeatureImage(unsigned int i) const
itk::ImageToImageMetricWithFeatures::SetFixedFeatureInterpolator
void SetFixedFeatureInterpolator(FixedFeatureInterpolatorType *interpolator)
Definition itkImageToImageMetricWithFeatures.h:152
itk::ImageToImageMetricWithFeatures::m_FixedFeatureInterpolators
FixedFeatureInterpolatorVectorType m_FixedFeatureInterpolators
Definition itkImageToImageMetricWithFeatures.h:243
itk::ImageToImageMetricWithFeatures::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkImageToImageMetricWithFeatures.h:50
itk::ImageToImageMetricWithFeatures::FixedFeatureImageType
TFixedFeatureImage FixedFeatureImageType
Definition itkImageToImageMetricWithFeatures.h:103
itk::ImageToImageMetricWithFeatures::m_MovingFeatureBSplineInterpolators
BSplineFeatureInterpolatorVectorType m_MovingFeatureBSplineInterpolators
Definition itkImageToImageMetricWithFeatures.h:247
itk::ImageToImageMetricWithFeatures::BSplineInterpolatorPointer
typename BSplineInterpolatorType::Pointer BSplineInterpolatorPointer
Definition itkImageToImageMetricWithFeatures.h:231
itk::ImageToImageMetricWithFeatures::Initialize
virtual void Initialize()
itk::ImageToImageMetricWithFeatures::Pointer
SmartPointer< Self > Pointer
Definition itkImageToImageMetricWithFeatures.h:49
itk::ImageToImageMetricWithFeatures::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetricWithFeatures)
itk::ImageToImageMetricWithFeatures::MovingFeatureInterpolatorType
InterpolateImageFunction< MovingFeatureImageType, double > MovingFeatureInterpolatorType
Definition itkImageToImageMetricWithFeatures.h:112
itk::ImageToImageMetricWithFeatures::FixedFeatureImageVectorType
std::vector< FixedFeatureImagePointer > FixedFeatureImageVectorType
Definition itkImageToImageMetricWithFeatures.h:107
itk::ImageToImageMetricWithFeatures::GetFixedFeatureInterpolator
const FixedFeatureInterpolatorType * GetFixedFeatureInterpolator(unsigned int i) const
itkAdvancedImageToImageMetric.h
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |