New script: vmtksurfaceclippercenterline#196
Conversation
|
Hi @kayarre, sorry for the delayed review. A few minor issues on first glance:
for seed_type in seeds_dict.keys():
for i in range(seeds_dict[seed_type].GetNumberOfIds()):
seedId = seeds_dict[seed_type].GetId(i)This is not particuarly easy code to read (especially since you are storing a vtk object as a value in a python dict. First suggestion: please add a comment for future readability about what you are doing. for (seed_type, target_seed_ids) in seed_dict.items():
for i in range(target_seed_ids):
seedId = target_seed_ids.GetId(i)
...That is a bit more pythonic, and makes sure that the differences in the way python 2 and 3 handle the dictionary keys() method is not an issue. Also, can you provide an example or two where this method yeilds more accurate results than the current Thanks for the contribution! It is much appreciated! |
|
Thanks @rlizzo for the feedback. I have created another pull request to update the vmtksurfaceendclipper to include this functionality and address your comments. The normal estimation routine is poor and the clipping direction is often inverted. I am going to close this request. |
adapted the vmtksurfaceendclipper to use centerline geometry information to get a more accurate normal to clip a surface at the inlets and outlets.