From 7551626b9ea5315e393d81f92f12c34bb78445ca Mon Sep 17 00:00:00 2001 From: Emmanuel Christophe <emmanuel.christophe@orfeo-toolbox.org> Date: Sat, 18 Sep 2010 17:16:04 +0800 Subject: [PATCH] Backed out changeset 71c4d1c986c5 (not good enough) --- .../otbFineRegistrationImageFilter.h | 16 +++++----------- .../otbFineRegistrationImageFilter.txx | 8 ++++---- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/Code/DisparityMap/otbFineRegistrationImageFilter.h b/Code/DisparityMap/otbFineRegistrationImageFilter.h index 7212c97506..a433c112d9 100644 --- a/Code/DisparityMap/otbFineRegistrationImageFilter.h +++ b/Code/DisparityMap/otbFineRegistrationImageFilter.h @@ -22,7 +22,6 @@ #include "itkInterpolateImageFunction.h" #include "itkContinuousIndex.h" -#include "itkTransform.h" #include "itkTranslationTransform.h" #include "itkImageToImageMetric.txx" @@ -52,8 +51,8 @@ namespace otb * This filter accepts fixed and moving images with different sizes and spacing. Metric and search windows radius * are expressed in terms of number of pixels in the fixed image. * - * An initial transform can be used to reduce computation time in case of input and moving images with a significant - * offset. This transform is taken into account in the output deformation field. + * An initial offset can be used to reduce computation time in case of input and moving images with a significant + * offset. This offset is taken into account in the output deformation field. * * It is possible to generate an output metric map and deformation field at a coarser resolution by setting * grid step to value higher than 1 (grid step is expressed in terms of number of fixed image pixels). @@ -99,9 +98,8 @@ public: typedef typename itk::ImageToImageMetric<TInputImage, TInputImage> MetricType; typedef typename MetricType::Pointer MetricPointerType; - typedef typename itk::Transform<double,2,2> TransformType; - typedef typename TransformType::Pointer TransformPointerType; - typedef typename itk::TranslationTransform<double,2> TranslationTransformType; + typedef typename itk::TranslationTransform<double,2> TranslationType; + typedef typename TranslationType::Pointer TranslationPointerType; /** Set/Get the Metric used to compare images */ itkSetObjectMacro(Metric,MetricType); @@ -144,10 +142,6 @@ public: itkSetMacro(UseSpacing,bool); itkBooleanMacro(UseSpacing); - /** Set default transform between the two images */ - itkSetObjectMacro(Transform, TransformType); - itkGetConstObjectMacro(Transform, TransformType); - /** Set default offset between the two images */ itkSetMacro(InitialOffset,SpacingType); itkGetConstReferenceMacro(InitialOffset,SpacingType); @@ -215,7 +209,7 @@ private: MetricPointerType m_Metric; /** The translation */ - TransformPointerType m_Transform; + TranslationPointerType m_Translation; /** Default offset */ SpacingType m_InitialOffset; diff --git a/Code/DisparityMap/otbFineRegistrationImageFilter.txx b/Code/DisparityMap/otbFineRegistrationImageFilter.txx index 0b4629b708..c02f405246 100644 --- a/Code/DisparityMap/otbFineRegistrationImageFilter.txx +++ b/Code/DisparityMap/otbFineRegistrationImageFilter.txx @@ -57,8 +57,8 @@ FineRegistrationImageFilter<TInputImage,T0utputCorrelation,TOutputDeformationFie // Default interpolator m_Interpolator = itk::LinearInterpolateImageFunction<TInputImage,double>::New(); - // Transform: default on a translation - m_Transform = TranslationTransformType::New(); + // Translation + m_Translation = TranslationType::New(); // Grid Step m_GridStep.Fill(1); @@ -297,7 +297,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie // Wire currentMetric m_Interpolator->SetInputImage(this->GetMovingInput()); - m_Metric->SetTransform(m_Transform); + m_Metric->SetTransform(m_Translation); m_Metric->SetInterpolator(m_Interpolator); m_Metric->SetFixedImage(fixedPtr); m_Metric->SetMovingImage(movingPtr); @@ -320,7 +320,7 @@ FineRegistrationImageFilter<TInputImage,TOutputCorrelation,TOutputDeformationFie double currentMetric, optMetric; // Optimal translation parameters - typename TransformType::ParametersType params(2), optParams(2), tmpOptParams(2); + typename TranslationType::ParametersType params(2), optParams(2), tmpOptParams(2); // Final deformation value DeformationValueType deformationValue; -- GitLab