![]() |
ImFusion SDK 4.3
|
#include <ImFusion/Reg/SimilarityMeasurePatchBased.h>
Helper class for patch based similarity measures. More...
Inheritance diagram for SimilarityMeasurePatchBased_GL:Helper class for patch based similarity measures.
Public Member Functions | |
| SimilarityMeasurePatchBased_GL (SharedImage *img1, SharedImage *img2, int numAux) | |
| numAux determines the number of auxiliary textures required for the accumulation | |
| virtual bool | compute3D (GL::ImageProgram *program, bool reduceLastPass=true) |
| Performes the 3 accumulation passes. | |
| virtual bool | compute2D (GL::ImageProgram *program) |
| Performes the 2 accumulation passes. | |
| void | setPerPixelBuffer (SharedImage *img) |
| Sets an optional buffer where the resulting value is written per pixel. Expected to be the same size as img1. | |
| bool | supportsWeights () const |
Protected Attributes | |
| SharedImage * | m_img1_ |
| SharedImage * | m_img2_ |
| SharedImage * | m_perPixel |
| GL::Framebuffer * | m_fbo |
| GL::Sampler * | m_sampler |
| std::vector< GlImage * > | m_aux |
| SimilarityMeasurePatchBased_GL | ( | SharedImage * | img1, |
| SharedImage * | img2, | ||
| int | numAux ) |
numAux determines the number of auxiliary textures required for the accumulation
numAux must be a multiple of 2 and larger than 1.
|
virtual |
Performes the 3 accumulation passes.
program has to be enabled before calling this function. The uniform 'pass' is always set to the current pass. The auxiliary buffers will be bound to the uniforms aux0 to auxN where N is numAux-1. In the first pass, the first half of m_aux are bound as rendering targets. In the second pass, the first half of m_aux is bound to the uniforms and the second half as rendering targets. In the third pass, the second half of m_aux is bound to the uniforms and the first slice of m_aux[0] as rendering target. The final values are accumulated in the first slice of m_aux[0]. If reduceLastPass is false the accumulating is not performed and m_aux[0] will contain the final values per pixel.
|
virtual |
Performes the 2 accumulation passes.
program has to be enabled before calling this function. The uniform 'pass' is always set to the current pass. The auxiliary buffers will be bound to the uniforms aux0 to auxN where N is numAux-1. In the first pass, m_aux[1] to m_aux[N-1] are bound as rendering targets. In the second pass, m_aux[1] to m_aux[N-1] are bound to the uniforms and m_aux[0] as rendering target. The final values are accumulated in m_aux[0].