#ifndef PM_STACK_REJECT_H
#define PM_STACK_REJECT_H

#include <pslib.h>
#include <pmSubtractionKernels.h>

/// Given a list of pixels from the convolved image, find the corresponding (smaller subset of) pixels in the
/// original image, and then convolve those to get the list of all pixels which should be rejected
///
/// We apply a matched filter to the corresponding mask image, and threshold to find the original pixels
psPixels *pmStackReject(const psPixels *in, ///< List of pixels in the convolved image
                        float threshold, ///< Threshold on convolved image, 0..1
                        const psArray *regions, ///< Array of image regions for image
                        const psArray *solutions, ///< Array of solution vectors for image
                        const pmSubtractionKernels *kernels ///< Kernel parameters
    );


#endif
