Skip to content
Snippets Groups Projects
Commit 58686658 authored by Emmanuel Christophe's avatar Emmanuel Christophe
Browse files

ENH: Warped output for NCC example (WIP)

parent 518b9b1f
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,7 @@
// Software Guide : BeginCodeSnippet
#include "otbNCCRegistrationFilter.h"
#include "itkRecursiveGaussianImageFilter.h"
#include "itkWarpImageFilter.h"
// Software Guide : EndCodeSnippet
#include <iostream>
......@@ -184,6 +185,23 @@ int main(int argc, char** argv )
dfWriter->SetInput( registrator->GetOutput() );
dfWriter->Update();
typedef itk::WarpImageFilter<MovingImageType, MovingImageType, DeformationFieldType> WarperType;
WarperType::Pointer warper = WarperType::New();
MovingImageType::PixelType padValue = 4.0;
warper->SetInput( mReader->GetOutput() );
warper->SetDeformationField( registrator->GetOutput() );
warper->SetEdgePaddingValue( padValue );
typedef otb::ImageFileWriter< MovingImageType > WriterType;
WriterType::Pointer writer = WriterType::New();
writer->SetFileName(argv[4]);
writer->SetInput( warper->GetOutput() );
writer->Update();
// Software Guide : BeginLatex
//
// Figure~\ref{fig:NCCRegistrationFilterOUTPUT} shows the result of applying.
......
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