![]() |
ImFusion SDK 4.3
|
Similarity Measures. More...
Collaboration diagram for Similarity Measures:Similarity Measures.
All similarity measures derive from the SimilarityMeasureImpl class. The base class only provides the pointers to the two images that should be compared and some common properties like mask settings. The derived classes are required to implement the compute method that returns a actual similarity value. The ImageTransformer class is an abstraction of the transformation and provides methods to transform a pixel coordinate from the first image to the corresponding pixel coordinate of the second image. Therefore, to support new transformation models only the ImageTransformer has be updated, any class deriving from SimilarityMeasureImpl can remain unchanged. If no ImageTransformer is passed to compute, the images are compared directly without taking any transformations into account (also not the spacing). This should only be used with images of the same size. Any derived SimilarityMeasureImpl can be created directly or in a more generic way with the SimilarityMeasureFactory. The factory generates a SimilarityMeasureImpl from a Mode and a Device. While it is not enforced, it is encouraged to separate the implementations on different devices (e.g. CPU and GPU) into separate classes. This usually leads to a more robust implementation. Similarity measures should be re-created when the image size changes so that any intermediate buffers can be re-initialized.
There are several options to create a SimilarityMeasureImpl:
If only a specific implementation is required, it can be created directly. For example to create a Mutual Information similarity measure:
In order to switch between different similarity measure, SimilarityMeasureFactory provides a generic interface based on properties. See SimilarityMeasureFactory for more information.
When called the first time for a certain mode, similarityMeasureConfiguration will return the default parameters of the SimilarityMeasure.
If a persistent SimilarityMeasureImpl instance is required, the SimilarityMeasureWrapper can be used. However, this comes with less control when the actual instance is created and destroyed.
Classes | |
| class | SimilarityMeasureImpl |
| Base class of a similarity measure between two images. More... | |
| class | SimilarityMeasureDotProduct |
| class | SimilarityMeasureFactory |
| The SimilarityMeasureFactory class provides a generic interface to any kind of SimilarityMeasure. More... | |
| class | SimilarityMeasureImplHistBased |
| class | SimilarityMeasureLC2 |
| class | SimilarityMeasureLNCC |
| class | SimilarityMeasureMI |
| Computes the Mutual Information of two images. More... | |
| class | SimilarityMeasureMI_CPU |
| CPU implementation of Mutual Information. More... | |
| class | SimilarityMeasureMI_GL |
| GPU implementation of Mutual Information using modern OpenGL. More... | |
| class | SimilarityMeasureML |
| Machine Learning based similarity measure. More... | |
| class | SimilarityMeasurePatchBased_GL |
| Helper class for patch based similarity measures. More... | |
| class | SimilarityMeasureImplPixelWise |
| class | SimilarityMeasurePixelWise_CPU |
| class | SimilarityMeasurePixelWise_GL |
| class | SimilarityMeasureWrapper |
| Wrapper for safe and configurable use of various similarity measures. More... | |
Enumerations | |
| enum | Device { Device_CPU , Device_GL } |
| Enumeration for different computation devices. | |