Problem
Currently, I am using the the _build_constrained_tissue_mesh function to constrain nodes from the exported mesh to the tree centerlines. However, I noticed that currently, you are only really only able to make out the nodes corresponding to the small terminal branches (i.e. there is a lot of empty space for the vessels that are much longer). Here is a screenshot of the exported tissue mesh in paraview, where I used a threshold filter to only show the constained nodes (as opposed to the entire mesh).
I would expect this to be problematic for the application of mapping the pressure values from 0D fluids to the node IDs that are sparse for long vessels.
Solution
Possibly an approach that specifies the number of nodes per unit length as opposed to nodes per vessel (current). At the lowest level, I anticipate that this would change the write_splines() function implementation to include something like:
num_points = max(2, int(round(branch_lengths[vessel] * nodes_per_unit_length)) + 1)
t = np.linspace(0, 1, num=num_points)
where nodes_per_unit_length may just use the old value "spline_sample_points" with the intent of specifying how many nodes should appear along a given unit length.
Rather than the current spacing that strictly constrains nodes per vessel:
t = np.linspace(0, 1, num=spline_sample_points)
I would propose implementing a getter function to return vessel length:
def get_lengths(data, branches):
To later be called in write_splines() function or even within the get_interpolated_sv_data(data) function definition in which you are already calling other getters and returns the input interp_xyzr you call in the write_splines() function.
Additional context
No response
Code of Conduct
Problem
Currently, I am using the the _build_constrained_tissue_mesh function to constrain nodes from the exported mesh to the tree centerlines. However, I noticed that currently, you are only really only able to make out the nodes corresponding to the small terminal branches (i.e. there is a lot of empty space for the vessels that are much longer). Here is a screenshot of the exported tissue mesh in paraview, where I used a threshold filter to only show the constained nodes (as opposed to the entire mesh).
I would expect this to be problematic for the application of mapping the pressure values from 0D fluids to the node IDs that are sparse for long vessels.
Solution
Possibly an approach that specifies the number of nodes per unit length as opposed to nodes per vessel (current). At the lowest level, I anticipate that this would change the write_splines() function implementation to include something like:
where nodes_per_unit_length may just use the old value "spline_sample_points" with the intent of specifying how many nodes should appear along a given unit length.
Rather than the current spacing that strictly constrains nodes per vessel:
t = np.linspace(0, 1, num=spline_sample_points)I would propose implementing a getter function to return vessel length:
To later be called in write_splines() function or even within the get_interpolated_sv_data(data) function definition in which you are already calling other getters and returns the input interp_xyzr you call in the write_splines() function.
Additional context
No response
Code of Conduct