18 #ifndef __otbMorphologicalPyramidMRToMSConverter_txx
19 #define __otbMorphologicalPyramidMRToMSConverter_txx
27 namespace MorphologicalPyramid
32 template <
class TInputImage,
class TOutputImage>
36 this->SetNumberOfRequiredInputs(2);
37 this->SetNumberOfRequiredOutputs(2);
41 this->SetNthOutput(1, infFilter.GetPointer());
43 this->SetNthOutput(2, outputList.GetPointer());
45 this->SetNthOutput(3, supDeci.GetPointer());
47 this->SetNthOutput(4, infDeci.GetPointer());
54 template <
class TInputImage,
class TOutputImage>
56 ::OutputImageListType*
67 template <
class TInputImage,
class TOutputImage>
69 ::OutputImageListType*
80 template <
class TInputImage,
class TOutputImage>
82 ::OutputImageListType*
93 template <
class TInputImage,
class TOutputImage>
95 ::OutputImageListType*
106 template <
class TInputImage,
class TOutputImage>
108 ::OutputImageListType*
118 template <
class TInputImage,
class TOutputImage>
123 this->SetNthInput(2, const_cast<InputImageListType *>(imageList));
129 template <
class TInputImage,
class TOutputImage>
134 this->SetNthInput(0, const_cast<InputImageListType *>(imageList));
140 template <
class TInputImage,
class TOutputImage>
145 this->SetNthInput(1, const_cast<InputImageListType *>(imageList));
151 template <
class TInputImage,
class TOutputImage>
156 this->SetNthInput(3, const_cast<InputImageListType *>(imageList));
162 template <
class TInputImage,
class TOutputImage>
167 this->SetNthInput(4, const_cast<InputImageListType *>(imageList));
173 template <
class TInputImage,
class TOutputImage>
175 ::InputImageListType*
185 template <
class TInputImage,
class TOutputImage>
187 ::InputImageListType*
197 template <
class TInputImage,
class TOutputImage>
199 ::InputImageListType*
209 template <
class TInputImage,
class TOutputImage>
211 ::InputImageListType*
221 template <
class TInputImage,
class TOutputImage>
223 ::InputImageListType*
232 template <
class TInputImage,
class TOutputImage>
255 typename ResamplerType::Pointer resampler;
258 typename InputImageType::SizeType frsize = supFilter->Front()->GetLargestPossibleRegion().GetSize();
259 otbMsgDevMacro(<<
"MRToMSConverter: Full resolution size: " << frsize);
265 supFilterFullResolution->PushBack(it.Get());
267 for (; it != supFilter->End(); ++it)
269 resampler = ResamplerType::New();
270 resampler->SetSize(frsize);
271 resampler->SetInput(it.Get());
273 supFilterFullResolution->PushBack(resampler->GetOutput());
277 it = infFilter->Begin();
279 infFilterFullResolution->PushBack(it.Get());
281 for (; it != infFilter->End(); ++it)
283 resampler = ResamplerType::New();
284 resampler->SetSize(frsize);
285 resampler->SetInput(it.Get());
287 infFilterFullResolution->PushBack(resampler->GetOutput());
292 otbMsgDevMacro(<<
"MRToMSConverter: Optional inputList resampling.");
294 it = inputList->Begin();
296 outputList->PushBack(it.Get());
298 for (; it != inputList->End(); ++it)
300 resampler = ResamplerType::New();
301 resampler->SetSize(frsize);
302 resampler->SetInput(it.Get());
304 outputList->PushBack(resampler->GetOutput());
310 otbMsgDevMacro(<<
"MRToMSConverter: Optional supDeci resampling.");
312 it = supDeci->Begin();
314 supDeciFullResolution->PushBack(it.Get());
316 for (; it != supDeci->End(); ++it)
318 resampler = ResamplerType::New();
319 resampler->SetSize(frsize);
320 resampler->SetInput(it.Get());
322 supDeciFullResolution->PushBack(resampler->GetOutput());
328 otbMsgDevMacro(<<
"MRToMSConverter: Optional infDeci resampling.");
330 it = infDeci->Begin();
332 infDeciFullResolution->PushBack(it.Get());
334 for (; it != infDeci->End(); ++it)
336 resampler = ResamplerType::New();
337 resampler->SetSize(frsize);
338 resampler->SetInput(it.Get());
340 infDeciFullResolution->PushBack(resampler->GetOutput());
347 template <
class TInputImage,
class TOutputImage>
352 Superclass::PrintSelf(os, indent);