Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6334

Jupyter kernel dies when trying to save as .VTP file

$
0
0

I am trying to execute a vmtkfunction which needs a .VTP file as input but I need a .VTP file as output. However, everytime when specifiying the outputfile location as a .VTP file, I get an error message that my kernal automatically stopped and needs to be restarted. When running the same command lines but with a .vti file as output the notebook works and runs. However, for the next operation I want to execute I need a .vtp file as an input.
My code is the following:

from vmtk import vmtkscriptsvmtk_image = vmtkscripts.vmtkImageReader() #load vmtkImageReader to read imagesvmtk_image.InputFileName = 'input.vti'vmtk_image.Execute() #actually executing of the file being read.vmtk_to_numpy_image = vmtkscripts.vmtkImageToNumpy() vmtk_to_numpy_image.Image = vmtk_image.Imagevmtk_to_numpy_image.Execute()vmtk_segmentation = vmtkscripts.vmtkLevelSetSegmentation() #import the LevelSetSegmentation function in jupyter notebookvmtk_segmentation.Image = vmtk_to_numpy_image.Image #define which image has to be segmentatedvmtk_segmentation.LevelSetsOutputFileName = 'output.vtp'vmtk_segmentation.Execute()vmtk_segmentation.IOWrite()vmtk_smoothing_surface = vmtkscripts.vmtkSurfaceSmoothing()vmtk_smoothing_surface.SurfaceInputFileName = 'output.vtp'vmtk_smoothing_surface.Execute()

Thanks in advance.


Viewing all articles
Browse latest Browse all 6334

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>