My collaborator is using Curve Maker to fit a curve to feature in an MRI image. They would like to be able to space a certain number of points along that curve. Is there already a way to do this? If not, how difficult would this be to do? I use python, but I am a researcher not a trained programmer.
You might find the code below helpful - this is set up to calculate equally spaced steps along a piecewise spline. It would be possible to do this once and add up the path length of the curve and then divide it out by the desired number of steps to get a set of equally spaced points.
I’m working on an extension called Slicer Markups to Model, which has similar functionality to Curve Maker. I’m curious to hear more about what you (and your collaborator) are trying to do. Just to clarify: are you trying to resample the curve (output a new set of markup fiducials)? Or maybe you’re trying to get a smoother curve for visualization?
I am Harish, a Master’s student at the University of Waterloo. Firstly, I want to thank you for your extension ‘MarkupsToModel’. I am really excited to discover the capabilities of the extension, which I will be doing soon.
I had a few questions for you though, if you don’t mind. Before I ask them, here is a brief of what I am going to use the extension for: For my research I am trying to morph an existing mesh of a knee model to generate patient-specific models having CT/MRI as inputs. In 3D Slicer I was trying to generate points along the boundaries of distinct regions (such as bone, cartilage, ligament etc.) and I want to then export the co ordinates of these points to Hypermesh and try to morph my existing knee model to the new co-ordinates so I can obtain a new patient-specific model.
I wanted to know if there exists a tutorial with examples as to how MarkupsToModel could be used? And also will I be able to export the generated points as co-ordinates into a file or something?
Hi Harish! It sounds to me like you want to resample points along the curve, then. I can’t think of any script-free ways to do this at the moment.
In the next 2-3 weeks I plan to add a way to resample points along the curve and export those point coordinates to Markups. Hypothetically you could then save those Markups as .fcsv (which should be comma-delimited text containing the coordinates).