18 #ifndef itkMattesMutualInformationImageToImageMetricv4_h
19 #define itkMattesMutualInformationImageToImageMetricv4_h
97 template <
typename TFixedImage,
typename TMovingImage,
typename TVirtualImage = TFixedImage,
98 typename TInternalComputationValueType = double,
99 typename TMetricTraits = DefaultImageToImageMetricTraitsv4<TFixedImage,TMovingImage,TVirtualImage,TInternalComputationValueType>
102 public ImageToImageMetricv4<TFixedImage, TMovingImage, TVirtualImage, TInternalComputationValueType, TMetricTraits>
119 typedef typename Superclass::MeasureType
MeasureType;
144 itkStaticConstMacro(VirtualImageDimension,
typename TVirtualImage::ImageDimensionType, TVirtualImage::ImageDimension);
145 itkStaticConstMacro(FixedImageDimension,
typename TFixedImage::ImageDimensionType, TFixedImage::ImageDimension);
146 itkStaticConstMacro(MovingImageDimension,
typename TMovingImage::ImageDimensionType, TMovingImage::ImageDimension);
154 itkGetConstReferenceMacro(NumberOfHistogramBins,
SizeValueType);
157 virtual void Initialize(
void) ITK_OVERRIDE;
172 const typename JointPDFType::
Pointer GetJointPDF ()
const
174 if( this->m_ThreaderJointPDF.size() == 0 )
178 return this->m_ThreaderJointPDF[0];
190 return this->m_JointPDFDerivatives;
193 virtual void FinalizeThread(
const ThreadIdType threadId ) ITK_OVERRIDE;
206 void PrintSelf(std::ostream& os,
Indent indent) const ITK_OVERRIDE;
223 virtual
void GetValueCommonAfterThreadedExecution();
239 typename CubicBSplineFunctionType::
Pointer m_CubicBSplineKernel;
240 typename CubicBSplineDerivativeFunctionType::
Pointer m_CubicBSplineDerivativeKernel;
246 mutable PRatioArrayType m_PRatioArray;
254 mutable std::vector<std::vector<
PDFValueType> > m_ThreaderFixedImageMarginalPDF;
273 typedef DerivativeBufferManager
Self;
277 void Initialize(
size_t maxBufferLength,
const size_t cachedNumberOfLocalParameters,
281 void DoubleBufferSize();
284 m_CurrentFillSize(0),
295 return this->m_CachedNumberOfLocalParameters;
302 void CheckAndReduceIfNecessary();
307 void BlockAndReduce();
312 m_BufferOffsetContainer[m_CurrentFillSize] = offset;
313 PDFValueType * PDFBufferForWriting = m_BufferPDFValuesContainer[m_CurrentFillSize];
315 return PDFBufferForWriting;
355 virtual void ComputeResults()
const;
361 #ifndef ITK_MANUAL_INSTANTIATION
362 #include "itkMattesMutualInformationImageToImageMetricv4.hxx"
Critical section locking class that can be allocated on the stack.
TInternalComputationValueType ValueType
Light weight base class for most itk classes.
Represent the size (bounds) of a n-dimensional image.
signed long OffsetValueType
Class for partitioning of an ImageRegion.
unsigned long SizeValueType
Derivative of a BSpline kernel used for density estimation and nonparameteric regression.
BSpline kernel used for density estimation and nonparameteric regression.
FixedImageType::PixelType FixedImagePixelType
Partitions an indexed container.
unsigned int ThreadIdType
Control indentation during Print() invocation.
ImageBaseType::SizeType SizeType
Define additional traits for native types such as int or float.
Templated n-dimensional image class.
ImageBaseType::IndexType IndexType