21 #ifndef otbExtractROI_hxx
22 #define otbExtractROI_hxx
25 #include "itkImageRegionIterator.h"
26 #include "itkProgressReporter.h"
34 template <
class TInputPixel,
class TOutputPixel>
42 template <
class TInputPixel,
class TOutputPixel>
45 Superclass::PrintSelf(os, indent);
57 template <
class TInputPixel,
class TOutputPixel>
61 Superclass::GenerateOutputInformation();
64 template <
class TInputPixel,
class TOutputPixel>
67 itkDebugMacro(<<
"Actually executing");
70 typename Superclass::InputImageConstPointer inputPtr = this->GetInput();
71 typename Superclass::OutputImagePointer outputPtr = this->GetOutput();
74 itk::ProgressReporter progress(
this, threadId, outputRegionForThread.GetNumberOfPixels());
78 this->CallCopyOutputRegionToInputRegion(inputRegionForThread, outputRegionForThread);
81 typedef itk::ImageRegionIterator<OutputImageType> OutputIterator;
82 typedef itk::ImageRegionConstIterator<InputImageType> InputIterator;
84 OutputIterator outIt(outputPtr, outputRegionForThread);
85 InputIterator inIt(inputPtr, inputRegionForThread);
88 while (!outIt.IsAtEnd())
91 outIt.Set(inIt.Get());
94 progress.CompletedPixel();