18#ifndef itkAdvancedImageMomentsCalculator_h
19#define itkAdvancedImageMomentsCalculator_h
21#include "itkInPlaceImageFilter.h"
22#include "itkBinaryThresholdImageFilter.h"
23#include "itkAffineTransform.h"
25#include "itkSpatialObject.h"
29#include "vnl/vnl_vector_fixed.h"
30#include "vnl/vnl_matrix_fixed.h"
31#include "vnl/vnl_diag_matrix.h"
33#include "itkPlatformMultiThreader.h"
65template<
typename TImage >
83 TImage::ImageDimension);
100 itkGetStaticConstMacro(ImageDimension),
214 this->
m_Threader->SetNumberOfWorkUnits(numberOfThreads);
234 itkSetMacro( NumberOfSamplesForCenteredTransformInitialization, SizeValueType );
236 itkSetMacro( CenterOfGravityUsesLowerThreshold,
bool );
241 void PrintSelf(std::ostream & os, Indent indent)
const override;
278 PaddedComputePerThreadStruct);
280 AlignedComputePerThreadStruct);
317#ifndef ITK_MANUAL_INSTANTIATION
318#include "itkAdvancedImageMomentsCalculator.hxx"
Compute moments of an n-dimensional image.
virtual void AfterThreadedCompute(void)
virtual void SetImage(const ImageType *image)
itkAlignedTypedef(ITK_CACHE_LINE_ALIGNMENT, PaddedComputePerThreadStruct, AlignedComputePerThreadStruct)
ThreadIdType m_ComputePerThreadVariablesSize
ImageSampleContainerType::Pointer ImageSampleContainerPointer
AffineTransformPointer GetPrincipalAxesToPhysicalAxesTransform() const
SizeValueType m_NumberOfPixelsCounted
ImageGridSamplerType::Pointer ImageGridSamplerPointer
SizeValueType m_NumberOfSamplesForCenteredTransformInitialization
ScalarType GetTotalMass() const
itkPadStruct(ITK_CACHE_LINE_ALIGNMENT, ComputePerThreadStruct, PaddedComputePerThreadStruct)
itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension)
VectorType GetCenterOfGravity() const
Vector< ScalarType, itkGetStaticConstMacro(ImageDimension) > VectorType
void LaunchComputeThreaderCallback(void) const
ImageType::Pointer ImagePointer
void SetNumberOfWorkUnits(ThreadIdType numberOfThreads)
ImageGridSamplerType::ImageSampleContainerType ImageSampleContainerType
ImageType::RegionType ThreadRegionType
void PrintSelf(std::ostream &os, Indent indent) const override
SpatialObjectType::Pointer SpatialObjectPointer
~AdvancedImageMomentsCalculator() override
itk::BinaryThresholdImageFilter< TImage, TImage > BinaryThresholdImageFilterType
SpatialObject< itkGetStaticConstMacro(ImageDimension) > SpatialObjectType
AlignedComputePerThreadStruct * m_ComputePerThreadVariables
AffineTransformPointer GetPhysicalAxesToPrincipalAxesTransform() const
AffineTransform< double, itkGetStaticConstMacro(ImageDimension) > AffineTransformType
AdvancedImageMomentsCalculator< TImage > Self
AdvancedImageMomentsCalculator(const Self &)
ThreaderType::WorkUnitInfo ThreadInfoType
void operator=(const Self &)
MatrixType GetPrincipalAxes() const
virtual void BeforeThreadedCompute(void)
virtual void InitializeThreadingParameters(void)
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ComputeThreaderCallback(void *arg)
TImage::PixelType InputPixelType
SmartPointer< Self > Pointer
itk::PlatformMultiThreader ThreaderType
VectorType GetPrincipalMoments() const
MultiThreaderParameterType m_ThreaderParameters
virtual void SetSpatialObjectMask(const SpatialObject< itkGetStaticConstMacro(ImageDimension) > *so)
ImageSampleContainerPointer m_SampleContainer
MatrixType GetSecondMoments() const
SpatialObjectType::ConstPointer SpatialObjectConstPointer
ImageConstPointer m_Image
bool m_CenterOfGravityUsesLowerThreshold
virtual void SampleImage(ImageSampleContainerPointer &sampleContainer)
virtual void ThreadedCompute(ThreadIdType threadID)
VectorType GetFirstMoments() const
AdvancedImageMomentsCalculator()
itk::ImageGridSampler< ImageType > ImageGridSamplerType
ImageType::ConstPointer ImageConstPointer
Matrix< ScalarType, itkGetStaticConstMacro(ImageDimension), itkGetStaticConstMacro(ImageDimension) > MatrixType
InputPixelType m_LowerThresholdForCenterGravity
void ComputeSingleThreaded()
SpatialObjectConstPointer m_SpatialObjectMask
MatrixType GetCentralMoments() const
AffineTransformType::Pointer AffineTransformPointer
SmartPointer< const Self > ConstPointer
ThreaderType::Pointer m_Threader
Samples image voxels on a regular grid.
Superclass::ImageSampleContainerType ImageSampleContainerType
SizeValueType st_NumberOfPixelsCounted