ITK  5.2.0
Insight Toolkit
itkImageToImageMetricv4.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright NumFOCUS
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkImageToImageMetricv4_h
19 #define itkImageToImageMetricv4_h
20 
21 #include "itkCovariantVector.h"
22 #include "itkImageFunction.h"
25 #include "itkSpatialObject.h"
26 #include "itkResampleImageFilter.h"
29 #include "itkImageToImageFilter.h"
31 #include "itkPointSet.h"
34 
35 namespace itk
36 {
168 template <typename TFixedImage,
169  typename TMovingImage,
170  typename TVirtualImage = TFixedImage,
171  typename TInternalComputationValueType = double,
172  typename TMetricTraits =
173  DefaultImageToImageMetricTraitsv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType>>
174 class ITK_TEMPLATE_EXPORT ImageToImageMetricv4
175  : public ObjectToObjectMetric<TFixedImage::ImageDimension,
176  TMovingImage::ImageDimension,
177  TVirtualImage,
178  TInternalComputationValueType>
179 {
180 public:
181  ITK_DISALLOW_COPY_AND_ASSIGN(ImageToImageMetricv4);
182 
185  using Superclass = ObjectToObjectMetric<TFixedImage::ImageDimension,
186  TMovingImage::ImageDimension,
187  TVirtualImage,
188  TInternalComputationValueType>;
191 
194 
198  using InternalComputationValueType = TInternalComputationValueType;
199 
201  using CoordinateRepresentationType = typename Superclass::CoordinateRepresentationType;
202 
204  using ParametersType = typename Superclass::ParametersType;
205  using ParametersValueType = typename Superclass::ParametersValueType;
206 
208  using GradientSourceEnum = typename Superclass::GradientSourceEnum;
209 
211  using DimensionType = typename Superclass::DimensionType;
212  using ImageDimensionType = typename Superclass::DimensionType;
213 
215  using FixedTransformType = typename Superclass::FixedTransformType;
216  using FixedTransformPointer = typename Superclass::FixedTransformPointer;
217  using FixedInputPointType = typename Superclass::FixedInputPointType;
218  using FixedOutputPointType = typename Superclass::FixedOutputPointType;
219  using FixedTransformParametersType = typename Superclass::FixedTransformParametersType;
220 
221  using MovingTransformType = typename Superclass::MovingTransformType;
222  using MovingTransformPointer = typename Superclass::MovingTransformPointer;
223  using MovingInputPointType = typename Superclass::MovingInputPointType;
224  using MovingOutputPointType = typename Superclass::MovingOutputPointType;
225  using MovingTransformParametersType = typename Superclass::MovingTransformParametersType;
226 
227  using JacobianType = typename Superclass::JacobianType;
228  using FixedTransformJacobianType = typename Superclass::FixedTransformJacobianType;
229  using MovingTransformJacobianType = typename Superclass::MovingTransformJacobianType;
230 
231  using ObjectType = typename Superclass::ObjectType;
232 
234  using FixedImageType = TFixedImage;
235  using FixedImagePixelType = typename FixedImageType::PixelType;
237  using FixedImagePointer = typename FixedImageType::Pointer;
238  using FixedImageConstPointer = typename FixedImageType::ConstPointer;
241  using MovingImageType = TMovingImage;
242  using MovingImagePixelType = typename MovingImageType::PixelType;
244  using MovingImagePointer = typename MovingImageType::Pointer;
245  using MovingImageConstPointer = typename MovingImageType::ConstPointer;
249 
251  using VirtualImageType = typename Superclass::VirtualImageType;
252  using VirtualImagePointer = typename Superclass::VirtualImagePointer;
253  using VirtualPixelType = typename Superclass::VirtualPixelType;
254  using VirtualRegionType = typename Superclass::VirtualRegionType;
255  using VirtualSizeType = typename Superclass::VirtualSizeType;
256  using VirtualSpacingType = typename Superclass::VirtualSpacingType;
257  using VirtualOriginType = typename Superclass::VirtualPointType;
258  using VirtualPointType = typename Superclass::VirtualPointType;
259  using VirtualDirectionType = typename Superclass::VirtualDirectionType;
260  using VirtualRadiusType = typename Superclass::VirtualSizeType;
261  using VirtualIndexType = typename Superclass::VirtualIndexType;
262  using VirtualPointSetType = typename Superclass::VirtualPointSetType;
263  using VirtualPointSetPointer = typename Superclass::VirtualPointSetPointer;
264 
266  using MetricTraits = TMetricTraits;
267 
268  /* Image dimension accessors */
269  static constexpr DimensionType FixedImageDimension = Superclass::FixedDimension;
270  static constexpr DimensionType MovingImageDimension = Superclass::MovingDimension;
271  static constexpr DimensionType VirtualImageDimension = Superclass::VirtualDimension;
272 
278 
284 
289 
295 
297  using FixedImageGradientType = typename MetricTraits::FixedImageGradientType;
298  using MovingImageGradientType = typename MetricTraits::MovingImageGradientType;
299  using VirtualImageGradientType = typename MetricTraits::VirtualImageGradientType;
300 
303 
306 
309 
313  using FixedRealType = typename MetricTraits::FixedRealType;
314  using MovingRealType = typename MetricTraits::MovingRealType;
315 
318 
319  using FixedGradientPixelType = typename MetricTraits::FixedGradientPixelType;
320  using MovingGradientPixelType = typename MetricTraits::MovingGradientPixelType;
321 
322  using FixedImageGradientImageType = typename MetricTraits::FixedImageGradientImageType;
323  using MovingImageGradientImageType = typename MetricTraits::MovingImageGradientImageType;
324 
325  using FixedImageGradientImagePointer = typename FixedImageGradientImageType::Pointer;
326  using MovingImageGradientImagePointer = typename MovingImageGradientImageType::Pointer;
327 
328  using FixedImageGradientFilterType = typename MetricTraits::FixedImageGradientFilterType;
329  using MovingImageGradientFilterType = typename MetricTraits::MovingImageGradientFilterType;
330 
331  using FixedImageGradientFilterPointer = typename FixedImageGradientFilterType::Pointer;
332  using MovingImageGradientFilterPointer = typename MovingImageGradientFilterType::Pointer;
333 
334 
336  using DefaultFixedImageGradientFilter = typename MetricTraits::DefaultFixedImageGradientFilter;
337  using DefaultMovingImageGradientFilter = typename MetricTraits::DefaultMovingImageGradientFilter;
338 
341  using FixedImageGradientCalculatorType = typename MetricTraits::FixedImageGradientCalculatorType;
342  using MovingImageGradientCalculatorType = typename MetricTraits::MovingImageGradientCalculatorType;
343 
344  using FixedImageGradientCalculatorPointer = typename FixedImageGradientCalculatorType::Pointer;
345  using MovingImageGradientCalculatorPointer = typename MovingImageGradientCalculatorType::Pointer;
346 
348  using DefaultFixedImageGradientCalculator = typename MetricTraits::DefaultFixedImageGradientCalculator;
349  using DefaultMovingImageGradientCalculator = typename MetricTraits::DefaultMovingImageGradientCalculator;
350 
352  using MeasureType = typename Superclass::MeasureType;
353 
355  using DerivativeType = typename Superclass::DerivativeType;
356  using DerivativeValueType = typename DerivativeType::ValueType;
357 
360  using NumberOfParametersType = typename Superclass::NumberOfParametersType;
361 
363  void
364  SetFixedObject(const ObjectType * object) override
365  {
366  auto * image = dynamic_cast<FixedImageType *>(const_cast<ObjectType *>(object));
367  if (image != nullptr)
368  {
369  this->SetFixedImage(image);
370  }
371  else
372  {
373  itkExceptionMacro("Incorrect object type. Should be an image.")
374  }
375  }
377 
379  void
380  SetMovingObject(const ObjectType * object) override
381  {
382  auto * image = dynamic_cast<MovingImageType *>(const_cast<ObjectType *>(object));
383  if (image != nullptr)
384  {
385  this->SetMovingImage(image);
386  }
387  else
388  {
389  itkExceptionMacro("Incorrect object type. Should be an image.")
390  }
391  }
393 
394  /* Get/Set the Fixed Image. */
395  itkSetConstObjectMacro(FixedImage, FixedImageType);
396  itkGetConstObjectMacro(FixedImage, FixedImageType);
397 
399  itkSetConstObjectMacro(MovingImage, MovingImageType);
400  itkGetConstObjectMacro(MovingImage, MovingImageType);
402 
404  itkSetObjectMacro(FixedInterpolator, FixedInterpolatorType);
405 
407  itkGetModifiableObjectMacro(FixedInterpolator, FixedInterpolatorType);
408 
410  itkSetObjectMacro(MovingInterpolator, MovingInterpolatorType);
411 
413  itkGetModifiableObjectMacro(MovingInterpolator, MovingInterpolatorType);
414 
416  itkSetObjectMacro(MovingImageMask, MovingImageMaskType);
417  itkSetConstObjectMacro(MovingImageMask, MovingImageMaskType);
418  itkGetConstObjectMacro(MovingImageMask, MovingImageMaskType);
420 
422  itkSetObjectMacro(FixedImageMask, FixedImageMaskType);
423  itkSetConstObjectMacro(FixedImageMask, FixedImageMaskType);
424  itkGetConstObjectMacro(FixedImageMask, FixedImageMaskType);
426 
430  itkSetObjectMacro(FixedSampledPointSet, FixedSampledPointSetType);
431  itkSetConstObjectMacro(FixedSampledPointSet, FixedSampledPointSetType);
432  itkGetConstObjectMacro(FixedSampledPointSet, FixedSampledPointSetType);
434 
436  itkSetObjectMacro(VirtualSampledPointSet, VirtualPointSetType);
437  itkGetConstObjectMacro(VirtualSampledPointSet, VirtualPointSetType);
439 
441  itkSetMacro(UseSampledPointSet, bool);
442  itkGetConstReferenceMacro(UseSampledPointSet, bool);
443  itkBooleanMacro(UseSampledPointSet);
445 
448  itkSetMacro(UseVirtualSampledPointSet, bool);
449  itkGetConstReferenceMacro(UseVirtualSampledPointSet, bool);
450  itkBooleanMacro(UseVirtualSampledPointSet);
452 
453 #if !defined(ITK_LEGACY_REMOVE)
454 
456  itkLegacyMacro(virtual void SetUseFixedSampledPointSet(bool v)) { this->SetUseSampledPointSet(v); }
457  itkLegacyMacro(virtual bool GetUseFixedSampledPointSet() const) { return this->GetUseSampledPointSet(); }
458  itkLegacyMacro(virtual void UseFixedSampledPointSetOn()) { return this->UseSampledPointSetOn(); }
459  itkLegacyMacro(virtual void UseFixedSampledPointSetOff()) { return this->UseSampledPointSetOff(); }
460 #endif
461 
462 
463 
465  itkSetObjectMacro(FixedImageGradientFilter, FixedImageGradientFilterType);
466  itkGetModifiableObjectMacro(FixedImageGradientFilter, FixedImageGradientFilterType);
467  itkSetObjectMacro(MovingImageGradientFilter, MovingImageGradientFilterType);
468  itkGetModifiableObjectMacro(MovingImageGradientFilter, MovingImageGradientFilterType);
470 
472  itkSetObjectMacro(FixedImageGradientCalculator, FixedImageGradientCalculatorType);
473  itkGetModifiableObjectMacro(FixedImageGradientCalculator, FixedImageGradientCalculatorType);
474  itkSetObjectMacro(MovingImageGradientCalculator, MovingImageGradientCalculatorType);
475  itkGetModifiableObjectMacro(MovingImageGradientCalculator, MovingImageGradientCalculatorType);
477 
480  itkSetMacro(UseFixedImageGradientFilter, bool);
481  itkGetConstReferenceMacro(UseFixedImageGradientFilter, bool);
482  itkBooleanMacro(UseFixedImageGradientFilter);
484 
486  itkSetMacro(UseMovingImageGradientFilter, bool);
487  itkGetConstReferenceMacro(UseMovingImageGradientFilter, bool);
488  itkBooleanMacro(UseMovingImageGradientFilter);
490 
494  virtual ThreadIdType
495  GetNumberOfWorkUnitsUsed() const;
496 
500  virtual void
501  SetMaximumNumberOfWorkUnits(const ThreadIdType workUnits);
502  virtual ThreadIdType
503  GetMaximumNumberOfWorkUnits() const;
505 
506 #if !defined(ITK_LEGACY_REMOVE)
507 
512  itkLegacyMacro(virtual ThreadIdType GetNumberOfThreadsUsed() const) { return this->GetNumberOfWorkUnitsUsed(); }
513 
520  itkLegacyMacro(virtual void SetMaximumNumberOfThreads(const ThreadIdType count))
521  {
522  this->SetMaximumNumberOfWorkUnits(count);
523  }
524  itkLegacyMacro(virtual ThreadIdType GetMaximumNumberOfThreads() const) { return this->GetMaximumNumberOfWorkUnits(); }
525 #endif // !ITK_LEGACY_REMOVE
526 
527 
528 
536  virtual void
537  FinalizeThread(const ThreadIdType /*threadId*/)
538  { /*Do nothing by default */
539  }
540 
542  itkGetModifiableObjectMacro(FixedImageGradientImage, FixedImageGradientImageType);
543 
545  itkGetModifiableObjectMacro(MovingImageGradientImage, MovingImageGradientImageType);
546 
549  GetNumberOfValidPoints() const override
550  {
551  return this->m_NumberOfValidPoints;
552  }
553 
559  GetNumberOfDomainPoints() const;
560 
574  itkSetMacro(UseFloatingPointCorrection, bool);
575  itkGetConstReferenceMacro(UseFloatingPointCorrection, bool);
576  itkBooleanMacro(UseFloatingPointCorrection);
578 
583  itkSetMacro(FloatingPointCorrectionResolution, DerivativeValueType);
584  itkGetConstMacro(FloatingPointCorrectionResolution, DerivativeValueType);
586 
587  /* Initialize the metric before calling GetValue or GetDerivative.
588  * Derived classes must call this Superclass version if they override
589  * this to perform their own initialization.
590  * \note This is meant to be called once for a particular metric setup.
591  * That is, when used in registration, this method would be called once
592  * before entering the registration loop, during which GetValue or
593  * GetDerivative will be called repeatedly. It must be called again if
594  * metric settings are changed before beginning a new registration. */
595  void
596  Initialize() override;
597 
598  MeasureType
599  GetValue() const override;
600 
601  void
602  GetDerivative(DerivativeType &) const override;
603 
609  void
610  GetValueAndDerivative(MeasureType & value, DerivativeType & derivative) const override;
611 
615  itkGetConstReferenceMacro(NumberOfSkippedFixedSampledPoints, SizeValueType);
616 
617  bool
619  {
620  return true;
621  }
622 
623  using MetricCategoryType = typename Superclass::MetricCategoryType;
624 
627  GetMetricCategory() const override
628  {
629  return MetricCategoryType::IMAGE_METRIC;
630  }
631 
632 protected:
633  /* Interpolators for image gradient filters. */
634  using FixedImageGradientInterpolatorType =
638 
640  ThreadedImageRegionPartitioner<VirtualImageDimension>,
646 
647  /* A DenseGetValueAndDerivativeThreader
648  * Derived classes must define this class and assign it in their constructor
649  * if threaded processing in GetValueAndDerivative is performed. */
652  /* A SparseGetValueAndDerivativeThreader
653  * Derived classes must define this class and assign it in their constructor
654  * if threaded processing in GetValueAndDerivative is performed. */
657 
662  virtual void
663  InitializeForIteration() const;
664 
672  bool
673  TransformAndEvaluateFixedPoint(const VirtualPointType & virtualPoint,
674  FixedImagePointType & mappedFixedPoint,
675  FixedImagePixelType & mappedFixedPixelValue) const;
676 
678  bool
679  TransformAndEvaluateMovingPoint(const VirtualPointType & virtualPoint,
680  MovingImagePointType & mappedMovingPoint,
681  MovingImagePixelType & mappedMovingPixelValue) const;
682 
684  virtual void
685  ComputeFixedImageGradientAtPoint(const FixedImagePointType & mappedPoint, FixedImageGradientType & gradient) const;
686 
688  virtual void
689  ComputeMovingImageGradientAtPoint(const MovingImagePointType & mappedPoint, MovingImageGradientType & gradient) const;
690 
694  virtual void
695  ComputeFixedImageGradientFilterImage();
696 
700  virtual void
701  ComputeMovingImageGradientFilterImage() const;
702 
709  virtual void
710  GetValueAndDerivativeExecute() const;
711 
714  virtual void
715  InitializeDefaultFixedImageGradientFilter();
716  virtual void
717  InitializeDefaultMovingImageGradientFilter();
719 
721  itkGetConstMacro(ComputeDerivative, bool);
722 
725 
731 
736 
740 
743  typename DefaultFixedImageGradientFilter::Pointer m_DefaultFixedImageGradientFilter;
744  typename DefaultMovingImageGradientFilter::Pointer m_DefaultMovingImageGradientFilter;
745 
748  typename DefaultFixedImageGradientCalculator::Pointer m_DefaultFixedImageGradientCalculator;
749  typename DefaultMovingImageGradientCalculator::Pointer m_DefaultMovingImageGradientCalculator;
750 
754 
758 
766 
770 
774 
777 
781 
783  ~ImageToImageMetricv4() override = default;
784 
785  void
786  PrintSelf(std::ostream & os, Indent indent) const override;
787 
788 private:
790  void
791  MapFixedSampledPointSetToVirtual();
792 
794  void
795  LocalTransformPoint(const typename FixedTransformType::OutputPointType & virtualPoint,
796  typename FixedTransformType::OutputPointType & mappedFixedPoint) const
797  {
798  mappedFixedPoint = this->m_FixedTransform->TransformPoint(virtualPoint);
799  }
800  // cast the virtual point
801  template <typename TVirtualPoint>
802  void
803  LocalTransformPoint(const TVirtualPoint & virtualPoint,
804  typename FixedTransformType::OutputPointType & mappedFixedPoint) const
805  {
806  typename FixedTransformType::OutputPointType localVirtualPoint;
808 
809  localVirtualPoint.CastFrom(virtualPoint);
810 
811  mappedFixedPoint = this->m_FixedTransform->TransformPoint(localVirtualPoint);
812  }
813  // cast the mapped Fixed Point
814  template <typename TFixedImagePoint>
815  void
816  LocalTransformPoint(const typename FixedTransformType::OutputPointType & virtualPoint,
817  TFixedImagePoint & mappedFixedPoint) const
818  {
819  typename FixedTransformType::OutputPointType localMappedFixedPoint;
820  localMappedFixedPoint.CastFrom(mappedFixedPoint);
821  localMappedFixedPoint = this->m_FixedTransform->TransformPoint(virtualPoint);
822  mappedFixedPoint.CastFrom(localMappedFixedPoint);
823  }
824  // cast both mapped and fixed point.
825  template <typename TVirtualPoint, typename TFixedImagePoint>
826  void
827  LocalTransformPoint(const TVirtualPoint & virtualPoint, TFixedImagePoint & mappedFixedPoint) const
828  {
829  typename FixedTransformType::OutputPointType localVirtualPoint;
830  typename FixedTransformType::OutputPointType localMappedFixedPoint;
831 
832  localVirtualPoint.CastFrom(virtualPoint);
833  localMappedFixedPoint.CastFrom(mappedFixedPoint);
834 
835  localMappedFixedPoint = this->m_FixedTransform->TransformPoint(localVirtualPoint);
836  mappedFixedPoint.CastFrom(localMappedFixedPoint);
837  }
838 
842 
847 
850 
852 
854  mutable bool m_ComputeDerivative;
855 
858 #ifdef ITK_USE_CONCEPT_CHECKING
861  itkConceptMacro(OnlyDefinedForFloatingPointTypes0, (itk::Concept::IsFloatingPoint<FixedImagePixelValueType>));
863 #endif // ITK_USE_CONCEPT_CHECKING
864 };
865 } // namespace itk
867 
868 #ifndef ITK_MANUAL_INSTANTIATION
869 # include "itkImageToImageMetricv4.hxx"
870 #endif
871 
872 #endif
itk::ImageToImageMetricv4::m_SparseGetValueAndDerivativeThreader
ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedIndexedContainerPartitioner, Self >::Pointer m_SparseGetValueAndDerivativeThreader
Definition: itkImageToImageMetricv4.h:656
itk::ImageToImageMetricv4::MovingOutputPointType
typename Superclass::MovingOutputPointType MovingOutputPointType
Definition: itkImageToImageMetricv4.h:224
itk::ImageToImageMetricv4::VirtualRadiusType
typename Superclass::VirtualSizeType VirtualRadiusType
Definition: itkImageToImageMetricv4.h:260
itk::ImageToImageMetricv4::FixedImageMaskConstPointer
typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
Definition: itkImageToImageMetricv4.h:277
itk::ImageToImageMetricv4::FixedTransformType
typename Superclass::FixedTransformType FixedTransformType
Definition: itkImageToImageMetricv4.h:215
itk::ImageToImageMetricv4::FixedPixelType
FixedImagePixelType FixedPixelType
Definition: itkImageToImageMetricv4.h:236
itkImageFunction.h
itk::ImageToImageMetricv4::m_MovingImage
MovingImageConstPointer m_MovingImage
Definition: itkImageToImageMetricv4.h:724
itk::ImageToImageMetricv4::MovingRealType
typename MetricTraits::MovingRealType MovingRealType
Definition: itkImageToImageMetricv4.h:314
itk::OptimizerParameters< TInternalComputationValueType >
itk::ImageToImageMetricv4::FixedImageGradientType
typename MetricTraits::FixedImageGradientType FixedImageGradientType
Definition: itkImageToImageMetricv4.h:297
itk::ImageToImageMetricv4::MovingImageGradientCalculatorType
typename MetricTraits::MovingImageGradientCalculatorType MovingImageGradientCalculatorType
Definition: itkImageToImageMetricv4.h:342
itk::ImageToImageMetricv4::InternalComputationValueType
TInternalComputationValueType InternalComputationValueType
Definition: itkImageToImageMetricv4.h:198
itk::ImageToImageMetricv4::ImageDimensionType
typename Superclass::DimensionType ImageDimensionType
Definition: itkImageToImageMetricv4.h:212
itkThreadedIndexedContainerPartitioner.h
itkCovariantVector.h
itk::ImageToImageMetricv4::FixedTransformJacobianType
typename Superclass::FixedTransformJacobianType FixedTransformJacobianType
Definition: itkImageToImageMetricv4.h:228
itk::ImageToImageMetricv4::DefaultFixedImageGradientCalculator
typename MetricTraits::DefaultFixedImageGradientCalculator DefaultFixedImageGradientCalculator
Definition: itkImageToImageMetricv4.h:348
itk::ImageToImageMetricv4::MovingImageGradientFilterType
typename MetricTraits::MovingImageGradientFilterType MovingImageGradientFilterType
Definition: itkImageToImageMetricv4.h:329
itk::PointSet
A superclass of the N-dimensional mesh structure; supports point (geometric coordinate and attribute)...
Definition: itkPointSet.h:82
itk::ImageToImageMetricv4::MovingImageIndexType
typename MovingImageType::IndexType MovingImageIndexType
Definition: itkImageToImageMetricv4.h:248
itk::ImageToImageMetricv4::m_FixedImage
FixedImageConstPointer m_FixedImage
Definition: itkImageToImageMetricv4.h:721
itk::ImageToImageMetricv4GetValueAndDerivativeThreaderBase
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreaderBase.h:44
itk::ImageToImageMetricv4::DefaultFixedImageGradientFilter
typename MetricTraits::DefaultFixedImageGradientFilter DefaultFixedImageGradientFilter
Definition: itkImageToImageMetricv4.h:336
itk::ImageToImageMetricv4::FixedTransformParametersType
typename Superclass::FixedTransformParametersType FixedTransformParametersType
Definition: itkImageToImageMetricv4.h:219
itk::ImageToImageMetricv4GetValueAndDerivativeThreader
Provides threading for ImageToImageMetricv4::GetValueAndDerivative.
Definition: itkImageToImageMetricv4GetValueAndDerivativeThreader.h:44
itk::ImageToImageMetricv4::FixedImageType
TFixedImage FixedImageType
Definition: itkImageToImageMetricv4.h:234
itk::ImageToImageMetricv4::m_DefaultMovingImageGradientCalculator
DefaultMovingImageGradientCalculator::Pointer m_DefaultMovingImageGradientCalculator
Definition: itkImageToImageMetricv4.h:749
itk::ObjectToObjectMetricBaseTemplate::NumberOfParametersType
unsigned int NumberOfParametersType
Definition: itkObjectToObjectMetricBase.h:176
itk::ThreadedImageRegionPartitioner
Class for partitioning of an ImageRegion.
Definition: itkThreadedImageRegionPartitioner.h:45
itk::ImageToImageMetricv4::FixedImageMaskPointer
typename FixedImageMaskType::Pointer FixedImageMaskPointer
Definition: itkImageToImageMetricv4.h:276
itkSpatialObject.h
itk::ImageToImageMetricv4::MovingInterpolatorPointer
typename MovingInterpolatorType::Pointer MovingInterpolatorPointer
Definition: itkImageToImageMetricv4.h:294
itk::ImageToImageMetricv4::FixedSampledPointSetPointer
typename FixedSampledPointSetType::Pointer FixedSampledPointSetPointer
Definition: itkImageToImageMetricv4.h:287
itk::ThreadedIndexedContainerPartitioner
Partitions an indexed container.
Definition: itkThreadedIndexedContainerPartitioner.h:45
itk::GTest::TypedefsAndConstructors::Dimension2::PointType
ImageBaseType::PointType PointType
Definition: itkGTestTypedefsAndConstructors.h:51
itk::ImageToImageMetricv4::m_MovingImageGradientInterpolator
MovingImageGradientInterpolatorType::Pointer m_MovingImageGradientInterpolator
Definition: itkImageToImageMetricv4.h:730
itk::ImageToImageMetricv4::FixedImageIndexType
typename FixedImageType::IndexType FixedImageIndexType
Definition: itkImageToImageMetricv4.h:240
itk::ImageToImageMetricv4::SetMovingObject
void SetMovingObject(const ObjectType *object) override
Definition: itkImageToImageMetricv4.h:380
itk::ImageToImageMetricv4::MovingImageMaskPointer
typename MovingImageMaskType::Pointer MovingImageMaskPointer
Definition: itkImageToImageMetricv4.h:282
itk::ImageToImageMetricv4::MovingImageRegionType
typename MovingImageType::RegionType MovingImageRegionType
Definition: itkImageToImageMetricv4.h:247
itk::ImageToImageMetricv4::m_UseFixedImageGradientFilter
bool m_UseFixedImageGradientFilter
Definition: itkImageToImageMetricv4.h:734
itk::ImageToImageMetricv4::MetricCategoryType
typename Superclass::MetricCategoryType MetricCategoryType
Definition: itkImageToImageMetricv4.h:623
itk::ImageToImageMetricv4::FixedImagePixelValueType
typename PixelTraits< FixedImagePixelType >::ValueType FixedImagePixelValueType
Definition: itkImageToImageMetricv4.h:859
itk::ImageToImageMetricv4::m_FixedImageGradientImage
FixedImageGradientImagePointer m_FixedImageGradientImage
Definition: itkImageToImageMetricv4.h:752
itk::ImageToImageMetricv4::FinalizeThread
virtual void FinalizeThread(const ThreadIdType)
Definition: itkImageToImageMetricv4.h:537
itk::ImageToImageMetricv4::FixedImageGradientFilterType
typename MetricTraits::FixedImageGradientFilterType FixedImageGradientFilterType
Definition: itkImageToImageMetricv4.h:328
itkImageToImageMetricv4GetValueAndDerivativeThreader.h
itk::ImageToImageMetricv4::m_FixedImageGradientCalculator
FixedImageGradientCalculatorPointer m_FixedImageGradientCalculator
Definition: itkImageToImageMetricv4.h:756
itk::ImageToImageMetricv4::FixedRealType
typename MetricTraits::FixedRealType FixedRealType
Definition: itkImageToImageMetricv4.h:313
itk::ImageToImageMetricv4::VirtualSpacingType
typename Superclass::VirtualSpacingType VirtualSpacingType
Definition: itkImageToImageMetricv4.h:256
itk::SmartPointer< Self >
itk::ImageToImageMetricv4::m_ComputeDerivative
bool m_ComputeDerivative
Definition: itkImageToImageMetricv4.h:854
itk::ImageToImageMetricv4::FixedTransformPointer
typename Superclass::FixedTransformPointer FixedTransformPointer
Definition: itkImageToImageMetricv4.h:216
itk::ImageToImageMetricv4::GetNumberOfValidPoints
SizeValueType GetNumberOfValidPoints() const override
Definition: itkImageToImageMetricv4.h:549
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageToImageMetricv4::LocalTransformPoint
void LocalTransformPoint(const typename FixedTransformType::OutputPointType &virtualPoint, TFixedImagePoint &mappedFixedPoint) const
Definition: itkImageToImageMetricv4.h:816
itk::ImageToImageMetricv4::JacobianType
typename Superclass::JacobianType JacobianType
Definition: itkImageToImageMetricv4.h:227
itk::ImageToImageMetricv4::m_DefaultFixedImageGradientCalculator
DefaultFixedImageGradientCalculator::Pointer m_DefaultFixedImageGradientCalculator
Definition: itkImageToImageMetricv4.h:748
itk::ImageToImageMetricv4::m_MovingImageGradientCalculator
MovingImageGradientCalculatorPointer m_MovingImageGradientCalculator
Definition: itkImageToImageMetricv4.h:757
itk::ImageToImageMetricv4::m_VirtualSampledPointSet
VirtualPointSetPointer m_VirtualSampledPointSet
Definition: itkImageToImageMetricv4.h:773
itk::ImageToImageMetricv4::DefaultMovingImageGradientCalculator
typename MetricTraits::DefaultMovingImageGradientCalculator DefaultMovingImageGradientCalculator
Definition: itkImageToImageMetricv4.h:349
itk::ImageToImageMetricv4::MovingImageGradientFilterPointer
typename MovingImageGradientFilterType::Pointer MovingImageGradientFilterPointer
Definition: itkImageToImageMetricv4.h:332
itkThreadedImageRegionPartitioner.h
itk::ImageToImageMetricv4::DerivativeType
typename Superclass::DerivativeType DerivativeType
Definition: itkImageToImageMetricv4.h:355
itk::ImageToImageMetricv4::MovingImagePointType
typename MovingImageType::PointType MovingImagePointType
Definition: itkImageToImageMetricv4.h:246
itk::ObjectToObjectMetricBaseTemplate::DerivativeValueType
typename DerivativeType::ValueType DerivativeValueType
Definition: itkObjectToObjectMetricBase.h:113
itk::ImageToImageMetricv4::FixedOutputPointType
typename Superclass::FixedOutputPointType FixedOutputPointType
Definition: itkImageToImageMetricv4.h:218
itk::ImageToImageMetricv4::FixedImagePointType
typename FixedImageType::PointType FixedImagePointType
Definition: itkImageToImageMetricv4.h:239
itk::ImageToImageMetricv4::MovingImagePixelValueType
typename PixelTraits< MovingImagePixelType >::ValueType MovingImagePixelValueType
Definition: itkImageToImageMetricv4.h:860
itk::ImageToImageMetricv4::VirtualImagePointer
typename Superclass::VirtualImagePointer VirtualImagePointer
Definition: itkImageToImageMetricv4.h:252
itk::ImageToImageMetricv4::VirtualSizeType
typename Superclass::VirtualSizeType VirtualSizeType
Definition: itkImageToImageMetricv4.h:255
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itk::ImageToImageMetricv4::FixedImageGradientImagePointer
typename FixedImageGradientImageType::Pointer FixedImageGradientImagePointer
Definition: itkImageToImageMetricv4.h:325
itkDefaultConvertPixelTraits.h
itk::ImageToImageMetricv4::MovingPixelType
MovingImagePixelType MovingPixelType
Definition: itkImageToImageMetricv4.h:243
itkObjectToObjectMetric.h
itk::LinearInterpolateImageFunction
Linearly interpolate an image at specified positions.
Definition: itkLinearInterpolateImageFunction.h:50
itk::ImageToImageMetricv4::MetricTraits
TMetricTraits MetricTraits
Definition: itkImageToImageMetricv4.h:266
itk::ImageToImageMetricv4::FixedInputPointType
typename Superclass::FixedInputPointType FixedInputPointType
Definition: itkImageToImageMetricv4.h:217
itk::ImageToImageMetricv4::m_MovingInterpolator
MovingInterpolatorPointer m_MovingInterpolator
Definition: itkImageToImageMetricv4.h:728
itk::ImageToImageMetricv4::m_MovingImageMask
MovingImageMaskConstPointer m_MovingImageMask
Definition: itkImageToImageMetricv4.h:769
itkDefaultImageToImageMetricTraitsv4.h
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:59
itk::ImageToImageMetricv4::MovingImageMaskConstPointer
typename MovingImageMaskType::ConstPointer MovingImageMaskConstPointer
Definition: itkImageToImageMetricv4.h:283
itk::ImageToImageMetricv4::m_HaveMadeGetValueWarning
bool m_HaveMadeGetValueWarning
Definition: itkImageToImageMetricv4.h:841
itk::ImageToImageMetricv4::m_MetricTraits
MetricTraits m_MetricTraits
Definition: itkImageToImageMetricv4.h:851
itk::ObjectToObjectMetricBaseTemplateEnums::GradientSource
GradientSource
Definition: itkObjectToObjectMetricBase.h:40
itk::ImageToImageMetricv4::SetFixedObject
void SetFixedObject(const ObjectType *object) override
Definition: itkImageToImageMetricv4.h:364
itk::ImageToImageMetricv4::MovingInputPointType
typename Superclass::MovingInputPointType MovingInputPointType
Definition: itkImageToImageMetricv4.h:223
itk::ObjectToObjectMetricBaseTemplate::CoordinateRepresentationType
TInternalComputationValueType CoordinateRepresentationType
Definition: itkObjectToObjectMetricBase.h:106
itk::ImageToImageMetricv4::LocalTransformPoint
void LocalTransformPoint(const TVirtualPoint &virtualPoint, TFixedImagePoint &mappedFixedPoint) const
Definition: itkImageToImageMetricv4.h:827
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageMetricv4::MovingGradientPixelType
typename MetricTraits::MovingGradientPixelType MovingGradientPixelType
Definition: itkImageToImageMetricv4.h:320
itk::ImageToImageMetricv4::m_UseSampledPointSet
bool m_UseSampledPointSet
Definition: itkImageToImageMetricv4.h:776
itk::ImageToImageMetricv4::MovingImageConstPointer
typename MovingImageType::ConstPointer MovingImageConstPointer
Definition: itkImageToImageMetricv4.h:245
itk::CostFunctionTemplate::ParametersValueType
TInternalComputationValueType ParametersValueType
Definition: itkCostFunction.h:52
itk::Concept::IsFloatingPoint
Definition: itkConceptChecking.h:945
itk::ImageToImageMetricv4::VirtualIndexType
typename Superclass::VirtualIndexType VirtualIndexType
Definition: itkImageToImageMetricv4.h:261
itk::ImageToImageMetricv4::FixedSampledPointSetConstPointer
typename FixedSampledPointSetType::ConstPointer FixedSampledPointSetConstPointer
Definition: itkImageToImageMetricv4.h:288
itk::SpatialObject
Implementation of the composite pattern.
Definition: itkSpatialObject.h:57
itk::ImageToImageMetricv4::FixedImageGradientCalculatorPointer
typename FixedImageGradientCalculatorType::Pointer FixedImageGradientCalculatorPointer
Definition: itkImageToImageMetricv4.h:344
itk::ImageToImageMetricv4::VirtualImageGradientType
typename MetricTraits::VirtualImageGradientType VirtualImageGradientType
Definition: itkImageToImageMetricv4.h:299
itkImageToImageFilter.h
itk::ImageToImageMetricv4::LocalTransformPoint
void LocalTransformPoint(const TVirtualPoint &virtualPoint, typename FixedTransformType::OutputPointType &mappedFixedPoint) const
Definition: itkImageToImageMetricv4.h:803
itk::ImageToImageMetricv4::m_DerivativeResult
DerivativeType * m_DerivativeResult
Definition: itkImageToImageMetricv4.h:765
itk::ImageToImageMetricv4::FixedScalarRealType
typename NumericTraits< FixedRealType >::ScalarRealType FixedScalarRealType
Definition: itkImageToImageMetricv4.h:316
itk::ImageToImageMetricv4::MovingImageType
TMovingImage MovingImageType
Definition: itkImageToImageMetricv4.h:241
itk::ImageToImageMetricv4::VirtualRegionType
typename Superclass::VirtualRegionType VirtualRegionType
Definition: itkImageToImageMetricv4.h:254
itk::ImageToImageMetricv4::m_MovingImageGradientFilter
MovingImageGradientFilterPointer m_MovingImageGradientFilter
Definition: itkImageToImageMetricv4.h:739
itk::ImageToImageMetricv4::MovingImageGradientImagePointer
typename MovingImageGradientImageType::Pointer MovingImageGradientImagePointer
Definition: itkImageToImageMetricv4.h:326
itk::ImageToImageMetricv4::m_UseMovingImageGradientFilter
bool m_UseMovingImageGradientFilter
Definition: itkImageToImageMetricv4.h:735
itk::ImageToImageMetricv4::FixedImageGradientCalculatorType
typename MetricTraits::FixedImageGradientCalculatorType FixedImageGradientCalculatorType
Definition: itkImageToImageMetricv4.h:341
itk::CovariantVector
A templated class holding a n-Dimensional covariant vector.
Definition: itkCovariantVector.h:70
itk::ImageToImageMetricv4::MovingTransformPointer
typename Superclass::MovingTransformPointer MovingTransformPointer
Definition: itkImageToImageMetricv4.h:222
itk::ImageToImageMetricv4::m_NumberOfSkippedFixedSampledPoints
SizeValueType m_NumberOfSkippedFixedSampledPoints
Definition: itkImageToImageMetricv4.h:846
itk::ImageToImageMetricv4::m_FixedImageMask
FixedImageMaskConstPointer m_FixedImageMask
Definition: itkImageToImageMetricv4.h:768
itk::ImageToImageMetricv4::MovingScalarRealType
typename NumericTraits< MovingRealType >::ScalarRealType MovingScalarRealType
Definition: itkImageToImageMetricv4.h:317
itk::ImageToImageMetricv4::FixedImageGradientImageType
typename MetricTraits::FixedImageGradientImageType FixedImageGradientImageType
Definition: itkImageToImageMetricv4.h:322
itk::ImageToImageMetricv4::VirtualDirectionType
typename Superclass::VirtualDirectionType VirtualDirectionType
Definition: itkImageToImageMetricv4.h:259
itk::ObjectToObjectMetricBaseTemplate::MeasureType
typename Superclass::MeasureType MeasureType
Definition: itkObjectToObjectMetricBase.h:109
itk::PixelTraits::ValueType
typename TPixelType::ValueType ValueType
Definition: itkPixelTraits.h:52
itk::ImageToImageMetricv4::MovingImageGradientImageType
typename MetricTraits::MovingImageGradientImageType MovingImageGradientImageType
Definition: itkImageToImageMetricv4.h:323
itkConceptMacro
#define itkConceptMacro(name, concept)
Definition: itkConceptChecking.h:64
itk::ImageToImageMetricv4::m_MovingImageGradientImage
MovingImageGradientImagePointer m_MovingImageGradientImage
Definition: itkImageToImageMetricv4.h:753
itk::NumericTraits::ScalarRealType
RealType ScalarRealType
Definition: itkNumericTraits.h:87
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ImageToImageMetricv4::MovingImageGradientType
typename MetricTraits::MovingImageGradientType MovingImageGradientType
Definition: itkImageToImageMetricv4.h:298
itk::ImageToImageMetricv4::m_FixedImageGradientFilter
FixedImageGradientFilterPointer m_FixedImageGradientFilter
Definition: itkImageToImageMetricv4.h:738
itk::ImageToImageMetricv4::m_DefaultMovingImageGradientFilter
DefaultMovingImageGradientFilter::Pointer m_DefaultMovingImageGradientFilter
Definition: itkImageToImageMetricv4.h:744
itk::ImageToImageMetricv4::GetMetricCategory
MetricCategoryType GetMetricCategory() const override
Definition: itkImageToImageMetricv4.h:627
itk::ImageToImageMetricv4::m_FloatingPointCorrectionResolution
DerivativeValueType m_FloatingPointCorrectionResolution
Definition: itkImageToImageMetricv4.h:849
itk::ImageToImageMetricv4::SupportsArbitraryVirtualDomainSamples
bool SupportsArbitraryVirtualDomainSamples() const override
Definition: itkImageToImageMetricv4.h:618
itk::ImageToImageMetricv4::FixedInterpolatorPointer
typename FixedInterpolatorType::Pointer FixedInterpolatorPointer
Definition: itkImageToImageMetricv4.h:293
itk::ImageToImageMetricv4::FixedImageGradientFilterPointer
typename FixedImageGradientFilterType::Pointer FixedImageGradientFilterPointer
Definition: itkImageToImageMetricv4.h:331
itk::ImageToImageMetricv4::VirtualOriginType
typename Superclass::VirtualPointType VirtualOriginType
Definition: itkImageToImageMetricv4.h:257
itk::ImageToImageMetricv4::m_UseFloatingPointCorrection
bool m_UseFloatingPointCorrection
Definition: itkImageToImageMetricv4.h:848
itk::ImageToImageMetricv4::LocalTransformPoint
void LocalTransformPoint(const typename FixedTransformType::OutputPointType &virtualPoint, typename FixedTransformType::OutputPointType &mappedFixedPoint) const
Definition: itkImageToImageMetricv4.h:795
itk::ImageToImageMetricv4::VirtualPointType
typename Superclass::VirtualPointType VirtualPointType
Definition: itkImageToImageMetricv4.h:258
itk::ImageToImageMetricv4
Definition: itkImageToImageMetricv4.h:174
itk::ImageToImageMetricv4::m_FixedInterpolator
FixedInterpolatorPointer m_FixedInterpolator
Definition: itkImageToImageMetricv4.h:727
itk::Object
Base class for most ITK classes.
Definition: itkObject.h:62
itk::ObjectToObjectMetric
Computes similarity between regions of two objects.
Definition: itkObjectToObjectMetric.h:92
itk::ImageToImageMetricv4::m_FixedImageGradientInterpolator
FixedImageGradientInterpolatorType::Pointer m_FixedImageGradientInterpolator
Definition: itkImageToImageMetricv4.h:729
itk::ImageToImageMetricv4::VirtualPointSetPointer
typename Superclass::VirtualPointSetPointer VirtualPointSetPointer
Definition: itkImageToImageMetricv4.h:263
itkPointSet.h
itk::ImageToImageMetricv4::DimensionType
typename Superclass::DimensionType DimensionType
Definition: itkImageToImageMetricv4.h:211
itk::ImageToImageMetricv4::MovingTransformJacobianType
typename Superclass::MovingTransformJacobianType MovingTransformJacobianType
Definition: itkImageToImageMetricv4.h:229
itk::ImageToImageMetricv4::m_DefaultFixedImageGradientFilter
DefaultFixedImageGradientFilter::Pointer m_DefaultFixedImageGradientFilter
Definition: itkImageToImageMetricv4.h:743
itk::ImageToImageMetricv4::FixedImagePixelType
typename FixedImageType::PixelType FixedImagePixelType
Definition: itkImageToImageMetricv4.h:235
itkResampleImageFilter.h
itkInterpolateImageFunction.h
itk::ImageToImageMetricv4::MovingImagePixelType
typename MovingImageType::PixelType MovingImagePixelType
Definition: itkImageToImageMetricv4.h:242
itk::ImageToImageMetricv4::DefaultMovingImageGradientFilter
typename MetricTraits::DefaultMovingImageGradientFilter DefaultMovingImageGradientFilter
Definition: itkImageToImageMetricv4.h:337
itk::ImageToImageMetricv4::MovingTransformParametersType
typename Superclass::MovingTransformParametersType MovingTransformParametersType
Definition: itkImageToImageMetricv4.h:225
itk::ImageToImageMetricv4::FixedGradientPixelType
typename MetricTraits::FixedGradientPixelType FixedGradientPixelType
Definition: itkImageToImageMetricv4.h:319
itk::ImageToImageMetricv4::m_DenseGetValueAndDerivativeThreader
ImageToImageMetricv4GetValueAndDerivativeThreader< ThreadedImageRegionPartitioner< VirtualImageDimension >, Self >::Pointer m_DenseGetValueAndDerivativeThreader
Definition: itkImageToImageMetricv4.h:651
itk::ImageToImageMetricv4::MovingTransformType
typename Superclass::MovingTransformType MovingTransformType
Definition: itkImageToImageMetricv4.h:221
itk::ImageToImageMetricv4::MovingImageGradientCalculatorPointer
typename MovingImageGradientCalculatorType::Pointer MovingImageGradientCalculatorPointer
Definition: itkImageToImageMetricv4.h:345
itk::ImageToImageMetricv4::VirtualPointSetType
typename Superclass::VirtualPointSetType VirtualPointSetType
Definition: itkImageToImageMetricv4.h:262
itk::ImageToImageMetricv4::FixedImagePointer
typename FixedImageType::Pointer FixedImagePointer
Definition: itkImageToImageMetricv4.h:237
itk::InterpolateImageFunction
Base class for all image interpolators.
Definition: itkInterpolateImageFunction.h:45
itk::ImageToImageMetricv4::MovingImagePointer
typename MovingImageType::Pointer MovingImagePointer
Definition: itkImageToImageMetricv4.h:244
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::ImageToImageMetricv4::m_FixedSampledPointSet
FixedSampledPointSetConstPointer m_FixedSampledPointSet
Definition: itkImageToImageMetricv4.h:772
itk::ImageToImageMetricv4::VirtualImageType
typename Superclass::VirtualImageType VirtualImageType
Definition: itkImageToImageMetricv4.h:251
itk::ImageToImageMetricv4::FixedImageConstPointer
typename FixedImageType::ConstPointer FixedImageConstPointer
Definition: itkImageToImageMetricv4.h:238
itk::ImageToImageMetricv4::m_UseVirtualSampledPointSet
bool m_UseVirtualSampledPointSet
Definition: itkImageToImageMetricv4.h:780
itk::ImageToImageMetricv4::VirtualPixelType
typename Superclass::VirtualPixelType VirtualPixelType
Definition: itkImageToImageMetricv4.h:253