当前位置:网站首页>The pipelineexecute pipeline execution process of VTK learning
The pipelineexecute pipeline execution process of VTK learning
2022-06-10 08:47:00 【Christo3】
1. practice
#include <vtkSmartPointer.h>
#include <vtkBMPReader.h>
#include <vtkImageData.h>
#include <vtkRenderWindowInteractor.h>
#include <vtkImageViewer2.h>
#include <vtkRenderWindow.h>
// The test file :data/VTK-logo.bmp
int main(int argc, char* argv[])
{
const char* str = "D:\\workshop\\VTK\\VTK\\vtk_source\\Examples\\Examples\\Chap02\\data\\VTK-logo.bmp";
vtkSmartPointer<vtkBMPReader> reader = vtkSmartPointer<vtkBMPReader>::New();
std::cout<<"Modification Time of reader (After New()): "<<reader->GetMTime()<<std::endl;
reader->SetFileName(str);
std::cout<<"Modification Time of reader (After SetFileName()): "<<reader->GetMTime()<<std::endl;
vtkImageData* imageData = reader->GetOutput();
std::cout<<"Modification Time of reader (After GetOutput()): "<<reader->GetMTime()<<std::endl;
//reader->Update();
std::cout<<"Modification Time of reader (After Update()): "<<reader->GetMTime()<<std::endl;
int extent[6];
imageData->GetExtent(extent);
std::cout<<"Extent of image: "<<extent[0]<<" "
<<extent[1]<<" "<<extent[2]<<" "<<extent[3]<<" "
<<extent[4]<<" "<<extent[5]<<" "<<std::endl;
vtkSmartPointer<vtkImageViewer2> viewer =
vtkSmartPointer<vtkImageViewer2>::New();
vtkSmartPointer<vtkRenderWindowInteractor> interactor =
vtkSmartPointer<vtkRenderWindowInteractor>::New();
viewer->SetupInteractor(interactor);
viewer->SetInputData(imageData);
viewer->Render();
viewer->SetSize(640, 480);
viewer->GetRenderWindow()->SetWindowName("vtkPipelineExecute");
interactor->Initialize();
interactor->Start();
return EXIT_SUCCESS;
}
- no
reader->Update()
- the
reader->Update() 
2. principle



边栏推荐
- USB type -a -b -c interface
- Unzip the jar package and modify the configuration file (unzip, modify, compress and run)
- Simple operation and debugging of GPIO in Qualcomm platform
- R语言使用epiDisplay包的mhor函数执行Cochran-Mantel-Haenszel检验并可视化、检验两个分类变量在调整(控制)第三个变量的情况下是否独立、输入数据为三维列联表
- The R language catools package divides the data, the scale function scales the data, the KNN function of the class package constructs a k-nearest neighbor classifier, and compares the model accuracy a
- 测试:朋友圈点赞功能
- Implementation of a simplified MVVM
- 【密码学】AES加解密
- 知识图谱、图数据平台、图技术如何助力零售业飞速发展
- 切换vscode的格式化插件
猜你喜欢

LeetCode琅琊榜第十九层-有效的括号
![[cryptography] AES encryption and decryption](/img/a5/ad3fed3004646ca894d59cc22d2f11.png)
[cryptography] AES encryption and decryption

从零到一,一站式解决Linux环境下的MySQL(下载篇)

对线HR_MySQL逻辑架构?就这?

Lexin ESP Rainmaker accelerates the transformation of enterprise intelligence, and private cloud solutions help customers build their own brands

Elementary knowledge of optical flow method

wechat_ Configuration of wechat applet subcontracting

樂鑫推出 ESP32-C3 的 AWS IoT 參考示例

USB type -a -b -c interface

How is the computer network often disconnected? Start with these questions
随机推荐
Google搜索为什么不能无限分页?
数字藏品平台又传“跑路” :安全性遭疑,严监管在途
Oracle SQL command line (III. addition, deletion, modification and query)
R语言使用dplyr包的select函数自定义改变dataframe数据中两个数据列的顺序
uni-app_开发微信小程序项目中配置网络请求(第三方包 @escook/request-miniprogram)
RunLoop的实际使用
NaiveBayes function of e1071 package of R language constructs naive Bayes model, and confusionmatrix function of caret package is used to calculate confusion matrix (kappa, confidence interval, evalua
Test preparation computer database day 3 MySQL
Lexin ESP Rainmaker accelerates the transformation of enterprise intelligence, and private cloud solutions help customers build their own brands
[JUC series] basic use of thread pool
The R language uses the CS function of epidisplay package to calculate the value and confidence interval of relative risk (RR), generate the grouping data of exposure factor based on the pyramid funct
Uniapp always locates the chat page to the bottom display
Qt sqlite操作笔记
How to make internal interfaces visible to MOQ- How to do internal interfaces visible for Moq?
Task06:秋招秘籍 C
Video Downloader: the latest download of 4K Video Downloader
樂鑫推出 ESP32-C3 的 AWS IoT 參考示例
vtk学习之引用计数与智能指针
R语言使用epiDisplay包的cs函数计算相对危险度(Relative Risk,RR)的值及其置信区间、基于pyramid函数生成暴露因子的分组数据、xlab参数自定义设置可视化图像的X轴标签
Mmsegment Series III (basic network architecture and pre training model)