Hi Dave,
Sorry for not replying for a long time. I've been working on different projects, and could only come back to this one recently.
I was able to change the contour type with your guidance, before I did many other changes, like cloning contour groups, best-fitting an ellipse to any shape, getting a list of commands from a CSV file to edit contour groups, getting many statistics from the contours, and saving them into a CSV file. The code is not very polished, but it is working. I am trying to use object-oriented style as much as I can.
Please, have a look in the attached file with the code. I think there are many things that I have implemented that are very useful, and you include in SimVascular in the future. For instance, version 2019.08.09 collapses when converting closed splines into ellipses. I guess this will be fixed if you use some of the ideas from this code. I've got other ideas, which I haven't had time to apply yet. I will be glad to discuss them if you wish.
Best regards,
Rudolf
Structure of .ctgr files
- Rudolf Hellmuth
- Posts: 19
- Joined: Mon Jul 25, 2016 7:32 am
Re: Structure of .ctgr files
- Attachments
-
- sv-contours.zip
- python 3 code, missing the demo.vtp because of space
- (248.84 KiB) Downloaded 68 times
- David Parker
- Posts: 1753
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Structure of .ctgr files
Hi Rudolf,
Thanks for the code, I'll have a look.
You mentioned that SV version 2019.08.09 collapses when converting closed splines into ellipses. I tried this with the latest release and it worked fine on a Mac. What platform are you using?
Cheers,
Dave
Thanks for the code, I'll have a look.
You mentioned that SV version 2019.08.09 collapses when converting closed splines into ellipses. I tried this with the latest release and it worked fine on a Mac. What platform are you using?
Cheers,
Dave
- Rudolf Hellmuth
- Posts: 19
- Joined: Mon Jul 25, 2016 7:32 am
Re: Structure of .ctgr files
Hi Dave,
I am using Windows 10.
I remember having to convert one type of contour into another intermediary one, before converting again to the one I wanted, because SimVascular was crashing when I converted straight away to my end contour type. It involved spline loops, circles and ellipses, and perhaps a smoothing. However, I am not able to replicate this issue now. I will let you know if it happens again.
I think it would be useful for SimVascular to show and export geometrical features along the center line, so the user can more easily compare statistics across different images and segmentations. Exporting flow features along the centreline would also be useful. I've done this before as a ParaView script [DOI: 10.1007/s13239-020-00473-z], but I think it will be more convenient if the data came straight out from SimVascular. Less steps, and less risk of making human mistakes when dealing with many 3-D models around.
Best regards,
Rudolf
I am using Windows 10.
I remember having to convert one type of contour into another intermediary one, before converting again to the one I wanted, because SimVascular was crashing when I converted straight away to my end contour type. It involved spline loops, circles and ellipses, and perhaps a smoothing. However, I am not able to replicate this issue now. I will let you know if it happens again.
I think it would be useful for SimVascular to show and export geometrical features along the center line, so the user can more easily compare statistics across different images and segmentations. Exporting flow features along the centreline would also be useful. I've done this before as a ParaView script [DOI: 10.1007/s13239-020-00473-z], but I think it will be more convenient if the data came straight out from SimVascular. Less steps, and less risk of making human mistakes when dealing with many 3-D models around.
Best regards,
Rudolf
- David Parker
- Posts: 1753
- Joined: Tue Aug 23, 2005 2:43 pm
Re: Structure of .ctgr files
Hi Rudolf,
If you'd like to see a new SV feature then please open a GitHub Issue for it so I can track it https://github.com/SimVascular/SimVascular/issues.
I'm not sure if this kind of functionality is useful for all users and could be performed using Python scripts. The geometric features you mentioned in your paper are calculated using Python scripts we use when creating 1D models. We could execute these scripts within SV and show the results.
Cheers,
Dave
If you'd like to see a new SV feature then please open a GitHub Issue for it so I can track it https://github.com/SimVascular/SimVascular/issues.
I'm not sure if this kind of functionality is useful for all users and could be performed using Python scripts. The geometric features you mentioned in your paper are calculated using Python scripts we use when creating 1D models. We could execute these scripts within SV and show the results.
Cheers,
Dave