From stephen.aylward at kitware.com Mon Jan 6 19:15:43 2020 From: stephen.aylward at kitware.com (Stephen Aylward) Date: Mon, 6 Jan 2020 19:15:43 -0500 Subject: [Tubetk-developers] the Healthy MR Database in TuBeTK In-Reply-To: References: Message-ID: Hi, Thanks for posting your question. ITK's SpatialObject reader can read the .tre format (See ITK Software Guide, page 143: https://itk.org/ItkSoftwareGuide.pdf) There are also two examples of reading .tre files in Python Jupyter Notebooks that are distributed with ITKTubeTK: 1) https://github.com/KitwareMedical/ITKTubeTK/blob/master/docs/examples/ConvertTubesToImage.ipynb and 2) https://github.com/KitwareMedical/ITKTubeTK/blob/master/docs/examples/TubeNumPyArrayAndPropertyHistograms.ipynb Hope these help. On Tue, Dec 17, 2019 at 8:44 PM ??? via Tubetk-developers < tubetk-developers at public.kitware.com> wrote: > Dear sir? > > I?m very thanksful about you about the Healthy MR Database in TuBeTK. But I don?t know how to use the file ?VascularNetwork.tre? which is the label vascular centerlines. Could you help or tell me how can I process this condition? I want to use the information in the .tre file to generate the gold standard and I had tried to convert the world coordinates of the centerline into image coordinates, but I failed.I'm grateful if I could hear from you in your spare time. > > > _______________________________________________ > 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: From 2013222007 at email.szu.edu.cn Mon Jan 13 21:12:03 2020 From: 2013222007 at email.szu.edu.cn (=?utf-8?B?5ZC05p2+6ZuE?=) Date: Tue, 14 Jan 2020 10:12:03 +0800 Subject: [Tubetk-developers] Some problem about vessel's center line Message-ID: 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: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: BC0708B8 at F34D9D6C.73231D5E Type: application/octet-stream Size: 352981 bytes Desc: not available URL: From stephen.aylward at kitware.com Mon Jan 13 22:21:32 2020 From: stephen.aylward at kitware.com (Stephen Aylward) Date: Mon, 13 Jan 2020 22:21:32 -0500 Subject: [Tubetk-developers] Some problem about vessel's center line In-Reply-To: References: Message-ID: 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: -------------- next part -------------- A non-text attachment was scrubbed... Name: BC0708B8 at F34D9D6C.73231D5E Type: application/octet-stream Size: 352981 bytes Desc: not available URL: