vtk实现MPR、MIP、minIP、aveIP

先编译VTK、VTK Examples

找到MPR示例,这个示例所在的位置在:

VTK_Source\VTK-8.1.2\VTK-8.1.2\Examples\GUI\Qt\FourPaneViewer-build\QtVTKRenderWindows.sln

在代码中设置序列的路径:

QtVTKRenderWindows::QtVTKRenderWindows( int vtkNotUsed(argc), char *argv[])
{
  this->ui = new Ui_QtVTKRenderWindows;
  this->ui->setupUi(this);

  vtkSmartPointer< vtkDICOMImageReader > reader = vtkSmartPointer< vtkDICOMImageReader >::New();
  //reader->SetDirectoryName(argv[1]);
  reader->SetDirectoryName("E:\\TestData\\p1\\T1");//提供DICOM序列文件的路径

  reader->Update();
  int imageDims[3];
  reader->GetOutput()->GetDimensions(imageDims);

打开运行即可:默认

猜你喜欢

转载自blog.csdn.net/ClamReason/article/details/93316914