C++中什么是pipeline?

blackpool 2009-08-19 10:41:33
1. C++中什么是pipeline?怎么用?

2. 图像处理库ITK是基于pipeline开发的,请问如下代码:


typedef itk::Image<float,2> FloatImage2DType;
itk::RandomImageSource<FloatImage2DType>::Pointer random;
random = itk::RandomImageSource<FloatImage2DType>::New();
random->SetMin(0.0);
random->SetMax(1.0);
itk::ShrinkImageFilter<FloatImage2DType,FloatImage2DType>::Pointer shrink;
shrink = itk::ShrinkImageFilter<FloatImage2DType,FloatImage2DType>::New();
shrink->SetInput(random->GetOutput());
shrink->SetShrinkFactors(2);
itk::ImageFileWriter::Pointer<FloatImage2DType> writer;
writer = itk::ImageFileWriter::Pointer<FloatImage2DType>::New();
writer->SetInput (shrink->GetOutput());
writer->SetFileName("test.raw");
writer->Update();


关于代码有如下解释:
In this example the source object itk::RandomImageSource is connected to the itk::ShrinkImageFilter, and the shrink filter is connected to the mapper itk::ImageFileWriter. When the Update() method is invoked on the writer, the data processing pipeline causes each of these filters in order, culminating in writing the final data to a file on disk.
那么不调用Update()就无法完成所有pipeline的操作,是这个意思吗?谢谢!
...全文
691 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
xingzhe2001 2009-08-20
  • 打赏
  • 举报
回复
pipeline不是c++的概念,是你那个ITK库的概念
Y神圣 2009-08-20
  • 打赏
  • 举报
回复
我只知道Windows有Pipeline,而且与那种语言无关。
mstlq 2009-08-19
  • 打赏
  • 举报
回复
http://www.codeproject.com/KB/cpp/generic_pipeline_cpp.aspx

http://www.cppprog.com/2009/0325/92_4.html

http://www.diybl.com/course/3_program/c++/cppsl/20071222/93006.html
blackpool 2009-08-19
  • 打赏
  • 举报
回复
知道的麻烦告知,谢谢
blackpool 2009-08-19
  • 打赏
  • 举报
回复
C++中什么是pipeline?怎么用?谢谢

64,282

社区成员

发帖
与我相关
我的任务
社区描述
C++ 语言相关问题讨论,技术干货分享,前沿动态等
c++ 技术论坛(原bbs)
社区管理员
  • C++ 语言社区
  • encoderlee
  • paschen
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
  1. 请不要发布与C++技术无关的贴子
  2. 请不要发布与技术无关的招聘、广告的帖子
  3. 请尽可能的描述清楚你的问题,如果涉及到代码请尽可能的格式化一下

试试用AI创作助手写篇文章吧