Support for processing prestack gathers is done by a PreStack::ProcessManager. The PreStack::ProcessManager has a chain of PreStack::Processor which are run in sequence.
Example:
PreStack::ProcessManager processmanager; PreStack::AGC* agc = new PreStack::AGC; agc->setWindow( Interval<float>( -120, 120 ) ); processmanager.addProcessor( agc ); processmanager.reset(); //Not really necessary since the manager has not been used before const BinID stepout = processmanager.getInputStepout(); BinID relbid; for ( relbid.inl=-stepout.inl; relbid.inl<=stepout.inl; relbid.inl++ ) { for ( relbid.crl=-stepout.crl; relbid.crl<=stepout.crl; relbid.crl++ ) { if ( !processor.wantsInput(relbid) ) continue; const BinID inputbid( relbid*BinID(SI().inlStep(),SI().crlStep()) ); const DataPack::ID dpid = getDataPackFromSomewhere( inputbid ); if ( dpid==DataPack::cNoID() ) return error; processmanager.setInput( relbid, dpid ); } } if ( !processmanager.process() ) return error; DataPack::ID result = processmanager.getOutput();
1.7.1