ITK: 读序列图像和裸数据

用ITK做三维图像处理时候,原始数据一般都是序列图像,那么序列图像的读取就是我们完成三维图像处理重要的起点。

序列图像读取用到了一下几个类: 

#include<itkImageSeriesReader.h>
#include<itkNumericSeriesFileNames.h>
代码如下:

 //声明像素类型和图像维数
    typedef float InputPixelType;
    typedef unsigned char OutputPixelType;
    const unsigned int Dimension=2;
    //实例化
    typedef itk::Image<InputPixelType,3> InputImageType; //读取序列图像 图像类型应该为3维 第三个维度存储图片序列号
    typedef itk::ImageSeriesReader<InputImageType> ReaderType;
    ReaderType::Pointer reader=ReaderType::New();
//实例化文件名生成器
     typedef itk::NumericSeriesFileNames NameGeneratorType;
    NameGeneratorType::Pointer NameGenerator=NameGeneratorType::New();
    //设置文件名模式  初始值 最后值 增加值
    NameGenerator->SetSeriesFormat("E:/RootImgs/01C/HRAW/01C%04d.hraw");
    NameGenerator->SetStartIndex(0);
    NameGenerator->SetEndIndex
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值