ITK  5.3.0
Insight Toolkit
itkImageToImageMetric.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  * https://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 itkImageToImageMetric_h
19 #define itkImageToImageMetric_h
20 
25 #include "itkSpatialObject.h"
27 #include "itkMultiThreaderBase.h"
28 
29 #include <memory> // For unique_ptr.
30 
31 namespace itk
32 {
53 template <typename TFixedImage, typename TMovingImage>
54 class ITK_TEMPLATE_EXPORT ImageToImageMetric : public SingleValuedCostFunction
55 {
56 public:
57  ITK_DISALLOW_COPY_AND_MOVE(ImageToImageMetric);
58 
64 
66  using CoordinateRepresentationType = typename Superclass::ParametersValueType;
67 
70 
72  using MovingImageType = TMovingImage;
73  using MovingImagePixelType = typename TMovingImage::PixelType;
75 
77  using FixedImageType = TFixedImage;
78  using FixedImagePixelType = typename TFixedImage::PixelType;
81 
83  static constexpr unsigned int MovingImageDimension = TMovingImage::ImageDimension;
84  static constexpr unsigned int FixedImageDimension = TFixedImage::ImageDimension;
85 
88 
94 
101 
102  using FixedImageIndexContainer = std::vector<FixedImageIndexType>;
103 
106 
114 
116 
122 
128 
130  using typename Superclass::MeasureType;
131 
133  using typename Superclass::DerivativeType;
134 
136  using typename Superclass::ParametersType;
137 
139  itkSetConstObjectMacro(FixedImage, FixedImageType);
140  itkGetConstObjectMacro(FixedImage, FixedImageType);
144  itkSetConstObjectMacro(MovingImage, MovingImageType);
145  itkGetConstObjectMacro(MovingImage, MovingImageType);
149  itkSetObjectMacro(Transform, TransformType);
150 
152  itkGetModifiableObjectMacro(Transform, TransformType);
153 
155  itkSetObjectMacro(Interpolator, InterpolatorType);
156 
158  itkGetModifiableObjectMacro(Interpolator, InterpolatorType);
159 
163  {
164  return this->GetNumberOfPixelsCounted();
165  }
166 
167  itkGetConstReferenceMacro(NumberOfPixelsCounted, SizeValueType);
168 
170  virtual void
171  SetFixedImageRegion(const FixedImageRegionType reg);
172 
174  itkGetConstReferenceMacro(FixedImageRegion, FixedImageRegionType);
175 
177  itkSetObjectMacro(MovingImageMask, MovingImageMaskType);
178  itkSetConstObjectMacro(MovingImageMask, MovingImageMaskType);
179  itkGetConstObjectMacro(MovingImageMask, MovingImageMaskType);
183  itkSetObjectMacro(FixedImageMask, FixedImageMaskType);
184  itkSetConstObjectMacro(FixedImageMask, FixedImageMaskType);
185  itkGetConstObjectMacro(FixedImageMask, FixedImageMaskType);
190  void
191  SetFixedImageIndexes(const FixedImageIndexContainer & indexes);
192 
193  void
194  SetUseFixedImageIndexes(bool useIndexes);
195 
196  itkGetConstReferenceMacro(UseFixedImageIndexes, bool);
197 
199  void
200  SetNumberOfWorkUnits(ThreadIdType numberOfThreads);
201  itkGetConstReferenceMacro(NumberOfWorkUnits, ThreadIdType);
205  itkSetMacro(ComputeGradient, bool);
206  itkGetConstReferenceMacro(ComputeGradient, bool);
207  itkBooleanMacro(ComputeGradient);
211  virtual void
212  ComputeGradient();
213 
215  itkGetModifiableObjectMacro(GradientImage, GradientImageType);
216 
218  void
219  SetTransformParameters(const ParametersType & parameters) const;
220 
222  unsigned int
223  GetNumberOfParameters() const override
224  {
225  return m_Transform->GetNumberOfParameters();
226  }
227 
230  virtual void
231  Initialize();
232 
234  virtual void
235  MultiThreadingInitialize();
236 
239  virtual void
240  SetNumberOfFixedImageSamples(SizeValueType numSamples);
241  itkGetConstReferenceMacro(NumberOfFixedImageSamples, SizeValueType);
246  void
248  {
249  this->SetNumberOfFixedImageSamples(num);
250  }
251 
254  {
255  return this->GetNumberOfFixedImageSamples();
256  }
257 
260  void
261  SetFixedImageSamplesIntensityThreshold(const FixedImagePixelType & thresh);
262 
263  itkGetConstReferenceMacro(FixedImageSamplesIntensityThreshold, FixedImagePixelType);
264 
265  void
266  SetUseFixedImageSamplesIntensityThreshold(bool useThresh);
267 
268  itkGetConstReferenceMacro(UseFixedImageSamplesIntensityThreshold, bool);
269 
273  void
274  SetUseAllPixels(bool useAllPixels);
275 
276  void
278  {
279  this->SetUseAllPixels(true);
280  }
281 
282  void
284  {
285  this->SetUseAllPixels(false);
286  }
287 
288  itkGetConstReferenceMacro(UseAllPixels, bool);
289 
294  void
295  SetUseSequentialSampling(bool useSequential);
296 
297  itkGetConstReferenceMacro(UseSequentialSampling, bool);
298 
308  void
309  ReinitializeSeed();
310  void
311  ReinitializeSeed(int seed);
330  itkSetMacro(UseCachingOfBSplineWeights, bool);
331  itkGetConstReferenceMacro(UseCachingOfBSplineWeights, bool);
332  itkBooleanMacro(UseCachingOfBSplineWeights);
337  itkGetModifiableObjectMacro(Threader, MultiThreaderType);
338  const TransformPointer *
340  {
341  return m_ThreaderTransform.get();
342  }
345 protected:
347  ~ImageToImageMetric() override = default;
348 
349  void
350  PrintSelf(std::ostream & os, Indent indent) const override;
351 
358  {
359  public:
361  {
362  point.Fill(0.0);
363  value = 0;
364  valueIndex = 0;
365  }
366 
367  ~FixedImageSamplePoint() = default;
368 
369  public:
371  double value;
372  unsigned int valueIndex;
373  };
374 
375  bool m_UseFixedImageIndexes{ false };
377 
378  bool m_UseFixedImageSamplesIntensityThreshold{ false };
380 
382  using FixedImageSampleContainer = std::vector<FixedImageSamplePoint>;
383 
385  virtual void
386  SampleFixedImageRegion(FixedImageSampleContainer & samples) const;
387 
388  virtual void
389  SampleFixedImageIndexes(FixedImageSampleContainer & samples) const;
390 
392  virtual void
393  SampleFullFixedImageRegion(FixedImageSampleContainer & samples) const;
394 
397 
398  SizeValueType m_NumberOfParameters{ 0 };
399 
400  SizeValueType m_NumberOfFixedImageSamples{ 50000 };
401  // m_NumberOfPixelsCounted must be mutable because the const
402  // thread consolidation functions merge each work unit's values
403  // onto this accumulator variable.
404  mutable SizeValueType m_NumberOfPixelsCounted{ 0 };
405 
408 
411 
414  std::unique_ptr<TransformPointer[]> m_ThreaderTransform;
415 
417 
418  bool m_ComputeGradient{ true };
420 
423 
424  ThreadIdType m_NumberOfWorkUnits{ 1 };
425 
426  bool m_UseAllPixels{ false };
427  bool m_UseSequentialSampling{ false };
428 
429  bool m_ReseedIterator{ false };
430 
431  mutable int m_RandomSeed;
432 
440  bool m_TransformIsBSpline{ false };
441 
444  SizeValueType m_NumBSplineWeights{ 0 };
445 
446  static constexpr unsigned int DeformationSplineOrder = 3;
447 
448  using BSplineTransformType =
450 
452  using WeightsValueType = typename BSplineTransformWeightsType::ValueType;
454 
456  using IndexValueType = typename BSplineTransformIndexArrayType::ValueType;
458 
459  using MovingImagePointArrayType = std::vector<MovingImagePointType>;
460  using BooleanArrayType = std::vector<bool>;
468 
472 
474 
479 
481 
482  // Variables needed for optionally caching values when using a BSpline
483  // transform.
484  bool m_UseCachingOfBSplineWeights{ true };
487 
488  mutable std::unique_ptr<BSplineTransformWeightsType[]> m_ThreaderBSplineTransformWeights;
489  mutable std::unique_ptr<BSplineTransformIndexArrayType[]> m_ThreaderBSplineTransformIndices;
490 
491  virtual void
492  PreComputeTransformValues();
493 
496  virtual void
497  TransformPoint(unsigned int sampleNumber,
498  MovingImagePointType & mappedPoint,
499  bool & sampleOk,
500  double & movingImageValue,
501  ThreadIdType threadId) const;
502 
503  virtual void
504  TransformPointWithDerivatives(unsigned int sampleNumber,
505  MovingImagePointType & mappedPoint,
506  bool & sampleOk,
507  double & movingImageValue,
508  ImageDerivativesType & movingImageGradient,
509  ThreadIdType threadId) const;
510 
512  bool m_InterpolatorIsBSpline{ false };
513 
516 
519 
521  virtual void
522  ComputeImageDerivatives(const MovingImagePointType & mappedPoint,
523  ImageDerivativesType & gradient,
524  ThreadIdType threadId) const;
525 
539  {
540  public:
542  : m_ConstMetricPointer{ i2i_metricPointer }
543  {}
544  const ImageToImageMetric *
546  {
547  return m_ConstMetricPointer;
548  }
551  private:
553  };
554 
563  {
564  public:
565  MultiThreaderWorkUnitInfoImageToImageMetricWrapper(const void * workunitInfoAsVoid)
566  : m_WorkUnitInfo(static_cast<const typename MultiThreaderType::WorkUnitInfo *>(workunitInfoAsVoid))
567  {}
569  GetThreadId() const
570  {
571  return m_WorkUnitInfo->WorkUnitID;
572  }
573  const ImageToImageMetric *
575  {
576  return (static_cast<ConstantPointerWrapper *>(m_WorkUnitInfo->UserData))->GetConstMetricPointer();
577  }
580  private:
582  };
583 
585  std::unique_ptr<ConstantPointerWrapper> m_ConstSelfWrapper;
586  mutable std::unique_ptr<unsigned int[]> m_ThreaderNumberOfMovingImageSamples;
587  bool m_WithinThreadPreProcess{ false };
588  bool m_WithinThreadPostProcess{ false };
589 
590  void
591  GetValueMultiThreadedInitiate() const;
592 
593  void
594  GetValueMultiThreadedPostProcessInitiate() const;
595 
597  GetValueMultiThreaded(void * workunitInfoAsVoid);
598 
600  GetValueMultiThreadedPostProcess(void * workunitInfoAsVoid);
601 
602  virtual inline void
603  GetValueThread(ThreadIdType threadId) const;
604 
605  virtual inline void
606  GetValueThreadPreProcess(ThreadIdType itkNotUsed(threadId), bool itkNotUsed(withinSampleThread)) const
607  {}
608  virtual inline bool
610  SizeValueType itkNotUsed(fixedImageSample),
611  const MovingImagePointType & itkNotUsed(mappedPoint),
612  double itkNotUsed(movingImageValue)) const
613  {
614  return false;
615  }
616  virtual inline void
617  GetValueThreadPostProcess(ThreadIdType itkNotUsed(threadId), bool itkNotUsed(withinSampleThread)) const
618  {}
619 
620  void
621  GetValueAndDerivativeMultiThreadedInitiate() const;
622 
623  void
624  GetValueAndDerivativeMultiThreadedPostProcessInitiate() const;
625 
627  GetValueAndDerivativeMultiThreaded(void * workunitInfoAsVoid);
628 
630  GetValueAndDerivativeMultiThreadedPostProcess(void * workunitInfoAsVoid);
631 
632  virtual inline void
633  GetValueAndDerivativeThread(ThreadIdType threadId) const;
634 
635  virtual inline void
636  GetValueAndDerivativeThreadPreProcess(ThreadIdType itkNotUsed(threadId), bool itkNotUsed(withinSampleThread)) const
637  {}
638  virtual inline bool
640  SizeValueType itkNotUsed(fixedImageSample),
641  const MovingImagePointType & itkNotUsed(mappedPoint),
642  double itkNotUsed(movingImageValue),
643  const ImageDerivativesType & itkNotUsed(movingImageGradientValue)) const
644  {
645  return false;
646  }
647  virtual inline void
648  GetValueAndDerivativeThreadPostProcess(ThreadIdType itkNotUsed(threadId), bool itkNotUsed(withinSampleThread)) const
649  {}
650 
654  virtual void
655  SynchronizeTransforms() const;
656 
657 private:
659 };
660 } // end namespace itk
661 
662 #ifndef ITK_MANUAL_INSTANTIATION
663 # include "itkImageToImageMetric.hxx"
664 #endif
665 
666 #endif
itk::ImageToImageMetric::m_DerivativeCalculator
DerivativeFunctionType::Pointer m_DerivativeCalculator
Definition: itkImageToImageMetric.h:518
itk::ImageToImageMetric::FixedImageConstPointer
typename FixedImageType::ConstPointer FixedImageConstPointer
Definition: itkImageToImageMetric.h:79
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:92
itk::MultiThreaderBase
A class for performing multithreaded execution.
Definition: itkMultiThreaderBase.h:106
itk::ImageToImageMetric
Computes similarity between regions of two images.
Definition: itkImageToImageMetric.h:54
itk::ImageToImageMetric::MultiThreaderWorkUnitInfoImageToImageMetricWrapper::m_WorkUnitInfo
const MultiThreaderType::WorkUnitInfo * m_WorkUnitInfo
Definition: itkImageToImageMetric.h:581
itk::ImageToImageMetric::MovingImageMaskConstPointer
typename MovingImageMaskType::ConstPointer MovingImageMaskConstPointer
Definition: itkImageToImageMetric.h:127
itk::OptimizerParameters
Class to hold and manage different parameter types used during optimization.
Definition: itkOptimizerParameters.h:36
itk::ImageToImageMetric::WeightsValueType
typename BSplineTransformWeightsType::ValueType WeightsValueType
Definition: itkImageToImageMetric.h:452
itk::ImageToImageMetric::MovingImageIndexType
typename MovingImageType::IndexType MovingImageIndexType
Definition: itkImageToImageMetric.h:98
ConstPointer
SmartPointer< const Self > ConstPointer
Definition: itkAddImageFilter.h:93
itk::ImageToImageMetric::m_MovingImageMask
MovingImageMaskConstPointer m_MovingImageMask
Definition: itkImageToImageMetric.h:422
itk::ImageToImageMetric::MovingImagePointArrayType
std::vector< MovingImagePointType > MovingImagePointArrayType
Definition: itkImageToImageMetric.h:459
itk::ImageToImageMetric::GetValueAndDerivativeThreadPreProcess
virtual void GetValueAndDerivativeThreadPreProcess(ThreadIdType, bool) const
Definition: itkImageToImageMetric.h:636
itk::ImageToImageMetric::FixedImageSamplePoint::valueIndex
unsigned int valueIndex
Definition: itkImageToImageMetric.h:372
itk::ImageToImageMetric::m_BSplineTransform
BSplineTransformType::Pointer m_BSplineTransform
Definition: itkImageToImageMetric.h:473
itk::ImageToImageMetric::GetValueAndDerivativeThreadPostProcess
virtual void GetValueAndDerivativeThreadPostProcess(ThreadIdType, bool) const
Definition: itkImageToImageMetric.h:648
itk::ImageToImageMetric::m_ConstSelfWrapper
std::unique_ptr< ConstantPointerWrapper > m_ConstSelfWrapper
Definition: itkImageToImageMetric.h:585
itk::MultiThreaderBase::WorkUnitInfo
Definition: itkMultiThreaderBase.h:291
itk::ImageToImageMetric::FixedImagePointType
typename TransformType::InputPointType FixedImagePointType
Definition: itkImageToImageMetric.h:99
itk::ImageToImageMetric::GetNumberOfMovingImageSamples
SizeValueType GetNumberOfMovingImageSamples()
Definition: itkImageToImageMetric.h:162
itk::ImageToImageMetric::FixedImageIndexValueType
typename FixedImageIndexType::IndexValueType FixedImageIndexValueType
Definition: itkImageToImageMetric.h:97
itk::ImageToImageMetric::MultiThreaderWorkUnitInfoImageToImageMetricWrapper::MultiThreaderWorkUnitInfoImageToImageMetricWrapper
MultiThreaderWorkUnitInfoImageToImageMetricWrapper(const void *workunitInfoAsVoid)
Definition: itkImageToImageMetric.h:565
itk::ImageToImageMetric::m_MovingImage
MovingImageConstPointer m_MovingImage
Definition: itkImageToImageMetric.h:407
itk::BSplineInterpolateImageFunction
Evaluates the B-Spline interpolation of an image. Spline order may be from 0 to 5.
Definition: itkBSplineInterpolateImageFunction.h:83
itk::ImageToImageMetric::TransformParametersType
typename TransformType::ParametersType TransformParametersType
Definition: itkImageToImageMetric.h:92
itk::BSplineBaseTransform::WeightsType
typename WeightsFunctionType::WeightsType WeightsType
Definition: itkBSplineBaseTransform.h:235
itk::ImageToImageMetric::ConstantPointerWrapper::ConstantPointerWrapper
ConstantPointerWrapper(ImageToImageMetric *i2i_metricPointer)
Definition: itkImageToImageMetric.h:541
itkSpatialObject.h
itk::ImageToImageMetric::GetValueThreadProcessSample
virtual bool GetValueThreadProcessSample(ThreadIdType, SizeValueType, const MovingImagePointType &, double) const
Definition: itkImageToImageMetric.h:609
itk::ImageToImageMetric::GetNumberOfParameters
unsigned int GetNumberOfParameters() const override
Definition: itkImageToImageMetric.h:223
itk::ImageToImageMetric::FixedImageIndexContainer
std::vector< FixedImageIndexType > FixedImageIndexContainer
Definition: itkImageToImageMetric.h:102
itk::ImageToImageMetric::RealType
typename NumericTraits< MovingImagePixelType >::RealType RealType
Definition: itkImageToImageMetric.h:108
itk::ImageToImageMetric::TransformJacobianType
typename TransformType::JacobianType TransformJacobianType
Definition: itkImageToImageMetric.h:93
itk::ImageToImageMetric::m_FixedImageMask
FixedImageMaskConstPointer m_FixedImageMask
Definition: itkImageToImageMetric.h:421
itk::ImageToImageMetric::UseAllPixelsOff
void UseAllPixelsOff()
Definition: itkImageToImageMetric.h:283
itk::ImageToImageMetric::m_Threader
MultiThreaderType::Pointer m_Threader
Definition: itkImageToImageMetric.h:584
itk::ImageToImageMetric::ConstantPointerWrapper
Definition: itkImageToImageMetric.h:538
itk::CentralDifferenceImageFunction
Calculate the derivative by central differencing.
Definition: itkCentralDifferenceImageFunction.h:76
itk::ImageToImageMetric::m_FixedImageSamplesIntensityThreshold
FixedImagePixelType m_FixedImageSamplesIntensityThreshold
Definition: itkImageToImageMetric.h:379
itk::ImageToImageMetric::MovingImagePointType
typename TransformType::OutputPointType MovingImagePointType
Definition: itkImageToImageMetric.h:100
itk::ImageToImageMetric::m_BSplineTransformIndices
BSplineTransformIndexArrayType m_BSplineTransformIndices
Definition: itkImageToImageMetric.h:486
Threader
itk::ImageToImageMetric::m_ThreaderNumberOfMovingImageSamples
std::unique_ptr< unsigned int[]> m_ThreaderNumberOfMovingImageSamples
Definition: itkImageToImageMetric.h:586
itk::ImageToImageMetric::FixedImageType
TFixedImage FixedImageType
Definition: itkImageToImageMetric.h:77
itk::ImageToImageMetric::m_ThreaderBSplineTransformWeights
std::unique_ptr< BSplineTransformWeightsType[]> m_ThreaderBSplineTransformWeights
Definition: itkImageToImageMetric.h:488
itk::ImageToImageMetric::OutputPointType
typename TransformType::OutputPointType OutputPointType
Definition: itkImageToImageMetric.h:91
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::ImageToImageMetric::m_FixedImageIndexes
FixedImageIndexContainer m_FixedImageIndexes
Definition: itkImageToImageMetric.h:376
itk::ImageToImageMetric::IndexValueType
typename BSplineTransformIndexArrayType::ValueType IndexValueType
Definition: itkImageToImageMetric.h:456
itk::ImageToImageMetric::m_FixedImage
FixedImageConstPointer m_FixedImage
Definition: itkImageToImageMetric.h:406
itk::ImageToImageMetric::InputPointType
typename TransformType::InputPointType InputPointType
Definition: itkImageToImageMetric.h:90
itk::ImageToImageMetric::GetValueAndDerivativeThreadProcessSample
virtual bool GetValueAndDerivativeThreadProcessSample(ThreadIdType, SizeValueType, const MovingImagePointType &, double, const ImageDerivativesType &) const
Definition: itkImageToImageMetric.h:639
itk::IndexValueType
long IndexValueType
Definition: itkIntTypes.h:90
itk::ImageToImageMetric::FixedImageMaskPointer
typename FixedImageMaskType::Pointer FixedImageMaskPointer
Definition: itkImageToImageMetric.h:120
itk::ImageToImageMetric::m_RandomSeed
int m_RandomSeed
Definition: itkImageToImageMetric.h:431
itk::ImageToImageMetric::m_WithinBSplineSupportRegionArray
BooleanArrayType m_WithinBSplineSupportRegionArray
Definition: itkImageToImageMetric.h:478
itk::ImageToImageMetric::BooleanArrayType
std::vector< bool > BooleanArrayType
Definition: itkImageToImageMetric.h:460
itk::ThreadIdType
unsigned int ThreadIdType
Definition: itkIntTypes.h:99
itk::GTest::TypedefsAndConstructors::Dimension2::IndexType
ImageBaseType::IndexType IndexType
Definition: itkGTestTypedefsAndConstructors.h:50
itkBSplineInterpolateImageFunction.h
itkGradientRecursiveGaussianImageFilter.h
itk::ImageToImageMetric::GetValueThreadPreProcess
virtual void GetValueThreadPreProcess(ThreadIdType, bool) const
Definition: itkImageToImageMetric.h:606
itk::ImageToImageMetric::m_FixedImageSamples
FixedImageSampleContainer m_FixedImageSamples
Definition: itkImageToImageMetric.h:396
itk::ImageToImageMetric::m_FixedImageRegion
FixedImageRegionType m_FixedImageRegion
Definition: itkImageToImageMetric.h:658
itk::ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
itk::ITK_THREAD_RETURN_TYPE ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
Definition: itkThreadSupport.h:88
itk::ImageToImageMetric::m_BSplineTransformWeights
BSplineTransformWeightsType m_BSplineTransformWeights
Definition: itkImageToImageMetric.h:485
itk::ImageToImageMetric::FixedImageSamplePoint::FixedImageSamplePoint
FixedImageSamplePoint()
Definition: itkImageToImageMetric.h:360
itk::LightObject
Light weight base class for most itk classes.
Definition: itkLightObject.h:55
itk::ImageToImageMetric::m_GradientImage
GradientImagePointer m_GradientImage
Definition: itkImageToImageMetric.h:419
itkCentralDifferenceImageFunction.h
itk::ImageToImageMetric::MovingImageConstPointer
typename MovingImageType::ConstPointer MovingImageConstPointer
Definition: itkImageToImageMetric.h:74
itk::point
*par Constraints *The filter requires an image with at least two dimensions and a vector *length of at least The theory supports extension to scalar but *the implementation of the itk vector classes do not **The template parameter TRealType must be floating point(float or double) or *a user-defined "real" numerical type with arithmetic operations defined *sufficient to compute derivatives. **\par Performance *This filter will automatically multithread if run with *SetUsePrincipleComponents
itk::ImageToImageMetric::SetNumberOfSpatialSamples
void SetNumberOfSpatialSamples(SizeValueType num)
Definition: itkImageToImageMetric.h:247
itk::ImageToImageMetric::m_ThreaderBSplineTransformIndices
std::unique_ptr< BSplineTransformIndexArrayType[]> m_ThreaderBSplineTransformIndices
Definition: itkImageToImageMetric.h:489
itk::GTest::TypedefsAndConstructors::Dimension2::RegionType
ImageBaseType::RegionType RegionType
Definition: itkGTestTypedefsAndConstructors.h:54
itk::ImageToImageMetric::m_BSplineTransformIndicesArray
BSplineTransformIndicesArrayType m_BSplineTransformIndicesArray
Definition: itkImageToImageMetric.h:476
itk::ImageToImageMetric::m_BSplinePreTransformPointsArray
MovingImagePointArrayType m_BSplinePreTransformPointsArray
Definition: itkImageToImageMetric.h:477
itk::GradientRecursiveGaussianImageFilter
Computes the gradient of an image by convolution with the first derivative of a Gaussian.
Definition: itkGradientRecursiveGaussianImageFilter.h:59
itk::SingleValuedCostFunction
This class is a base for the CostFunctions returning a single value.
Definition: itkSingleValuedCostFunction.h:34
itk::ImageToImageMetric::FixedImageMaskConstPointer
typename FixedImageMaskType::ConstPointer FixedImageMaskConstPointer
Definition: itkImageToImageMetric.h:121
itk::ImageToImageMetric::m_ThreaderTransform
std::unique_ptr< TransformPointer[]> m_ThreaderTransform
Definition: itkImageToImageMetric.h:414
itk::ImageToImageMetric::FixedImagePixelType
typename TFixedImage::PixelType FixedImagePixelType
Definition: itkImageToImageMetric.h:78
itk::ImageToImageMetric::FixedImageSamplePoint::point
FixedImagePointType point
Definition: itkImageToImageMetric.h:370
itk::SpatialObject
Implementation of the composite pattern.
Definition: itkSpatialObject.h:57
itk::ImageToImageMetric::GetThreaderTransform
const TransformPointer * GetThreaderTransform()
Definition: itkImageToImageMetric.h:339
itk::ImageToImageMetric::MultiThreaderWorkUnitInfoImageToImageMetricWrapper
Definition: itkImageToImageMetric.h:562
itk::ImageToImageMetric::FixedImageSampleContainer
std::vector< FixedImageSamplePoint > FixedImageSampleContainer
Definition: itkImageToImageMetric.h:382
itk::FixedArray
Simulate a standard C array with copy semantics.
Definition: itkFixedArray.h:53
itk::ImageToImageMetric::UseAllPixelsOn
void UseAllPixelsOn()
Definition: itkImageToImageMetric.h:277
itk::ImageToImageMetric::MovingImagePixelType
typename TMovingImage::PixelType MovingImagePixelType
Definition: itkImageToImageMetric.h:73
itk::CovariantVector
A templated class holding a n-Dimensional covariant vector.
Definition: itkCovariantVector.h:70
itk::ImageToImageMetric::MultiThreaderWorkUnitInfoImageToImageMetricWrapper::GetThreadId
ThreadIdType GetThreadId() const
Definition: itkImageToImageMetric.h:569
itk::ImageToImageMetric::TransformPointer
typename TransformType::Pointer TransformPointer
Definition: itkImageToImageMetric.h:89
itk::ImageToImageMetric::ConstantPointerWrapper::m_ConstMetricPointer
const ImageToImageMetric * m_ConstMetricPointer
Definition: itkImageToImageMetric.h:552
itk::ImageToImageMetric::m_Transform
TransformPointer m_Transform
Definition: itkImageToImageMetric.h:410
itk::ImageToImageMetric::FixedImageSamplePoint
Definition: itkImageToImageMetric.h:357
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itk::ImageToImageMetric::MovingImageType
TMovingImage MovingImageType
Definition: itkImageToImageMetric.h:72
itkMultiThreaderBase.h
itk::ImageToImageMetric::FixedImageSamplePoint::value
double value
Definition: itkImageToImageMetric.h:371
itkBSplineBaseTransform.h
itk::BSplineBaseTransform
A base class with common elements of BSplineTransform and BSplineDeformableTransform.
Definition: itkBSplineBaseTransform.h:34
itk::ImageToImageMetric::GradientImageFilterPointer
typename GradientImageFilterType::Pointer GradientImageFilterPointer
Definition: itkImageToImageMetric.h:113
itk::ImageToImageMetric::GetValueThreadPostProcess
virtual void GetValueThreadPostProcess(ThreadIdType, bool) const
Definition: itkImageToImageMetric.h:617
itk::ImageToImageMetric::m_BSplineTransformWeightsArray
BSplineTransformWeightsArrayType m_BSplineTransformWeightsArray
Definition: itkImageToImageMetric.h:475
itk::ImageToImageMetric::m_BSplineInterpolator
BSplineInterpolatorType::Pointer m_BSplineInterpolator
Definition: itkImageToImageMetric.h:515
itk::Point
A templated class holding a geometric point in n-Dimensional space.
Definition: itkPoint.h:53
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::ImageToImageMetric::InterpolatorPointer
typename InterpolatorType::Pointer InterpolatorPointer
Definition: itkImageToImageMetric.h:115
itk::ImageToImageMetric::MultiThreaderWorkUnitInfoImageToImageMetricWrapper::GetConstImageToImageMetricPointer
const ImageToImageMetric * GetConstImageToImageMetricPointer() const
Definition: itkImageToImageMetric.h:574
itk::NumericTraits::RealType
double RealType
Definition: itkNumericTraits.h:84
itk::Transform
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:83
itk::ImageToImageMetric::FixedImageIndexType
typename FixedImageType::IndexType FixedImageIndexType
Definition: itkImageToImageMetric.h:96
itk::Array2D
Array2D class representing a 2D array with size defined at construction time.
Definition: itkArray2D.h:45
itkSingleValuedCostFunction.h
itk::ImageToImageMetric::m_BSplineParametersOffset
BSplineParametersOffsetType m_BSplineParametersOffset
Definition: itkImageToImageMetric.h:480
itk::ImageToImageMetric::CoordinateRepresentationType
typename Superclass::ParametersValueType CoordinateRepresentationType
Definition: itkImageToImageMetric.h:66
itk::ImageToImageMetric::ConstantPointerWrapper::GetConstMetricPointer
const ImageToImageMetric * GetConstMetricPointer() const
Definition: itkImageToImageMetric.h:545
itk::ImageToImageMetric::GetNumberOfSpatialSamples
SizeValueType GetNumberOfSpatialSamples()
Definition: itkImageToImageMetric.h:253
itk::ImageToImageMetric::BSplineTransformWeightsType
typename BSplineTransformType::WeightsType BSplineTransformWeightsType
Definition: itkImageToImageMetric.h:451
itk::ImageToImageMetric::BSplineTransformIndexArrayType
typename BSplineTransformType::ParameterIndexArrayType BSplineTransformIndexArrayType
Definition: itkImageToImageMetric.h:455
itk::InterpolateImageFunction
Base class for all image interpolators.
Definition: itkInterpolateImageFunction.h:45
itk::ImageToImageMetric::m_Interpolator
InterpolatorPointer m_Interpolator
Definition: itkImageToImageMetric.h:416
itk::SizeValueType
unsigned long SizeValueType
Definition: itkIntTypes.h:83
itk::ImageToImageMetric::MovingImageMaskPointer
typename MovingImageMaskType::Pointer MovingImageMaskPointer
Definition: itkImageToImageMetric.h:126
itk::ImageToImageMetric::FixedImageRegionType
typename FixedImageType::RegionType FixedImageRegionType
Definition: itkImageToImageMetric.h:80