I tried to update the tubetk, but there was an error: attributeerror: module ‘tubetk’ has no attribute ‘writetubesaspolydata’. Maybe this function has not been updated yet?
We are one bug away from releasing these wheels. Sorry for the delay. With the new wheel generation scripts, the wheels have to work 100% on every platform before they can be released, and several bugs creeped in that needed to be squashed.
The function call SetFileName("Tubes.vtp")
is used to tell the class the name of the file to be created. VTP is a polydata file format that is used by VTK-based applications such as ParaView and ParaView Glance.
I’m adding a jupyter notebook to give a demo of this command. In short, the relevant code snippet is ttk.WriteTubesAsPolyData.New(Input=tubes,FileName="Tube.vtp").Update()
The file “Tube.vtp” is the polydata defined by the hierarchy of ITKSpatialObjects in the variable “tubes”. The Tube.vtp file can then be dragged-and-dropped onto ParaView Glance in your web browser, and the results (after setting “Color By:” to “Id”) should look like
It has the following problems:
itkImageF4 not loaded from module TubeTK because of exception:
module ‘itk.TubeTKPython’ has no attribute ‘itkImageF4’
vectoritkImageF4 not loaded from module TubeTK because of exception:
module ‘itk.TubeTKPython’ has no attribute ‘vectoritkImageF4’
Hi @Stephen_Aylward
When I use “pip install itk-tubetk” (version 0.9.0) to install TubeTK, I can’t import itk-tubetk:
No module named 'itk_tubetk'
Do you have any better suggestions? Also, when I use itk (version 5.2.1) to convert “.tre” files, I got following errors:
itkImageF4 not loaded from module TubeTK because of exception:
module 'itk.TubeTKPython' has no attribute 'itkImageF4'
vectoritkImageF4 not loaded from module TubeTK because of exception:
module 'itk.TubeTKPython' has no attribute 'vectoritkImageF4'
P.S. itk is installed with the pip install itk command.
Please try running this code on your machine and reporting if it works or not. The .mha and .tre file should be in the same directory as the code / jupyter notebook. I’ve attached the jupyter notebook for your convenience. VascularNetwork.ipynb (2.7 KB)
If it fails, we will need to check the version of ITK and TubeTK installed on your machine.
Hi, thanks for the information. Would you please provide the ITK and TubeTK versions supports this .ipynb file? Mine are:
itk-5.3rc4.post2
itk-tubetk-1.1rc1
itk-minimalpathextraction-1.2.2
I have followed the discussion from earlier but I am stuck with the this error: