InsightSoftwareConsortium / itkwidgets

An elegant Python interface for visualization on the web platform to interactively generate insights into multidimensional images, point sets, and geometry.
https://itkwidgets.readthedocs.io/
Apache License 2.0
576 stars 83 forks source link

kernel of DigitalSubtractionAngiographyVesselPath.ipynb dies for different path points #672

Closed IsabellaPa closed 1 year ago

IsabellaPa commented 1 year ago

Hello, I was playing around with the DigitalSubtractionAngiographyVesselPath.ipynb example and noticed that if I change the path file to other points, a lot of times the kernel dies at the last view function (view(dsa, geometries=path, ui_collapsed=True)). When I use my own image, which is smaller, I am completely unable to find a combination of points that works. I moved the code to VS Code in hope that I would get an error message but the script just stops executing in the view function after the viewer is initialized.

Here are some examples of paths that failed for me: Path: [394.00, 203.00] [0.00, 0.00] Path: [394.00, 203.00] [1.00, 20.00] Path: [394.00, 203.00] [001.00, 020.00] Path: [94.00, 203.00] [60.00, 230.00] [250.00, 190.00] Path: [204.00, 23.00] [120.00, 80.00] [273.00, 19.00] [94.00, 173.00] [394.00, 121.00] [403.00, 237.00]

The original path in the example works fine, so I don't think that it is a setup problem. Can I debug this somehow, are there restrictions for possible points or is this a bug? Cheers :)

bnmajor commented 1 year ago

Hi @IsabellaPa! Can you point me to this DigitalSubtractionAngiographyVesselPath.ipynb example? And can I ask which version of itkwidgets you are using?

IsabellaPa commented 1 year ago

@bnmajor Oh, I'm sorry I confused the page. The example is from https://github.com/InsightSoftwareConsortium/ITKMinimalPathExtraction/tree/master/examples. I'm using the itkwidgets version 0.32.6 and python 3.11.3.

bnmajor commented 1 year ago

@IsabellaPa Thanks for the information! I took a quick look at the notebook and FWIW I don't believe there is an issue with the visualization (itkwidgets) but rather in the paths that you are building (for example I was getting 0 back for path.GetVertexList().Size()). It seems like this is a question better suited for the ITKMinimalPathExtraction repo. Please let me know if I am misunderstanding your question though!

IsabellaPa commented 1 year ago

@bnmajor That makes sense, I will ask in the other repo then. Thank you for your help! :)

bnmajor commented 1 year ago

Of course, and please feel free to re-open this issue if you continue to encounter problems with rendering!