public static void WriteImageData(string imageDataPath, string connectiveAirwayVtpPath, vtkImageData imagedata) { vtkMetaImageWriter write = new vtkMetaImageWriter(); write.SetFileName(imageDataPath); write.SetInput(imagedata); write.Write(); write.Dispose(); try { VMTKUtil.DoMarchingCubeNotConnective(imageDataPath, connectiveAirwayVtpPath, 1); } catch (Exception ex) { Logger.Log(ex.ToString()); throw; } //vtkPolyData polyData = MarchingCubeImageData(imagedata, 1); //vtkXMLPolyDataWriter writepolyData = new vtkXMLPolyDataWriter(); //writepolyData.SetFileName(airwayVtpPath); //writepolyData.SetInput(polyData); //writepolyData.Write(); }
public static void WriteImageData(string imageDataPath, vtkImageData imagedata) { vtkMetaImageWriter write = new vtkMetaImageWriter(); write.SetFileName(imageDataPath); write.SetInput(imagedata); write.Write(); write.Dispose(); }