Filters which generate another filters. More...
#include <quillimagefiltergenerator.h>
Public Member Functions | |
QuillImageFilterGenerator (const QString &name) | |
virtual | ~QuillImageFilterGenerator () |
QuillImage | apply (const QuillImage &image) const |
QuillImageFilter * | resultingFilter () const |
virtual bool | isUsedOnPreview () const |
Filters which generate another filters.
Generators are a special type of QuillImageFilter. Instead of applying its changes to an image as other filters do, a Generator will make observations from an image and instead of correcting the observed problems itself will return a filter which will make the corrections.
This is especially useful with LibQuill, where the same filter is run many times for different resolutions and tiles. Instead of always running for example the AutoContrast detection differently for each tile (which would waste effort and produce a silly result), the detection is run only once for a low-resolution representation of the image, and the resulting filter is afterwards applied separately to each tile.
QuillImageFilterGenerator::QuillImageFilterGenerator | ( | const QString & | name | ) |
Creates a new filter generator. Filter generators are filters which return other filters.
QuillImageFilterGenerator::~QuillImageFilterGenerator | ( | ) | [virtual] |
QuillImage QuillImageFilterGenerator::apply | ( | const QuillImage & | image | ) | const [virtual] |
Applies the generator to a given preview or fragment.
Reimplemented from QuillImageFilter.
bool QuillImageFilterGenerator::isUsedOnPreview | ( | ) | const [virtual] |
Provides a hint for libquill - do we run this generator always on the first preview level (default), or on the best available one?
QuillImageFilter * QuillImageFilterGenerator::resultingFilter | ( | ) | const |
Returns the resulting filter of the generator to be used later.