Skip to content
Snippets Groups Projects
Commit 1eda0d3e authored by Julien Michel's avatar Julien Michel
Browse files

COMP: Deformation field type is otb::Image<itk::Vector<double,2>, 2>, not...

COMP: Deformation field type is otb::Image<itk::Vector<double,2>, 2>, not otb::VectorImage<double,2>
parent 0d1b6fbf
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,6 @@ StreamingWarpImageFilter<TInputImage,TOutputImage,TDeformationField>
::StreamingWarpImageFilter()
{
// Fill the default maximum deformation
m_MaximumDeformation.SetSize(InputImageType::ImageDimension);
m_MaximumDeformation.Fill(1);
}
......
......@@ -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());
......
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment