ImFusion C++ SDK 4.4.0
ImFusion::SimilarityMeasurePatchBased_GL Class Reference

#include <ImFusion/Reg/SimilarityMeasurePatchBased.h>

Helper class for patch based similarity measures. More...

Inheritance diagram for ImFusion::SimilarityMeasurePatchBased_GL:

Detailed Description

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

SharedImagem_img1_
SharedImagem_img2_
SharedImagem_perPixel
GL::Framebufferm_fbo
GL::Samplerm_sampler
std::vector< GlImage * > m_aux

Constructor & Destructor Documentation

◆ SimilarityMeasurePatchBased_GL()

ImFusion::SimilarityMeasurePatchBased_GL::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.

Member Function Documentation

◆ compute3D()

virtual bool ImFusion::SimilarityMeasurePatchBased_GL::compute3D ( GL::ImageProgram * program,
bool reduceLastPass = true )
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.

◆ compute2D()

virtual bool ImFusion::SimilarityMeasurePatchBased_GL::compute2D ( GL::ImageProgram * program)
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].


The documentation for this class was generated from the following file:
  • ImFusion/Reg/SimilarityMeasurePatchBased.h
Search Tab / S to search, Esc to close