How to read/write an ITK TubeSpatialObject?

If i want to read an object like this

import itk
PixelType = itk.UC
Dimension = 3
ReaderType = itk.TubeSpatialObject[3]
reader = ReaderType.New()

Is there a convenient to make it?
How can i generate the ground truth from VascularNetwork.tre?

1 Like

@Stephen_Aylward can best answer this.

Excellent examples of reading a SpatialObject are given in the ITK Software Guide and in the example files. For example, see


There is also info on the TubeSpatialObject API at


Hope this helps,


1 Like