ITK  4.9.0
Insight Segmentation and Registration Toolkit
Public Member Functions | Private Types | Private Attributes | List of all members
itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager Class Reference

#include <itkMattesMutualInformationImageToImageMetricv4.h>

+ Collaboration diagram for itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager:

Detailed Description

template<typename TFixedImage, typename TMovingImage, typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
class itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager

Definition at line 271 of file itkMattesMutualInformationImageToImageMetricv4.h.

Public Member Functions

void BlockAndReduce ()
 
void CheckAndReduceIfNecessary ()
 
 DerivativeBufferManager ()
 
void DoubleBufferSize ()
 
vcl_size_t GetCachedNumberOfLocalParameters () const
 
PDFValueTypeGetNextElementAndAddOffset (const OffsetValueType &offset)
 
void Initialize (vcl_size_t maxBufferLength, const vcl_size_t cachedNumberOfLocalParameters, SimpleFastMutexLock *parentDerivativeLockPtr, typename JointPDFDerivativesType::Pointer parentJointPDFDerivatives)
 
void ReduceBuffer ()
 
 ~DerivativeBufferManager ()
 

Private Types

typedef DerivativeBufferManager Self
 

Private Attributes

std::vector< OffsetValueTypem_BufferOffsetContainer
 
std::vector< PDFValueType * > m_BufferPDFValuesContainer
 
vcl_size_t m_CachedNumberOfLocalParameters
 
vcl_size_t m_CurrentFillSize
 
vcl_size_t m_MaxBufferSize
 
std::vector< PDFValueTypem_MemoryBlock
 
vcl_size_t m_MemoryBlockSize
 
JointPDFDerivativesType::Pointer m_ParentJointPDFDerivatives
 
SimpleFastMutexLockm_ParentJointPDFDerivativesLockPtr
 

Member Typedef Documentation

template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
typedef DerivativeBufferManager itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::Self
private

Constructor & Destructor Documentation

template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::DerivativeBufferManager ( )
inline
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::~DerivativeBufferManager ( )
inline

Member Function Documentation

template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
void itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::BlockAndReduce ( )

Force the buffer to dump by blocking.

template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
void itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::CheckAndReduceIfNecessary ( )

Attempt to dump the buffer if it is full. If the attempt to acquire the lock fails, double the buffer size and try again.

template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
void itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::DoubleBufferSize ( )
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
vcl_size_t itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::GetCachedNumberOfLocalParameters ( ) const
inline
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
PDFValueType* itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::GetNextElementAndAddOffset ( const OffsetValueType offset)
inline
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
void itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::Initialize ( vcl_size_t  maxBufferLength,
const vcl_size_t  cachedNumberOfLocalParameters,
SimpleFastMutexLock parentDerivativeLockPtr,
typename JointPDFDerivativesType::Pointer  parentJointPDFDerivatives 
)
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
void itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::ReduceBuffer ( )

Apply the operations stored in the buffer. This method is not thread safe and requires a lock while threading.

Member Data Documentation

template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
std::vector<OffsetValueType> itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_BufferOffsetContainer
private
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
std::vector<PDFValueType *> itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_BufferPDFValuesContainer
private
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
vcl_size_t itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_CachedNumberOfLocalParameters
private
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
vcl_size_t itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_CurrentFillSize
private
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
vcl_size_t itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_MaxBufferSize
private
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
std::vector<PDFValueType> itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_MemoryBlock
private
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
vcl_size_t itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_MemoryBlockSize
private
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
JointPDFDerivativesType::Pointer itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_ParentJointPDFDerivatives
private
template<typename TFixedImage , typename TMovingImage , typename TVirtualImage = TFixedImage, typename TInternalComputationValueType = double, typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>>
SimpleFastMutexLock* itk::MattesMutualInformationImageToImageMetricv4< TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits >::DerivativeBufferManager::m_ParentJointPDFDerivativesLockPtr
private

The documentation for this class was generated from the following file: