ITK
4.3.0
Insight Segmentation and Registration Toolkit
|
#include <itkImageToImageMetricv4.h>
Computes similarity between regions of two images, using two user-supplied transforms, a 'fixed' transform and a 'moving' transform.
Templated over the fixed and moving image types, as well as an optional VirtualImage type to define the virtual domain. The VirtualImage type defaults to TFixedImage.
If the user does not set the virtual domain explicitly, then it is created during the call to Initialize
from the fixed image by copying its information. See ObjectToObjectMetric for more discussion on the virtual domain.
At a minimum, the user must: 1) Set images using SetFixedImage and SetMovingImage. 2) Call Initialize.
Image gradient calculations
Image gradients can be calculated in one of two ways: 1) Using a gradient image filter, by setting Use
[Fixed|Moving]ImageGradientFilter to true. By default this is set as an itkGradientRecursiveGaussianImageFilter, a smoothed gradient filter. A filter uses more memory, because it calculates all gradients at once and stores them in an image. The advantage of pre-calculation is for the fixed image gradients, since they only need be calculated once, and for metrics that need to access image gradients more than once for a particular point. The fixed image gradients are only calculated once when this option is set, during Initialize
. 2) Otherwise, an image gradient calculator based on ImageFunction is used. By default the CentralDifferenceImageFunction is used. This calculation is not smoothed and gives different results than GradientRecursiveGaussianImageFilter. The advantage is that less memory is used. However for the fixed image, it means needlessly computing the image gradients at each iteration of a registration instead of just computing once at the beginning. The user can supply a different function by calling SetFixedImageGradientCalculator and/or SetMovingImageGradientCalculator.
Both image gradient calculation methods are threaded. Generally it is not recommended to use different image gradient methods for the fixed and moving images because the methods return different results.
Image Masks
Image masks are supported using SetMovingImageMask or SetFixedImageMask. If the image mask is sparse, see the comments for use of sparse point sets.
Sparse Sampling
Sparse sampling is performed by supplying an arbitrary point list over which to evaluate the metric. It's presumed that the user will be working in terms of the fixed image domain, and thus the point list is expected to be in the fixed domain. Internally, the points are transformed into the virtual domain as needed.
Vector Images
To support vector images, the class must be declared using the VectorImageToImageMetricTraitsv4 class in the template declaration, as described above. Derived classes must provide special handling for vector pixel types. MeanSquaresImageToImageMetricv4 can be used as an example.
Threading
This class is threaded. Threading is handled by friend classes ImageToImageMetricv4GetValueAndDerivativeThreaderBase and ImageToImageMetricv4GetValueAndDerivativeThreader. Dense and sparse evaluation are handled by template specialization of the ImageToImageMetricv4GetValueAndDerivativeThreader::ThreadedExecution method, in order to iterate over either all points in the virtual space in the case of dense evaluation, or a list of points in the sparse case.
Methods and members of ImageToImageMetricv4 are accessed by the threading class using its m_Associate member, which points to the containing instance of ImageToImageMetricv4.
Pre- and post-processing for threaded operation is handled in ImageToImageMetricv4GetValueAndDerivativeThreaderBase::BeforeThreadedExecution, and ImageToImageMetricv4GetValueAndDerivativeThreaderBase::AfterThreadedExecution, respectively.
Derived classes:
The GetValue method may be overridden to provide better-optimized or otherwise different behavior as needed. Otherwise, the m_ComputeDerivative member should be checked to avoid computing derivatives when the caller has called GetValue(). See GetComputeDerivative() in this class and in this metric's threader class.
Derived classes must derive a threader class from ImageToImageMetricv4GetValueAndDerivativeThreader, from which a DenseGetValueAndDerivativeThreader and SparseGetValueAndDerivativeThreader must be defined. Then,
must be called in the constructor.
The ProcessPoint method of the derived threader must be overriden to provide the metric-specific evaluation.
To access methods and members within the derived metric class from the derived threader class, the user must cast m_Associate to the type of the derived metric class.
See ImageToImageMetricv4Test
for a clear example of what a derived class must implement and do.
Definition at line 169 of file itkImageToImageMetricv4.h.
Static Public Attributes | |
static const DimensionType | FixedImageDimension = Superclass::FixedDimension |
static const DimensionType | MovingImageDimension = Superclass::MovingDimension |
static const DimensionType | VirtualImageDimension = Superclass::VirtualDimension |
Static Public Attributes inherited from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage > | |
static const DimensionType | FixedDimension |
static const DimensionType | MovingDimension |
static const DimensionType | VirtualDimension |
Private Member Functions | |
ImageToImageMetricv4 (const Self &) | |
void | MapFixedSampledPointSetToVirtual (void) |
void | operator= (const Self &) |
Additional Inherited Members | |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool flag) |
typedef SmartPointer<const Self> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::ConstPointer |
Definition at line 177 of file itkImageToImageMetricv4.h.
typedef Superclass::CoordinateRepresentationType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::CoordinateRepresentationType |
Type used for representing parameter values
Definition at line 186 of file itkImageToImageMetricv4.h.
typedef MetricTraits::DefaultFixedImageGradientCalculator itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::DefaultFixedImageGradientCalculator |
Default image gradient calculator types
Definition at line 342 of file itkImageToImageMetricv4.h.
typedef MetricTraits::DefaultFixedImageGradientFilter itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::DefaultFixedImageGradientFilter |
Default image gradient filter types
Definition at line 326 of file itkImageToImageMetricv4.h.
typedef MetricTraits::DefaultMovingImageGradientCalculator itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::DefaultMovingImageGradientCalculator |
Definition at line 343 of file itkImageToImageMetricv4.h.
typedef MetricTraits::DefaultMovingImageGradientFilter itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::DefaultMovingImageGradientFilter |
Definition at line 327 of file itkImageToImageMetricv4.h.
typedef Superclass::DerivativeType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::DerivativeType |
Type of the metric derivative.
Definition at line 349 of file itkImageToImageMetricv4.h.
typedef DerivativeType::ValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::DerivativeValueType |
Definition at line 350 of file itkImageToImageMetricv4.h.
typedef Superclass::DimensionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::DimensionType |
Dimension type
Definition at line 196 of file itkImageToImageMetricv4.h.
typedef MetricTraits::FixedGradientPixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedGradientPixelType |
Definition at line 307 of file itkImageToImageMetricv4.h.
typedef CovariantVector<typename FixedImageGradientType::ValueType, FixedImageDimension> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageComponentGradientType |
Definition at line 290 of file itkImageToImageMetricv4.h.
typedef FixedImageType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageConstPointer |
Definition at line 221 of file itkImageToImageMetricv4.h.
typedef FixedImageGradientCalculatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageGradientCalculatorPointer |
Definition at line 337 of file itkImageToImageMetricv4.h.
typedef MetricTraits::FixedImageGradientCalculatorType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageGradientCalculatorType |
Image gradient calculator types. The TOutput template parameter is chosen to match that of CentralDiffererenceImageFunction.
Definition at line 332 of file itkImageToImageMetricv4.h.
typedef FixedImageGradientFilterType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageGradientFilterPointer |
Definition at line 320 of file itkImageToImageMetricv4.h.
typedef MetricTraits::FixedImageGradientFilterType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageGradientFilterType |
Definition at line 316 of file itkImageToImageMetricv4.h.
typedef FixedImageGradientImageType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageGradientImagePointer |
Definition at line 313 of file itkImageToImageMetricv4.h.
typedef MetricTraits::FixedImageGradientImageType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageGradientImageType |
Definition at line 310 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 525 of file itkImageToImageMetricv4.h.
typedef MetricTraits::FixedImageGradientType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageGradientType |
Image derivatives types
Definition at line 285 of file itkImageToImageMetricv4.h.
typedef FixedImageType::IndexType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageIndexType |
Definition at line 223 of file itkImageToImageMetricv4.h.
typedef FixedImageMaskType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageMaskConstPointer |
Definition at line 260 of file itkImageToImageMetricv4.h.
typedef FixedImageMaskType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageMaskPointer |
Definition at line 259 of file itkImageToImageMetricv4.h.
typedef SpatialObject< itkGetStaticConstMacro(FixedImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageMaskType |
Type for the mask of the fixed image. Only pixels that are "inside" this mask will be considered for the computation of the metric
Definition at line 258 of file itkImageToImageMetricv4.h.
typedef FixedImageType::PixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImagePixelType |
Definition at line 218 of file itkImageToImageMetricv4.h.
|
private |
Only floating-point images are currently supported. To support integer images, several small changes must be made
Definition at line 692 of file itkImageToImageMetricv4.h.
typedef FixedImageType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImagePointer |
Definition at line 220 of file itkImageToImageMetricv4.h.
typedef FixedImageType::PointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImagePointType |
Definition at line 222 of file itkImageToImageMetricv4.h.
typedef TFixedImage itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedImageType |
Image-accessor typedefs
Definition at line 217 of file itkImageToImageMetricv4.h.
typedef Superclass::FixedInputPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedInputPointType |
Definition at line 202 of file itkImageToImageMetricv4.h.
typedef FixedInterpolatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedInterpolatorPointer |
Definition at line 281 of file itkImageToImageMetricv4.h.
typedef InterpolateImageFunction< FixedImageType, CoordinateRepresentationType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedInterpolatorType |
Type of the Interpolator Base class
Definition at line 277 of file itkImageToImageMetricv4.h.
typedef Superclass::FixedOutputPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedOutputPointType |
Definition at line 203 of file itkImageToImageMetricv4.h.
typedef FixedImagePixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedPixelType |
Definition at line 219 of file itkImageToImageMetricv4.h.
typedef MetricTraits::FixedRealType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedRealType |
Type of the filter used to calculate the gradients. Note that RealType is always double (or long double for long double pixel-type).
Definition at line 301 of file itkImageToImageMetricv4.h.
typedef FixedSampledPointSetType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedSampledPointSetConstPointer |
Definition at line 272 of file itkImageToImageMetricv4.h.
typedef FixedSampledPointSetType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedSampledPointSetPointer |
Definition at line 271 of file itkImageToImageMetricv4.h.
typedef PointSet<typename FixedImageType::PixelType, itkGetStaticConstMacro(FixedImageDimension)> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedSampledPointSetType |
Type of the point set used for sparse sampling.
Definition at line 270 of file itkImageToImageMetricv4.h.
typedef NumericTraits<FixedRealType>::ScalarRealType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedScalarRealType |
Definition at line 304 of file itkImageToImageMetricv4.h.
typedef Superclass::FixedTransformJacobianType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedTransformJacobianType |
Definition at line 213 of file itkImageToImageMetricv4.h.
typedef Superclass::FixedTransformParametersType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedTransformParametersType |
Definition at line 204 of file itkImageToImageMetricv4.h.
typedef Superclass::FixedTransformPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedTransformPointer |
Definition at line 201 of file itkImageToImageMetricv4.h.
typedef Superclass::FixedTransformType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::FixedTransformType |
Transform types from Superclass
Definition at line 200 of file itkImageToImageMetricv4.h.
typedef Superclass::GradientSourceType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::GradientSourceType |
Graident source type
Definition at line 193 of file itkImageToImageMetricv4.h.
typedef Superclass::DimensionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::ImageDimensionType |
Definition at line 197 of file itkImageToImageMetricv4.h.
typedef Superclass::InternalComputationValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::InternalComputationValueType |
Type used internally for computations
Definition at line 180 of file itkImageToImageMetricv4.h.
typedef Superclass::JacobianType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::JacobianType |
Definition at line 212 of file itkImageToImageMetricv4.h.
typedef Superclass::MeasureType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MeasureType |
Type of the measure.
Definition at line 346 of file itkImageToImageMetricv4.h.
typedef TMetricTraits itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MetricTraits |
Typedef for traits class
Definition at line 249 of file itkImageToImageMetricv4.h.
typedef MetricTraits::MovingGradientPixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingGradientPixelType |
Definition at line 308 of file itkImageToImageMetricv4.h.
typedef CovariantVector<typename MovingImageGradientType::ValueType, MovingImageDimension> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageComponentGradientType |
Definition at line 293 of file itkImageToImageMetricv4.h.
typedef MovingImageType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageConstPointer |
Definition at line 228 of file itkImageToImageMetricv4.h.
typedef MovingImageGradientCalculatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageGradientCalculatorPointer |
Definition at line 339 of file itkImageToImageMetricv4.h.
typedef MetricTraits::MovingImageGradientCalculatorType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageGradientCalculatorType |
Definition at line 334 of file itkImageToImageMetricv4.h.
typedef MovingImageGradientFilterType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageGradientFilterPointer |
Definition at line 322 of file itkImageToImageMetricv4.h.
typedef MetricTraits::MovingImageGradientFilterType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageGradientFilterType |
Definition at line 317 of file itkImageToImageMetricv4.h.
typedef MovingImageGradientImageType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageGradientImagePointer |
Definition at line 314 of file itkImageToImageMetricv4.h.
typedef MetricTraits::MovingImageGradientImageType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageGradientImageType |
Definition at line 311 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 528 of file itkImageToImageMetricv4.h.
typedef MetricTraits::MovingImageGradientType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageGradientType |
Definition at line 286 of file itkImageToImageMetricv4.h.
typedef MovingImageType::IndexType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageIndexType |
Definition at line 231 of file itkImageToImageMetricv4.h.
typedef MovingImageMaskType::ConstPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageMaskConstPointer |
Definition at line 266 of file itkImageToImageMetricv4.h.
typedef MovingImageMaskType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageMaskPointer |
Definition at line 265 of file itkImageToImageMetricv4.h.
typedef SpatialObject< itkGetStaticConstMacro(MovingImageDimension) > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageMaskType |
Type for the mask of the moving image. Only pixels that are "inside" this mask will be considered for the computation of the metric
Definition at line 264 of file itkImageToImageMetricv4.h.
typedef MovingImageType::PixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImagePixelType |
Definition at line 225 of file itkImageToImageMetricv4.h.
|
private |
Only floating-point images are currently supported. To support integer images, several small changes must be made
Definition at line 693 of file itkImageToImageMetricv4.h.
typedef MovingImageType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImagePointer |
Definition at line 227 of file itkImageToImageMetricv4.h.
typedef MovingImageType::PointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImagePointType |
Definition at line 229 of file itkImageToImageMetricv4.h.
typedef MovingImageType::RegionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageRegionType |
Definition at line 230 of file itkImageToImageMetricv4.h.
typedef TMovingImage itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingImageType |
Definition at line 224 of file itkImageToImageMetricv4.h.
typedef Superclass::MovingInputPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingInputPointType |
Definition at line 208 of file itkImageToImageMetricv4.h.
typedef MovingInterpolatorType::Pointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingInterpolatorPointer |
Definition at line 282 of file itkImageToImageMetricv4.h.
typedef InterpolateImageFunction< MovingImageType, CoordinateRepresentationType > itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingInterpolatorType |
Definition at line 280 of file itkImageToImageMetricv4.h.
typedef Superclass::MovingOutputPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingOutputPointType |
Definition at line 209 of file itkImageToImageMetricv4.h.
typedef MovingImagePixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingPixelType |
Definition at line 226 of file itkImageToImageMetricv4.h.
typedef MetricTraits::MovingRealType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingRealType |
Definition at line 302 of file itkImageToImageMetricv4.h.
typedef NumericTraits<MovingRealType>::ScalarRealType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingScalarRealType |
Definition at line 305 of file itkImageToImageMetricv4.h.
typedef Superclass::MovingTransformJacobianType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingTransformJacobianType |
Definition at line 214 of file itkImageToImageMetricv4.h.
typedef Superclass::MovingTransformParametersType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingTransformParametersType |
Definition at line 210 of file itkImageToImageMetricv4.h.
typedef Superclass::MovingTransformPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingTransformPointer |
Definition at line 207 of file itkImageToImageMetricv4.h.
typedef Superclass::MovingTransformType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::MovingTransformType |
Definition at line 206 of file itkImageToImageMetricv4.h.
typedef Superclass::NumberOfParametersType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::NumberOfParametersType |
Type to represent the number of parameters that are being optimized at any given iteration of the optimizer.
Definition at line 354 of file itkImageToImageMetricv4.h.
typedef Superclass::ParametersType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::ParametersType |
Type of the parameters.
Definition at line 189 of file itkImageToImageMetricv4.h.
typedef Superclass::ParametersValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::ParametersValueType |
Definition at line 190 of file itkImageToImageMetricv4.h.
typedef SmartPointer<Self> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::Pointer |
Definition at line 176 of file itkImageToImageMetricv4.h.
typedef ImageToImageMetricv4 itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::Self |
Standard class typedefs.
Definition at line 174 of file itkImageToImageMetricv4.h.
typedef ObjectToObjectMetric<TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::Superclass |
Definition at line 175 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualDirectionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualDirectionType |
Definition at line 242 of file itkImageToImageMetricv4.h.
typedef CovariantVector<typename VirtualImageGradientType::ValueType, VirtualImageDimension> itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualImageComponentGradientType |
Definition at line 296 of file itkImageToImageMetricv4.h.
typedef MetricTraits::VirtualImageGradientType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualImageGradientType |
Definition at line 287 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualImagePointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualImagePointer |
Definition at line 235 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualImageType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualImageType |
Types for the virtual domain
Definition at line 234 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualIndexType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualIndexType |
Definition at line 244 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualOriginType |
Definition at line 240 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualPixelType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualPixelType |
Definition at line 236 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualPointSetPointer itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualPointSetPointer |
Definition at line 246 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualPointSetType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualPointSetType |
Definition at line 245 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualPointType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualPointType |
Definition at line 241 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualSizeType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualRadiusType |
Definition at line 243 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualRegionType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualRegionType |
Definition at line 237 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualSizeType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualSizeType |
Definition at line 238 of file itkImageToImageMetricv4.h.
typedef Superclass::VirtualSpacingType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::VirtualSpacingType |
Definition at line 239 of file itkImageToImageMetricv4.h.
|
protected |
|
protectedvirtual |
|
private |
|
protectedvirtual |
Compute image derivatives for a Fixed point.
|
protectedvirtual |
Computes the gradients of the fixed image, using the GradientFilter, assigning the output to to m_FixedImageGradientImage.
|
protectedvirtual |
Compute image derivatives for a moving point.
|
protectedvirtual |
Computes the gradients of the moving image, using the GradientFilter, assigning the output to to m_MovingImageGradientImage.
|
protectedvirtual |
Get accessor for flag to calculate derivative.
|
virtual |
This method returns the derivative based on the current transformation(s).
Implements itk::ObjectToObjectMetricBase.
|
virtual |
Get the Fixed Image.
|
virtual |
Set/Get gradient calculators
|
virtual |
Set/Get the gradient filter
|
virtual |
Get Fixed Gradient Image.
|
virtual |
Set/Get the fixed image mask.
|
virtual |
Get a pointer to the fixed interpolator.
|
virtual |
Set/Get the fixed image domain sampling point set See main documentation regarding using fixed vs virtual domain for the point set.
|
virtual |
Set/Get the floating point resolution used optionally by the derivatives. If this is set, for example to 1e5, then the derivative will have precision up to 5 points beyond the decimal point. And precision beyond that will be truncated.
|
virtual |
Set number of threads to use. This the maximum number of threads to use when multithreaded. The actual number of threads used (may be less than this value) can be obtained with GetNumberOfThreadsUsed
.
|
virtual |
Get the Moving Image.
|
virtual |
Set/Get gradient calculators
|
virtual |
Set/Get the gradient filter
|
virtual |
Get Moving Gradient Image.
|
virtual |
Set/Get the moving image mask.
|
virtual |
Get a pointer to the Moving interpolator.
|
virtual |
Run-time type information (and related methods).
Reimplemented from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >.
Reimplemented in itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::DemonsImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >.
SizeValueType itk::ImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >::GetNumberOfDomainPoints | ( | ) | const |
Get the number of points in the domain used to evaluate the metric. This will differ depending on whether a sampled point set or dense sampling is used, and will be greater than or equal to GetNumberOfValidPoints().
|
virtual |
Get the number of sampled fixed sampled points that are deemed invalid during conversion to virtual domain in Initialize(). For informational purposes.
|
virtual |
Get number of threads to used in the the most recent evaluation. Only valid after GetValueAndDerivative() or GetValue() has been called.
|
virtual |
Get number of valid points from most recent update
Reimplemented from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >.
|
virtual |
Set/Get gradient computation via an image filter, for fixed image.
|
virtual |
Set/Get flag to use fixed image domain sampling point set
|
virtual |
Set/Get the option for applying floating point resolution truncation to derivative calculations in global support cases. False by default. It is only applied in global support cases (i.e. with global-support transforms) because in these cases, the per-point derivative values are added cumulatively, which can lead to loss of precision when the sum becomes much larger than the values being added. The goal is more consistent results across the number of threads used for an evaluation. The resolution can be changed using SetFloatingPointCorrectionResolution().
|
virtual |
Set/Get gradient computation via an image filter.
|
virtual |
Calculate and return the value for the metric based on the current transformation(s). The result is both returned, and stored in the m_Value member variable.
Implements itk::ObjectToObjectMetricBase.
Reimplemented in itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
|
virtual |
Calculate and return both the value for the metric and its derivative. This calls the SparseGetValueAndDerivativeThreader if UsedFixedSampledPointSet
is true, and DenseGetValueAndDerivativeThreader otherwise. The threaders in turn call ProcessPoint
on each point in the domain to be examined.
|
protectedvirtual |
Perform the actual threaded processing, using the appropriate GetValueAndDerivativeThreader. Results get written to member vars. This is available as a separate method so it can be used by dervied classes that implement their own GetValueAndDerivative, and/or need to run the processing loop more than once.
|
virtual |
Get the virtual domain sampling point set
|
virtual |
Initialize the Metric by making sure that all the components are present and plugged together correctly, and initializing internal variables as required. This is for one-time initialization, e.g. before starting an optimization process.
Reimplemented from itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >.
Reimplemented in itk::ANTSNeighborhoodCorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::DemonsImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
|
protectedvirtual |
Initialize the default image gradient filters. This must only be called once the fixed and moving images have been set.
|
protectedvirtual |
Initialize the default image gradient filters. This must only be called once the fixed and moving images have been set.
|
protectedvirtual |
Perform any initialization required before each evaluation of GetValueAndDerivative
. This is distinct from Initialize, which is called only once before a number of iterations, e.g. before a registration loop.
Reimplemented in itk::JointHistogramMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >, and itk::CorrelationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage >.
|
private |
Map the fixed point set samples to the virtual domain
|
private |
|
protectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::ObjectToObjectMetricBase.
Reimplemented in itk::MeanSquaresImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TMetricTraits >.
|
virtual |
Connect the Fixed Image.
|
virtual |
Set/Get gradient calculators
|
virtual |
Set/Get the gradient filter
|
virtual |
Set/Get the fixed image mask.
|
virtual |
Set/Get the fixed image mask.
|
virtual |
Connect the fixed interpolator.
|
virtual |
Set/Get the fixed image domain sampling point set See main documentation regarding using fixed vs virtual domain for the point set.
|
virtual |
Set/Get the fixed image domain sampling point set See main documentation regarding using fixed vs virtual domain for the point set.
|
virtual |
Set/Get the floating point resolution used optionally by the derivatives. If this is set, for example to 1e5, then the derivative will have precision up to 5 points beyond the decimal point. And precision beyond that will be truncated.
|
virtual |
Set number of threads to use. This the maximum number of threads to use when multithreaded. The actual number of threads used (may be less than this value) can be obtained with GetNumberOfThreadsUsed
.
|
virtual |
Connect the Moving Image.
|
virtual |
Set/Get gradient calculators
|
virtual |
Set/Get the gradient filter
|
virtual |
Set/Get the moving image mask.
|
virtual |
Set/Get the moving image mask.
|
virtual |
Connect the Moving interpolator.
|
virtual |
Set/Get gradient computation via an image filter, for fixed image.
|
virtual |
Set/Get flag to use fixed image domain sampling point set
|
virtual |
Set/Get the option for applying floating point resolution truncation to derivative calculations in global support cases. False by default. It is only applied in global support cases (i.e. with global-support transforms) because in these cases, the per-point derivative values are added cumulatively, which can lead to loss of precision when the sum becomes much larger than the values being added. The goal is more consistent results across the number of threads used for an evaluation. The resolution can be changed using SetFloatingPointCorrectionResolution().
|
virtual |
Set/Get gradient computation via an image filter.
|
inlinevirtual |
Returns a flag. True if arbitrary virtual domain points will always correspond to data points. False if not. For example, point-set metrics return false because only some virtual domain points will correspond to points within the point sets.
Implements itk::ObjectToObjectMetric< TFixedImage::ImageDimension, TMovingImage::ImageDimension, TVirtualImage >.
Definition at line 516 of file itkImageToImageMetricv4.h.
|
protected |
Transform a point from VirtualImage domain to FixedImage domain and evaluate. This function also checks if mapped point is within the mask if one is set, and that is within the fixed image buffer, in which case the return value will be true. Parameters mappedFixedPoint
and mappedFixedPixelValue
are returned.
|
protected |
Transform and evaluate a point from VirtualImage domain to MovingImage domain.
|
private |
This class requires OnlyDefinedForFloatingPointTypes0 in the form of ( itk::Concept::IsFloatingPoint<FixedImagePixelValueType> )
|
private |
This class requires OnlyDefinedForFloatingPointTypes1 in the form of ( itk::Concept::IsFloatingPoint<MovingImagePixelValueType> )
|
virtual |
Set/Get gradient computation via an image filter, for fixed image.
|
virtual |
Set/Get gradient computation via an image filter, for fixed image.
|
virtual |
Set/Get flag to use fixed image domain sampling point set
|
virtual |
Set/Get flag to use fixed image domain sampling point set
|
virtual |
Set/Get the option for applying floating point resolution truncation to derivative calculations in global support cases. False by default. It is only applied in global support cases (i.e. with global-support transforms) because in these cases, the per-point derivative values are added cumulatively, which can lead to loss of precision when the sum becomes much larger than the values being added. The goal is more consistent results across the number of threads used for an evaluation. The resolution can be changed using SetFloatingPointCorrectionResolution().
|
virtual |
Set/Get the option for applying floating point resolution truncation to derivative calculations in global support cases. False by default. It is only applied in global support cases (i.e. with global-support transforms) because in these cases, the per-point derivative values are added cumulatively, which can lead to loss of precision when the sum becomes much larger than the values being added. The goal is more consistent results across the number of threads used for an evaluation. The resolution can be changed using SetFloatingPointCorrectionResolution().
|
virtual |
Set/Get gradient computation via an image filter.
|
virtual |
Set/Get gradient computation via an image filter.
|
friend |
Definition at line 532 of file itkImageToImageMetricv4.h.
|
friend |
Definition at line 533 of file itkImageToImageMetricv4.h.
|
friend |
Definition at line 530 of file itkImageToImageMetricv4.h.
|
friend |
Definition at line 531 of file itkImageToImageMetricv4.h.
|
static |
Definition at line 252 of file itkImageToImageMetricv4.h.
|
mutableprivate |
Flag to know if derivative should be calculated
Definition at line 687 of file itkImageToImageMetricv4.h.
|
protected |
Pointer to default gradient calculators. Used for easier initialization of the default filter.
Definition at line 629 of file itkImageToImageMetricv4.h.
|
protected |
Pointer to default gradient filter. Used for easier initialization of the default filter.
Definition at line 622 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 631 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 624 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 538 of file itkImageToImageMetricv4.h.
|
mutableprotected |
Derivative results holder. User a raw pointer so we can point it to a user-provided object. This is used in internal methods so the user-provided variable does not have to be passed around. It also enables safely sharing a derivative object between metrics during multi-variate analsys, for memory efficiency. Will be NULL if not set.
Definition at line 647 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 599 of file itkImageToImageMetricv4.h.
|
protected |
Image gradient calculators
Definition at line 638 of file itkImageToImageMetricv4.h.
|
protected |
Gradient filters
Definition at line 616 of file itkImageToImageMetricv4.h.
|
mutableprotected |
Gradient images to store gradient filter output.
Definition at line 634 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 607 of file itkImageToImageMetricv4.h.
|
protected |
Masks
Definition at line 650 of file itkImageToImageMetricv4.h.
|
protected |
Pointers to interpolators
Definition at line 605 of file itkImageToImageMetricv4.h.
|
protected |
Sampled point sets
Definition at line 654 of file itkImageToImageMetricv4.h.
|
private |
Definition at line 682 of file itkImageToImageMetricv4.h.
|
mutableprivate |
Flag for warning about use of GetValue. Will be removed when GetValue implementation is improved.
Definition at line 671 of file itkImageToImageMetricv4.h.
|
private |
Definition at line 684 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 602 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 639 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 617 of file itkImageToImageMetricv4.h.
|
mutableprotected |
Definition at line 635 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 608 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 651 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 606 of file itkImageToImageMetricv4.h.
|
private |
Keep track of the number of sampled fixed points that are deemed invalid during conversion to virtual domain. For informational purposes.
Definition at line 679 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 542 of file itkImageToImageMetricv4.h.
|
protected |
Flag to control use of precomputed gradient filter image or gradient calculator for image gradient calculations.
Definition at line 612 of file itkImageToImageMetricv4.h.
|
protected |
Flag to use FixedSampledPointSet, i.e. Sparse sampling.
Definition at line 658 of file itkImageToImageMetricv4.h.
|
private |
Definition at line 681 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 613 of file itkImageToImageMetricv4.h.
|
protected |
Definition at line 655 of file itkImageToImageMetricv4.h.
|
static |
Definition at line 253 of file itkImageToImageMetricv4.h.
|
static |
Definition at line 254 of file itkImageToImageMetricv4.h.