21 #ifndef otbMulti3DMapToDEMFilter_h
22 #define otbMulti3DMapToDEMFilter_h
24 #include "itkImageToImageFilter.h"
26 #include "itkImageRegionIteratorWithIndex.h"
27 #include "itkImageRegionConstIterator.h"
30 #include "itkImageRegionSplitter.h"
82 template <
class T3DImage = otb::VectorImage<
double, 2>,
class TMaskImage = otb::Image<
unsigned char>,
class TOutputDEMImage = otb::Image<
double>>
88 typedef itk::ImageToImageFilter<T3DImage, TOutputDEMImage>
Superclass;
108 typedef typename OutputImageType::SizeType
SizeType;
128 typedef std::map<unsigned int, itk::ImageRegionConstIterator<InputMapType>>
MapIteratorList;
130 typedef std::map<unsigned int, itk::ImageRegionConstIterator<MaskImageType>>
MaskIteratorList;
140 void SetNumberOf3DMaps(
unsigned int nb);
143 unsigned int GetNumberOf3DMaps();
146 void Set3DMapInput(
unsigned int index,
const T3DImage* hmap);
151 void SetMaskInput(
unsigned int index,
const TMaskImage* mask);
154 const T3DImage* Get3DMapInput(
unsigned int index)
const;
155 const TMaskImage* GetMaskInput(
unsigned int index)
const;
159 const TOutputDEMImage* GetDEMOutput()
const;
160 TOutputDEMImage* GetDEMOutput();
164 itkSetMacro(DEMGridStep,
double);
165 itkGetConstReferenceMacro(DEMGridStep,
double);
183 if (
static_cast<unsigned int>((2 * (index + 1))) > this->GetNumberOfInputs())
185 itkExceptionMacro(<<
"input at position " << index <<
" is unavailable");
187 m_OutputParametersFrom3DMap = index;
192 itkSetMacro(OutputOrigin, OriginType);
193 itkGetConstReferenceMacro(OutputOrigin, OriginType);
196 itkSetMacro(OutputStartIndex, IndexType);
197 itkGetConstReferenceMacro(OutputStartIndex, IndexType);
201 itkSetMacro(OutputSize, SizeType);
202 itkGetConstReferenceMacro(OutputSize, SizeType);
206 itkSetMacro(OutputSpacing, SpacingType);
207 itkGetConstReferenceMacro(OutputSpacing, SpacingType);
211 itkSetMacro(ProjectionRef, std::string);
212 itkGetConstReferenceMacro(ProjectionRef, std::string);
215 itkGetConstReferenceMacro(OutputParametersFrom3DMap,
int);
219 itkSetMacro(ElevationMin,
double);
220 itkGetConstReferenceMacro(ElevationMin,
double);
224 itkSetMacro(ElevationMax,
double);
225 itkGetConstReferenceMacro(ElevationMax,
double);
230 itkSetMacro(Margin, SizeType);
231 itkGetConstReferenceMacro(Margin, SizeType);
243 void GenerateOutputInformation()
override;
246 void GenerateInputRequestedRegion()
override;
249 void BeforeThreadedGenerateData()
override;
252 void ThreadedGenerateData(
const RegionType& outputRegionForThread, itk::ThreadIdType threadId)
override;
255 void AfterThreadedGenerateData()
override;
268 void SetOutputParametersFromImage();
271 void operator=(
const Self&) =
delete;
322 #ifndef OTB_MANUAL_INSTANTIATION