18 #ifndef __otbAngularProjectionSetImageFilter_txx
19 #define __otbAngularProjectionSetImageFilter_txx
22 #include <vnl/vnl_math.h>
29 template <
class TInputImage,
class TOutputImage,
class TAngleList,
class TPrecision >
33 this->SetNumberOfRequiredInputs( NumberOfInputImages );
34 this->SetNumberOfOutputs(1);
35 this->SetNthOutput(0, OutputImageListType::New());
37 m_FilterList = FilterListType::New();
38 m_AngleList = AngleListType::New();
41 template <
class TInputImage,
class TOutputImage,
class TAngleList,
class TPrecision >
47 const_cast< InputImageType * >( img ) );
50 template <
class TInputImage,
class TOutputImage,
class TAngleList,
class TPrecision >
55 if ( i >= this->GetNumberOfInputs() )
65 template <
class TInputImage,
class TOutputImage,
class TAngleList,
class TPrecision >
71 progress->SetMiniPipelineFilter(
this);
73 std::cerr <<
"Using " << GetAngleList()->Size() <<
" outputs...\n";
74 GetFilterList()->Resize( GetAngleList()->Size() );
75 this->GetOutput()->Resize( GetAngleList()->Size() );
77 for (
unsigned int idx = 0; idx < GetFilterList()->Size(); ++idx )
81 for (
unsigned int i = 0; i < NumberOfInputImages; ++i )
82 filter->SetInput( i, this->GetInput(i) );
83 filter->SetAngleArray( GetAngleList()->GetMeasurementVector(idx) );
85 progress->RegisterInternalFilter(filter, 1.f/static_cast<float>( GetAngleList()->Size() ) );
89 this->GetOutput()->SetNthElement( idx, filter->GetOutput() );