15 template <
typename TInputImageType>
23 template <
typename TInputImageType>
34 template <
typename TInputImageType>
41 switch(m_SimilarityType)
46 typename InputImageType::IOPixelType, InputImageType::ImageDimension >
MetricType;
48 metric = MetricType::New();
56 typename InputImageType::IOPixelType, InputImageType::ImageDimension >
MetricType;
58 typename MetricType::Pointer tmpMetric = MetricType::New();
61 tmpMetric->SetVarianceThreshold(this->GetBlockVarianceThreshold());
71 typename InputImageType::IOPixelType, InputImageType::ImageDimension >
MetricType;
73 metric = MetricType::New();
79 BaseMetricType *baseMetric = dynamic_cast <BaseMetricType *> (metric.GetPointer());
84 baseMetric->SetModelRotation((
typename BaseMetricType::ModelReorientationType)m_ModelRotationType);
87 typename LocalInterpolatorType::Pointer interpolator = LocalInterpolatorType::New();
89 baseMetric->SetInterpolator(interpolator);
91 baseMetric->SetFixedImage(this->GetReferenceImage());
92 baseMetric->SetMovingImage(this->GetMovingImage());
93 interpolator->SetInputImage(this->GetMovingImage());
98 template <
typename TInputImageType>
103 switch (m_SimilarityType)
113 template <
typename TInputImageType>
119 this->Superclass::BlockMatchingSetup(metric,block);
123 InternalMetricType *tmpMetric = dynamic_cast <InternalMetricType *> (metric.GetPointer());
125 tmpMetric->SetTransform(this->GetBlockTransformPointer(block));
126 tmpMetric->Initialize();
129 typename InputImageType::IOPixelType,
130 InputImageType::ImageDimension > TensorCorrelationMetricType;
134 typename InputImageType::IOPixelType,
135 InputImageType::ImageDimension > TensorGeneralizedMetricType;
139 ((TensorGeneralizedMetricType *)metric.GetPointer())->PreComputeFixedValues();
142 ((TensorCorrelationMetricType *)metric.GetPointer())->PreComputeFixedValues();
virtual double ComputeBlockWeight(double val, unsigned int block)
virtual MetricPointer SetupMetric()
virtual void SetFixedImageRegion(FixedImageRegionType _arg)
virtual void BlockMatchingSetup(MetricPointer &metric, unsigned int block)
itk::SingleValuedCostFunction MetricType
virtual void SetModelRotation(ModelReorientationType _arg)
Superclass::MetricPointer MetricPointer
Tensor correlation similarity measure as defined by Taquet et al.
Superclass::MetricPointer MetricPointer
bool GetMaximizedMetric()