From 1eda0d3e545d4543fb020f66f502cd2f5c290ac9 Mon Sep 17 00:00:00 2001 From: Julien Michel <julien.michel@c-s.fr> Date: Tue, 2 Dec 2008 17:43:22 +0100 Subject: [PATCH] COMP: Deformation field type is otb::Image<itk::Vector<double,2>, 2>, not otb::VectorImage<double,2> --- Code/DisparityMap/otbStreamingWarpImageFilter.txx | 1 - .../Code/DisparityMap/otbStreamingWarpImageFilter.cxx | 10 +++++----- .../DisparityMap/otbStreamingWarpImageFilterNew.cxx | 11 ++++------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Code/DisparityMap/otbStreamingWarpImageFilter.txx b/Code/DisparityMap/otbStreamingWarpImageFilter.txx index 8018205eec..fc825a5efa 100644 --- a/Code/DisparityMap/otbStreamingWarpImageFilter.txx +++ b/Code/DisparityMap/otbStreamingWarpImageFilter.txx @@ -32,7 +32,6 @@ StreamingWarpImageFilter<TInputImage,TOutputImage,TDeformationField> ::StreamingWarpImageFilter() { // Fill the default maximum deformation - m_MaximumDeformation.SetSize(InputImageType::ImageDimension); m_MaximumDeformation.Fill(1); } diff --git a/Testing/Code/DisparityMap/otbStreamingWarpImageFilter.cxx b/Testing/Code/DisparityMap/otbStreamingWarpImageFilter.cxx index b2d8f157b7..cd136dca30 100644 --- a/Testing/Code/DisparityMap/otbStreamingWarpImageFilter.cxx +++ b/Testing/Code/DisparityMap/otbStreamingWarpImageFilter.cxx @@ -15,14 +15,13 @@ PURPOSE. See the above copyright notices for more information. =========================================================================*/ -#include "otbImage.h" #include "otbVectorImage.h" +#include "itkVector.h" +#include "otbImage.h" #include "otbImageFileReader.h" #include "otbStreamingImageFileWriter.h" - #include "otbStreamingWarpImageFilter.h" - int otbStreamingWarpImageFilter(int argc, char* argv[]) { if(argc!=5) @@ -41,7 +40,8 @@ int otbStreamingWarpImageFilter(int argc, char* argv[]) const unsigned int Dimension=2; typedef double PixelType; typedef otb::Image<PixelType,Dimension> ImageType; - typedef otb::VectorImage<PixelType,Dimension> DeformationFieldType; + typedef itk::Vector<PixelType,2> DeformationValueType; + typedef otb::Image<DeformationValueType,Dimension> DeformationFieldType; // Warper typedef otb::StreamingWarpImageFilter<ImageType,ImageType,DeformationFieldType> ImageWarperType; @@ -62,7 +62,7 @@ int otbStreamingWarpImageFilter(int argc, char* argv[]) deformationReader->SetFileName(deffname); // Warping - ImageWarperType::DeformationValueType maxDeformation; + DeformationValueType maxDeformation; maxDeformation.Fill(maxdef); warper->SetMaximumDeformation(maxDeformation); warper->SetInput(reader->GetOutput()); diff --git a/Testing/Code/DisparityMap/otbStreamingWarpImageFilterNew.cxx b/Testing/Code/DisparityMap/otbStreamingWarpImageFilterNew.cxx index 62499b69d0..e1279094ae 100644 --- a/Testing/Code/DisparityMap/otbStreamingWarpImageFilterNew.cxx +++ b/Testing/Code/DisparityMap/otbStreamingWarpImageFilterNew.cxx @@ -16,21 +16,18 @@ =========================================================================*/ #include "otbImage.h" -#include "otbVectorImage.h" -#include "otbImageFileReader.h" -#include "otbStreamingImageFileWriter.h" - +#include "itkVector.h" #include "otbStreamingWarpImageFilter.h" - int otbStreamingWarpImageFilterNew(int argc, char* argv[]) { // Images definition const unsigned int Dimension=2; typedef double PixelType; + typedef itk::Vector<PixelType,2> DeformationValueType; typedef otb::Image<PixelType,Dimension> ImageType; - typedef otb::VectorImage<PixelType,Dimension> DeformationFieldType; - + typedef otb::Image<DeformationValueType,2> DeformationFieldType; + // Warper typedef otb::StreamingWarpImageFilter<ImageType,ImageType,DeformationFieldType> ImageWarperType; -- GitLab