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

ENH: removing Update() from NCCRegistrationFilterExample to use streaming

parent de7a074e
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
// Software Guide : EndLatex // Software Guide : EndLatex
#include "otbImage.h" #include "otbImage.h"
#include "otbImageFileWriter.h" #include "otbStreamingImageFileWriter.h"
#include "otbImageFileReader.h" #include "otbImageFileReader.h"
#include "otbCommandLineArgumentParser.h" #include "otbCommandLineArgumentParser.h"
...@@ -184,13 +184,12 @@ int main(int argc, char** argv ) ...@@ -184,13 +184,12 @@ int main(int argc, char** argv )
// Software Guide : BeginLatex // Software Guide : BeginLatex
// //
// \end{itemize} // \end{itemize}
// Then we can trigger the \code{Update()} method on the NCCRegistrationFilter: // The execution of the NCCRegistrationFilter will be triggered by the \code{Update()}
// call on the writer at the end of the pipeline. Make sure to use a
// \doxygen{otb}{StreamingImageFileWriter} if you want to benefit from the streaming features.
// //
// Software Guide : EndLatex // Software Guide : EndLatex
// Software Guide : BeginCodeSnippet
registrator->Update();
// Software Guide : EndCodeSnippet
typedef otb::ImageOfVectorsToMonoChannelExtractROI<DeformationFieldType, MovingImageType> ChannelExtractionFilterType; typedef otb::ImageOfVectorsToMonoChannelExtractROI<DeformationFieldType, MovingImageType> ChannelExtractionFilterType;
...@@ -206,7 +205,7 @@ int main(int argc, char** argv ) ...@@ -206,7 +205,7 @@ int main(int argc, char** argv )
fieldRescaler->SetOutputMaximum(255); fieldRescaler->SetOutputMaximum(255);
fieldRescaler->SetOutputMinimum(0); fieldRescaler->SetOutputMinimum(0);
typedef otb::ImageFileWriter< OutputImageType > DFWriterType; typedef otb::StreamingImageFileWriter< OutputImageType > DFWriterType;
DFWriterType::Pointer dfWriter = DFWriterType::New(); DFWriterType::Pointer dfWriter = DFWriterType::New();
dfWriter->SetFileName(argv[3]); dfWriter->SetFileName(argv[3]);
...@@ -229,7 +228,7 @@ int main(int argc, char** argv ) ...@@ -229,7 +228,7 @@ int main(int argc, char** argv )
CastFilterType::Pointer caster = CastFilterType::New(); CastFilterType::Pointer caster = CastFilterType::New();
caster->SetInput( warper->GetOutput() ); caster->SetInput( warper->GetOutput() );
typedef otb::ImageFileWriter< OutputImageType > WriterType; typedef otb::StreamingImageFileWriter< OutputImageType > WriterType;
WriterType::Pointer writer = WriterType::New(); WriterType::Pointer writer = WriterType::New();
writer->SetFileName(argv[4]); writer->SetFileName(argv[4]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment