I have encountered some problems recently. I want to rebulid the volume image from a “.tre” file to show the refine image. I use itk to complete this work, and it works perfect in the conda env. However, when I run it in my Slicer extension, it shows:
TemplateImageType: <class 'itk.itkImagePython.itkImageF3'>
terminate called after throwing an instance of 'H5::DataSpaceIException'
error: [/mnt2/homes/xingyul/xinyul/Slicer/bin/SlicerApp-real] exit abnormally - Report the problem.
I tried to debug, found that this line of code caused the program to crash:
Traceback (most recent call last):
File "/mnt2/homes/xingyul/xinyul/Slicer/vessel_connect/infer_tools_tree/result/test.py", line 1, in <module>
from TreToImg import treTomask
File "/mnt2/homes/xingyul/xinyul/Slicer/vessel_connect/infer_tools_tree/result/TreToImg.py", line 1, in <module>
import itk
File "/mnt2/homes/xingyul/xinyul/Slicer/lib/Python/lib/python3.6/site-packages/itk/__init__.py", line 28, in <module>
from itk.support.extras import *
File "/mnt2/homes/xingyul/xinyul/Slicer/lib/Python/lib/python3.6/site-packages/itk/support/extras.py", line 23, in <module>
import numpy as np
File "/mnt2/homes/xingyul/xinyul/Slicer/lib/Python/lib/python3.6/site-packages/numpy/__init__.py", line 140, in <module>
from . import core
File "/mnt2/homes/xingyul/xinyul/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/__init__.py", line 22, in <module>
from . import multiarray
File "/mnt2/homes/xingyul/xinyul/Slicer/lib/Python/lib/python3.6/site-packages/numpy/core/multiarray.py", line 12, in <module>