4 #include <itkSingleValuedNonLinearOptimizer.h> 5 #include <itkSingleValuedCostFunction.h> 11 template <
typename TInputImageType>
28 typedef typename InputImageType::PointType
PointType;
35 typedef itk::Image <unsigned char, TInputImageType::ImageDimension>
MaskImageType;
105 static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION
ThreadedMatching(
void *arg);
108 void BlockMatch(
unsigned int startIndex,
unsigned int endIndex);
128 InputImagePointer m_ReferenceImage;
129 InputImagePointer m_MovingImage;
130 MaskImagePointer m_BlockGenerationMask;
132 bool m_ForceComputeBlocks;
133 unsigned int m_NumberOfThreads;
136 std::vector <PointType> m_BlockPositions;
137 std::vector <ImageRegionType> m_BlockRegions;
140 std::vector <double> m_BlockWeights;
143 double m_BlockVarianceThreshold;
144 double m_BlockPercentageKept;
145 unsigned int m_BlockSize;
146 unsigned int m_BlockSpacing;
151 std::vector <BaseInputTransformPointer> m_BlockTransformPointers;
155 double m_SearchRadius;
156 double m_FinalRadius;
157 unsigned int m_OptimizerMaximumIterations;
160 std::mutex m_LockHighestProcessedBlock;
161 int m_HighestProcessedBlock;
MetricType::Pointer MetricPointer
void SetForceComputeBlocks(bool val)
void SetBlockPositions(std::vector< PointType > &val)
void SetFinalRadius(double val)
void SetReferenceImage(InputImageType *image)
InputImagePointer & GetMovingImage()
double GetBlockVarianceThreshold()
void SetBlockSize(unsigned int val)
std::vector< BaseInputTransformPointer > & GetBlockTransformPointers()
ImageRegionType & GetBlockRegion(unsigned int i)
BaseInputTransformType::Pointer BaseInputTransformPointer
itk::Image< unsigned char, TInputImageType::ImageDimension > MaskImageType
TInputImageType InputImageType
virtual void TransformDependantOptimizerSetup(OptimizerPointer &optimizer)=0
void SetNumberOfWorkUnits(unsigned int val)
BaseInputTransformPointer & GetBlockTransformPointer(unsigned int i)
itk::SingleValuedCostFunction MetricType
virtual double ComputeBlockWeight(double val, unsigned int block)=0
void SetOptimizerType(OptimizerDefinition val)
unsigned int GetBlockSize()
MaskImagePointer & GetBlockGenerationMask()
std::vector< ImageRegionType > & GetBlockRegions()
anima::BaseTransformAgregator< TInputImageType::ImageDimension > AgregatorType
void SetBlockWeights(std::vector< double > &val)
std::vector< PointType > & GetBlockPositions()
unsigned int GetNumberOfWorkUnits()
double GetBlockPercentageKept()
InputImageType::PointType PointType
void SetBlockRegions(std::vector< ImageRegionType > &val)
void SetBlockSpacing(unsigned int val)
MaskImageType::Pointer MaskImagePointer
virtual AgregatorType::TRANSFORM_TYPE GetAgregatorInputTransformType()=0
OptimizerType::Pointer OptimizerPointer
AgregatorType::BaseInputTransformType BaseInputTransformType
virtual MetricPointer SetupMetric()=0
void SetStepSize(double val)
itk::SingleValuedNonLinearOptimizer OptimizerType
InputImageType::RegionType ImageRegionType
void SetBlockPercentageKept(double val)
AgregatorType::InternalScalarType InternalScalarType
void SetOptimizerMaximumIterations(unsigned int val)
const std::vector< double > & GetBlockWeights()
virtual OptimizerPointer SetupOptimizer()
void SetBlockGenerationMask(MaskImageType *image)
virtual BaseInputTransformPointer GetNewBlockTransform(PointType &blockCenter)=0
InputImageType::Pointer InputImagePointer
void SetMovingImage(InputImageType *image)
virtual void BlockMatchingSetup(MetricPointer &metric, unsigned int block)=0
OptimizerDefinition GetOptimizerType()
virtual bool GetMaximizedMetric()=0
virtual void InitializeBlocks()
void SetBlockVarianceThreshold(double val)
virtual ~BaseBlockMatcher()
void SetVerbose(bool value)
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION ThreadedMatching(void *arg)
unsigned int GetBlockSpacing()
InputImagePointer & GetReferenceImage()
void SetSearchRadius(double val)