22 #ifndef __StreamingSimpleMosaicFilter_hxx
23 #define __StreamingSimpleMosaicFilter_hxx
33 template <
class TInputImage,
class TOutputImage,
class TInternalValueType>
35 itk::ThreadIdType threadId)
39 itkDebugMacro(<<
"Actually executing thread " << threadId <<
" in region " << outputRegionForThread);
42 itk::ProgressReporter progress(
this, threadId, outputRegionForThread.GetNumberOfPixels());
48 const unsigned int nbOfUsedInputImages = Superclass::GetNumberOfUsedInputImages();
51 const unsigned int nBands = Superclass::GetNumberOfBands();
54 IteratorType outputIt(mosaicImage, outputRegionForThread);
58 interpolatedMathPixel.SetSize(nBands);
61 typename std::vector<InputImageType*> currentImage;
62 typename std::vector<InterpolatorPointerType> interp;
63 Superclass::PrepareImageAccessors(currentImage, interp);
68 for (outputIt.GoToBegin(); !outputIt.IsAtEnd(); ++outputIt)
74 mosaicImage->TransformIndexToPhysicalPoint(outputIt.GetIndex(), geoPoint);
77 for (
unsigned int i = 0; i < nbOfUsedInputImages; i++)
80 unsigned int imgIndex = Superclass::GetUsedInputImageIndice(i);
85 if (interp[i]->IsInsideBuffer(geoPoint))
92 if (Superclass::IsPixelNotEmpty(interpolatedPixel))
95 for (
unsigned int band = 0; band < nBands; band++)
97 if (this->GetShiftScaleInputImages())
100 this->ShiftScaleValue(pixelValue, imgIndex, band);
113 outputIt.Set(outputPixel);
116 progress.CompletedPixel();