ITK局部最大值算法:
#include "itkValuedRegionalMaximaImageFilter.h":
/** 局部区域最大值检索出fixed图像金标的中心像素*/
using RegionMaximaImageFilter = itk::RegionalMaximaImageFilter<ImageTypeFloat, ImageTypeFloat>;
RegionMaximaImageFilter::Pointer regionMaxfilterFixedHU = RegionMaximaImageFilter::New();
regionMaxfilterFixedHU->SetInput(Image);//设置输入图像
//设置背景像素值;
regionMaxfilterFixedHU->SetBackgroundValue(bg_value);
//设置前景像素值
regionMaxfilterFixedHU->SetForegroundValue(Fg_value);
regionMaxfilterFixedHU->Update();
/*********************************遍历获得局部最大值的坐标位置***********************************/
std::vector<std::pair<int, int>> Index;//像素索引
std::vector<std::pair<double, double>> Physical;//物理坐标