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;
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);
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();
322 #ifndef OTB_MANUAL_INSTANTIATION
This class is a helper class to estimate the output parameters of an image after projection in a targ...
Creation of an "otb" image which contains metadata.
Superclass::PixelType PixelType
Project N 3D images (long,lat,alti) into a regular DEM in the chosen map projection system.
std::vector< MeasurementType > m_MapMinVal
void SetOutputParametersFrom3DMap(int index=-1)
TOutputDEMImage OutputImageType
std::vector< typename OutputImageType::Pointer > m_TempDEMRegions
Multi3DMapToDEMFilter(const Self &)=delete
void VerifyInputInformation() const override
DEMPixelType m_NoDataValue
RSTransformType::Pointer m_ReferenceToGroundTransform
OutputImageType::SizeType SizeType
std::vector< unsigned int > m_NumberOfSplit
RSTransformType::InputPointType TDPointType
std::map< unsigned int, itk::ImageRegionConstIterator< InputMapType > > MapIteratorList
otb::GenericRSTransform RSTransform2DType
OutputImageType::PixelType DEMPixelType
OutputImageType::SpacingType SpacingType
std::vector< MeasurementType > m_MapMaxVal
AccumulatorImageType::PixelType AccumulatorPixelType
OutputImageType::IndexType IndexType
otb::GenericRSTransform< PrecisionType, 3, 3 > RSTransformType
std::map< unsigned int, itk::ImageRegionConstIterator< MaskImageType > > MaskIteratorList
std::vector< typename AccumulatorImageType::Pointer > m_TempDEMAccumulatorRegions
itk::ImageToImageFilter< T3DImage, TOutputDEMImage > Superclass
Multi3DMapToDEMFilter Self
IndexType m_OutputStartIndex
std::vector< RSTransformType::Pointer > m_MapToGroundTransform
otb::ImageToGenericRSOutputParameters< OutputImageType > OutputParametersEstimatorType
InputMapType::InternalPixelType InputInternalPixelType
std::string m_ProjectionRef
SplitterListType::Pointer m_MapSplitterList
otb::Image< unsigned int > AccumulatorImageType
void operator=(const Self &)=delete
itk::VariableLengthVector< ValueType > MeasurementType
otb::ObjectList< SplitterType > SplitterListType
RSTransform2DType::Pointer m_GroundTransform
itk::SmartPointer< const Self > ConstPointer
InputMapType::PixelType MapPixelType
int m_OutputParametersFrom3DMap
OutputImageType::RegionType RegionType
OutputImageType::PointType OriginType
itk::SmartPointer< Self > Pointer
itk::ImageRegionSplitter< 2 > SplitterType
This class is a generic all-purpose wrapping around an std::vector<itk::SmartPointer<ObjectType> >.
itk::SmartPointer< Self > Pointer
The "otb" namespace contains all Orfeo Toolbox (OTB) classes.