#include <itkImpactImageToImageMetric.h>
Thread-local structure for accumulating loss values and gradients for each layer.
Protected Typedefs
This structure encapsulates one loss object per output layer (defined by the layersMask), enabling multi-layer loss computation and weighted aggregation. It allows efficient computation of the final loss and its gradients by keeping track of the contributions from each layer.
This structure is designed to be used in a multi-threaded environment, where each thread maintains its own instance to store intermediate results, ensuring thread-safety during parallel loss and gradient computations.
Definition at line 273 of file itkImpactImageToImageMetric.h.
Public Member Functions | |
| DerivativeType | GetDerivative () |
| double | GetValue () |
| void | init (std::vector< std::string > distanceName, std::vector< float > layersWeight, unsigned int seed) |
| LossPerThreadStruct & | operator+= (const LossPerThreadStruct &other) |
| void | reset () |
| void | setNumberOfParameters (int numberOfParameters) |
Public Attributes | |
| std::vector< float > | m_LayersWeight |
| std::vector< std::unique_ptr< ImpactLoss::Loss > > | m_Losses |
| int | m_NumberOfParameters |
| SizeValueType | m_NumberOfPixelsCounted |
| std::mt19937 | m_RandomGenerator |
|
inline |
Definition at line 331 of file itkImpactImageToImageMetric.h.
|
inline |
Definition at line 320 of file itkImpactImageToImageMetric.h.
|
inline |
Definition at line 282 of file itkImpactImageToImageMetric.h.
|
inline |
Definition at line 347 of file itkImpactImageToImageMetric.h.
|
inline |
Definition at line 310 of file itkImpactImageToImageMetric.h.
|
inline |
Definition at line 300 of file itkImpactImageToImageMetric.h.
| std::vector<float> itk::ImpactImageToImageMetric< TFixedImage, TMovingImage >::LossPerThreadStruct::m_LayersWeight |
Definition at line 276 of file itkImpactImageToImageMetric.h.
| std::vector<std::unique_ptr<ImpactLoss::Loss> > itk::ImpactImageToImageMetric< TFixedImage, TMovingImage >::LossPerThreadStruct::m_Losses |
Definition at line 275 of file itkImpactImageToImageMetric.h.
| int itk::ImpactImageToImageMetric< TFixedImage, TMovingImage >::LossPerThreadStruct::m_NumberOfParameters |
Definition at line 278 of file itkImpactImageToImageMetric.h.
| SizeValueType itk::ImpactImageToImageMetric< TFixedImage, TMovingImage >::LossPerThreadStruct::m_NumberOfPixelsCounted |
Definition at line 277 of file itkImpactImageToImageMetric.h.
| std::mt19937 itk::ImpactImageToImageMetric< TFixedImage, TMovingImage >::LossPerThreadStruct::m_RandomGenerator |
Definition at line 279 of file itkImpactImageToImageMetric.h.
Generated on 26-02-2026
for elastix by 1.16.1 (669aeeefca743c148e2d935b3d3c69535c7491e6) |