Skip to content
Snippets Groups Projects
Commit e86ea302 authored by Otmane Lahlou's avatar Otmane Lahlou
Browse files

ENH: verifying number of inputs in otbImageToPointSetFilter

parent b61d63a2
Branches
Tags
No related merge requests found
...@@ -87,6 +87,7 @@ const typename ImageToPointSetFilter<TInputImage,TOutputPointSet>::InputImageTyp ...@@ -87,6 +87,7 @@ const typename ImageToPointSetFilter<TInputImage,TOutputPointSet>::InputImageTyp
ImageToPointSetFilter<TInputImage,TOutputPointSet> ImageToPointSetFilter<TInputImage,TOutputPointSet>
::GetInput(unsigned int idx) ::GetInput(unsigned int idx)
{ {
return dynamic_cast<const InputImageType*> return dynamic_cast<const InputImageType*>
(this->ProcessObjectType::GetInput(idx)); (this->ProcessObjectType::GetInput(idx));
} }
...@@ -97,8 +98,11 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet> ...@@ -97,8 +98,11 @@ ImageToPointSetFilter<TInputImage,TOutputPointSet>
template <class TInputImage, class TOutputPointSet> template <class TInputImage, class TOutputPointSet>
const typename ImageToPointSetFilter<TInputImage,TOutputPointSet>::InputImageType * const typename ImageToPointSetFilter<TInputImage,TOutputPointSet>::InputImageType *
ImageToPointSetFilter<TInputImage,TOutputPointSet> ImageToPointSetFilter<TInputImage,TOutputPointSet>
::GetInput() ::GetInput(void)
{ {
if(this->GetNumberOfInputs() < 1)
return 0;
return dynamic_cast<const InputImageType*> return dynamic_cast<const InputImageType*>
(this->ProcessObjectType::GetInput(0)); (this->ProcessObjectType::GetInput(0));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment