[Tubetk-developers] Some problem about vessel's center line

Stephen Aylward stephen.aylward at kitware.com
Mon Jan 13 22:21:32 EST 2020


Hi,

Congratulations on great progress!

Please confirm that you are using ITK version 5.1rc01 or later (e.g.,
compile from github master).

If you are using pip, the command is

> pip install --pre itk

Versions of ITK prior to 5.1rc01 contained a bug when reading
SpatialObjects.

Once you have confirmed that you are using that release of ITK, if the
problem persists, please try converting the tubes to an image and then
displaying both images in ParaView.  Example code for converting tubes to
images is given here:

https://github.com/KitwareMedical/ITKTubeTK/blob/master/examples/ConvertTubesToImage.ipynb

The reason to try converting to an image instead of using discrete points
is that ParaView and ITK use different spaces (RAS versus LPS, I believe),
so rendering images and points from ITK may require a coordinate transform
to keep them aligned.

On Mon, Jan 13, 2020 at 9:12 PM 吴松雄 via Tubetk-developers <
tubetk-developers at public.kitware.com> wrote:

> Dear
>     Thanks so much for response . I tried to convert the tre file to a vtp
> file using the following code. The vtp files were read using ParaView
> software. But we found that the center line of this vessel did not
> correspond to the original picture, did we miss something?I'm grateful if I
> could hear from you in your spare time.
> Best regards
> songxiong wu
>
> this is the code:
> import itk
> file_name = 'VascularNetwork.tre'
> Dimension = 3
> reader = itk.SpatialObjectReader[Dimension].New()
> reader.SetFileName(file_name)
> reader.Update()
> tubes = reader.GetGroup()
> print(tubes)
> writer = itk.SpatialObjectWriter[Dimension].New()
> writer.SetInput(tubes)
> writer.SetFileName('VascularNetwork.vtp')
> writer.Update()
>
> this is the result showed in ParaView software:
> _______________________________________________
> Tubetk-developers mailing list
> Tubetk-developers at public.kitware.com
> https://public.kitware.com/mailman/listinfo/tubetk-developers
>


-- 
Stephen R. Aylward, Ph.D.
Senior Director of Strategic Initiatives
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/tubetk-developers/attachments/20200113/0944ffd9/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BC0708B8 at F34D9D6C.73231D5E
Type: application/octet-stream
Size: 352981 bytes
Desc: not available
URL: <https://public.kitware.com/pipermail/tubetk-developers/attachments/20200113/0944ffd9/attachment-0001.obj>


More information about the Tubetk-developers mailing list