将vtkImageData保存为体文件

   vtkSmartPointer<vtkMetaImageWriter> writer =
      vtkSmartPointer<vtkMetaImageWriter>::New();
   writer->SetInputData(image);
   std::string filePath = "./test.mhd";
   std::string filePathRaw = "./test.raw";
   writer->SetFileName(filePath.c_str());
   writer->SetRAWFileName(filePathRaw.c_str());
   writer->Write();

猜你喜欢

转载自blog.csdn.net/yuxing55555/article/details/88351323