New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using Externally-Generated Centerlines in the 0D Simulator #1043
Comments
I made this short powerpoint recently that goes over the idea pretty quickly. I attached it to this message. Basically, I used the VMTK module in 3D slicer to generate the network model that is able to capture the loops within the cerebral vessels with pretty reasonable resolution. I was then able to export it as a vtp and now am trying to integrate it into the SimVascular 0D model. I am currently working trying to find a way to quickly compile the SV source code to test any changes that I make. I am mainly focusing on this file: [https://github.com/SimVascular/SimVascular/blob/edd1fc7c26cf9550594a7362d66bb5d0fadda4d9/Code/Source/sv4gui/Modules/Model/Common/sv4gui_ModelUtils.cxx#L1184-L1232] in which I will be making the majority of changes. If you have an idea on how to compile the source to allow me to quickly check this centerlines portion, it would be greatly appreciated. Thank You, Ricardo |
@riro3277, were you able to compile the code and make modifications to |
That's a common problem with an easy fix! One of the external libraries requires SimVascular/.github/workflows/build.yml Lines 53 to 69 in edd1fc7
The |
You're probably using a different What's the output of this:
|
It gives a blank line for both entries. Sudo has been the only way I can get the make to run but I will mess around with some permissions |
Is this the best method for building on Ubuntu 20? https://github.com/SimVascular/SimVascular/blob/master/BuildWithMake/README-build-linux.txt |
The most up-to-date is this, which we execute on all our test machines: SimVascular/.github/workflows/build.yml Lines 53 to 69 in edd1fc7
If you follow these steps, it should build. If your CXX and CC are empty, you have not set them to point to gcc-8 .
|
@riro3277 SV typically takes a few minutes to build. You seem to be stuck downloading externals? |
Yes, it is getting stuck downloading externals but I am unsure where the problem is arising from. I am using gcc-8 and g++-8. I made sure all the libs are installed correctly also which they are. |
If you are seeing
then the externals have already been downloaded, you should then see
Maybe remove the build directory and start again. The
|
Okay, thanks. I was able to successfully build and install the source. Now, what do you think the best way would be to re-compile and test changes to the sv4gui_ModelUtils.cxx? |
To re-compile after changing the source code
What code did you make changes to, was it the You will need to test by running SV with a project that calls this code, ROM simulation I guess. Or you could add a method to the SV Python API and test using a Python script. Some of the Modeling.PolyData methods call
That would make testing faster but would require a bit more coding in the unknown. |
It would be the CreateCenterlinesSections() function. So to do this without the Python API, I would need to make the source, run the gui, load a project, and then run the ROM simulation within the GUI? |
Correct, create an SV project with a model and then create a ROM Simulation Tool and create centerlines from there. You can run the new build using |
I am thinking that instead of having to change SimVascular source code directly, I edit this directory Code/ThirdParty/vmtk/simvascular_vmtk/ to take in my raw centerline and output one with the needed arrays that I can then move into the project directory of the SimVascular project for the ROM simulations. Would this work instead? Also, I tried doing an isolated build of this directory but was getting errors if anyone has tried to do so before. |
|
Have a look at the |
Hi all, Happy New Year! I wanted to give a quick update to where I currently am with this project. I made some substantial progress and am able to read an external centerlines with loops and produce an 0D-input centerline that contains all the needed arrays. Although this process is not streamlined and uses multiple different pre-processing scripts, I can complete it. The problem now lies in that when creating the solver_0d.json file, the branches of the centerline are not matching with the assignments of resistance/inflow values. As in centerline branches are not corresponded to the correct cap of the surface model. I am having trouble finding the right file that matches the outlet caps to branches of the centerline in order to try and make corrections. Any help would be appreciated! Thanks, Ricardo |
Hi All, I wanted to give a quick update regarding the last question. I am able to produce the .json input file but when I try to run the solver, I am getting a segmentation fault. I can't find any distinguishable difference between this solver file and a working file. Here is a link to the ROM simulation folder that contains the centerline and the input file https://drive.google.com/file/d/1fPTmSxXjwVbtbVG2RpT74pOID8AZ9trU/view?usp=drive_link. If there are any suggestions or reasoning to why this happening, it would be greatly appreciated! Thanks, Ricardo |
I have been working with Dr. Pfaller on developing an additional ability in SimVascular to utilize externally-generated centerlines within the 0D simulator. This Issue will act as a thread for continued conversation and updates on where I am at. I have also created a fork where I will be updating my progress
The text was updated successfully, but these errors were encountered: