Loading...
Searching...
No Matches
itkAdvancedLinearInterpolateImageFunction.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 itkAdvancedLinearInterpolateImageFunction_h
#define itkAdvancedLinearInterpolateImageFunction_h
#include "itkLinearInterpolateImageFunction.h"
namespace itk
{
template <class TInputImage, class TCoordRep = double>
class ITK_TEMPLATE_EXPORT AdvancedLinearInterpolateImageFunction
: public LinearInterpolateImageFunction<TInputImage, TCoordRep>
{
public:
ITK_DISALLOW_COPY_AND_MOVE(AdvancedLinearInterpolateImageFunction);
using Self = AdvancedLinearInterpolateImageFunction;
using Superclass = LinearInterpolateImageFunction<TInputImage, TCoordRep>;
using Pointer = SmartPointer<Self>;
using ConstPointer = SmartPointer<const Self>;
itkTypeMacro(AdvancedLinearInterpolateImageFunction, LinearInterpolateImageFunction);
itkNewMacro(Self);
using typename Superclass::OutputType;
using typename Superclass::InputImageType;
using InputImageSpacingType = typename InputImageType::SpacingType;
using typename Superclass::InputPixelType;
using typename Superclass::RealType;
itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension);
using typename Superclass::IndexType;
using typename Superclass::ContinuousIndexType;
using ContinuousIndexValueType = typename ContinuousIndexType::ValueType;
using CovariantVectorType = CovariantVector<OutputType, Self::ImageDimension>;
CovariantVectorType
EvaluateDerivativeAtContinuousIndex(const ContinuousIndexType & x) const;
void
EvaluateValueAndDerivativeAtContinuousIndex(const ContinuousIndexType & x,
OutputType & value,
CovariantVectorType & deriv) const
{
return this->EvaluateValueAndDerivativeOptimized(Dispatch<ImageDimension>(), x, value, deriv);
}
protected:
AdvancedLinearInterpolateImageFunction() = default;
~AdvancedLinearInterpolateImageFunction() override = default;
private:
struct DispatchBase
{};
template <unsigned int>
struct Dispatch : public DispatchBase
{};
void
EvaluateValueAndDerivativeOptimized(const Dispatch<2> &,
const ContinuousIndexType & x,
OutputType & value,
CovariantVectorType & deriv) const;
void
EvaluateValueAndDerivativeOptimized(const Dispatch<3> &,
const ContinuousIndexType & x,
OutputType & value,
CovariantVectorType & deriv) const;
void
EvaluateValueAndDerivativeOptimized(const DispatchBase &,
const ContinuousIndexType & x,
OutputType & value,
CovariantVectorType & deriv) const
{
return this->EvaluateValueAndDerivativeUnOptimized(x, value, deriv);
}
void
EvaluateValueAndDerivativeUnOptimized(const ContinuousIndexType &, OutputType &, CovariantVectorType &) const
{
itkExceptionMacro("ERROR: EvaluateValueAndDerivativeAtContinuousIndex() is not implemented for this dimension ("
<< ImageDimension << ").");
}
};
} // end namespace itk
#ifndef ITK_MANUAL_INSTANTIATION
# include "itkAdvancedLinearInterpolateImageFunction.hxx"
#endif
#endif
itk::AdvancedLinearInterpolateImageFunction::AdvancedLinearInterpolateImageFunction
AdvancedLinearInterpolateImageFunction()=default
itk::AdvancedLinearInterpolateImageFunction::itkStaticConstMacro
itkStaticConstMacro(ImageDimension, unsigned int, Superclass::ImageDimension)
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::ContinuousIndexValueType
typename ContinuousIndexType::ValueType ContinuousIndexValueType
Definition itkAdvancedLinearInterpolateImageFunction.h:102
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::EvaluateValueAndDerivativeOptimized
void EvaluateValueAndDerivativeOptimized(const Dispatch< 2 > &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::CovariantVectorType
CovariantVector< OutputType, Self::ImageDimension > CovariantVectorType
Definition itkAdvancedLinearInterpolateImageFunction.h:105
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::ConstPointer
SmartPointer< const Self > ConstPointer
Definition itkAdvancedLinearInterpolateImageFunction.h:73
itk::AdvancedLinearInterpolateImageFunction::EvaluateValueAndDerivativeOptimized
void EvaluateValueAndDerivativeOptimized(const Dispatch< 3 > &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
itk::AdvancedLinearInterpolateImageFunction::EvaluateValueAndDerivativeAtContinuousIndex
void EvaluateValueAndDerivativeAtContinuousIndex(const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
Definition itkAdvancedLinearInterpolateImageFunction.h:113
itk::AdvancedLinearInterpolateImageFunction::~AdvancedLinearInterpolateImageFunction
~AdvancedLinearInterpolateImageFunction() override=default
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::InputImageSpacingType
typename InputImageType::SpacingType InputImageSpacingType
Definition itkAdvancedLinearInterpolateImageFunction.h:86
itk::AdvancedLinearInterpolateImageFunction::ITK_DISALLOW_COPY_AND_MOVE
ITK_DISALLOW_COPY_AND_MOVE(AdvancedLinearInterpolateImageFunction)
itk::AdvancedLinearInterpolateImageFunction::EvaluateDerivativeAtContinuousIndex
CovariantVectorType EvaluateDerivativeAtContinuousIndex(const ContinuousIndexType &x) const
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::Pointer
SmartPointer< Self > Pointer
Definition itkAdvancedLinearInterpolateImageFunction.h:72
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::EvaluateValueAndDerivativeUnOptimized
void EvaluateValueAndDerivativeUnOptimized(const ContinuousIndexType &, OutputType &, CovariantVectorType &) const
Definition itkAdvancedLinearInterpolateImageFunction.h:160
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::Superclass
LinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType > Superclass
Definition itkAdvancedLinearInterpolateImageFunction.h:71
itk::AdvancedLinearInterpolateImageFunction::EvaluateValueAndDerivativeOptimized
void EvaluateValueAndDerivativeOptimized(const DispatchBase &, const ContinuousIndexType &x, OutputType &value, CovariantVectorType &deriv) const
Definition itkAdvancedLinearInterpolateImageFunction.h:149
itk::AdvancedLinearInterpolateImageFunction< MovingImageType, CoordinateRepresentationType >::Self
AdvancedLinearInterpolateImageFunction Self
Definition itkAdvancedLinearInterpolateImageFunction.h:70
itk
Definition itkAdvancedImageToImageMetric.h:43

Generated on 1768596610 for elastix by 1.15.0 |