ITK-图像重采样

图像重采样分为升采样和降采样,但是在图像处理中一般为了提高效率,而进行图像降采样。

降采样即为增大图像像素间距,可理解为将多个像素合并为一个像素,在图像降采样过程中需要设置以下几个方面:

采样后的spacing

采样后的图像大小

采样过程中的插值算法

头文件
#include "itkImageFileReader.h"
#include "itkAffineTransform.h"
#include "itkResampleImageFilter.h"

typedef itk::Image<short,3> ITKImageType; //图像类型:
typedef typename ITKImageType::Pointer     ITKImagePointer; //定于图像指针
typedef typename ITKImageType::SizeType SizeType;  //定义图像尺寸类型
typedef typename ITKImageType::PixelType PixelType;  //定义图像像素灰度值类型
typedef typename ITKImageType::PointType PoingType;  //定义图像像素物理位置类型
typedef typename ITKImageType::IndexType IndexType;  //定义图像像素索引值类型
typedef typename ITKImageType::DirectionType DirectionType; //定义图像的方向类型
typedef itk::Matrix< double, 4, 4 > MatrixType;
int main()
{
	 读取图像
    typedef itk::ImageFilterReader<ITKImageType> ImageReaderType;
    ImageReaderType::Pointer imag
  • 1
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

新酱2021

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值