SlicerIGT / SlicerMarkupsToModel

3D Slicer extension to create tube or closed surface model from markup fiducials
BSD 3-Clause "New" or "Revised" License
11 stars 10 forks source link

Add functionality to resample points along a curve #11

Open tavaughan opened 7 years ago

tavaughan commented 7 years ago

Would have several applications, including assessment of catheter placement

tavaughan commented 7 years ago

Here is what ideally I'd like to have on the GUI two new parameters. An output node to store resampled points (either as Markups or as Model), and a resampling distance. See the two I added to the GUI (they're at the bottom of the list):

gui

Now I could easily change the low-level functions to have an optional output parameter (vtkPoints* resampledPoints) and resampling distance, but this will add even more parameters to these already-long interfaces:

    static void GeneratePiecewiseLinearCurveModel( vtkPoints* controlPoints, vtkPolyData* outputTubePolyData,
      double tubeRadius=vtkSlicerMarkupsToModelCurveGeneration::TUBE_RADIUS_DEFAULT,
      int tubeNumberOfSides=vtkSlicerMarkupsToModelCurveGeneration::TUBE_NUMBER_OF_SIDES_DEFAULT,
      int tubeSegmentsBetweenControlPoints=vtkSlicerMarkupsToModelCurveGeneration::TUBE_SEGMENTS_BETWEEN_CONTROL_POINTS_DEFAULT,
      bool tubeLoop=vtkSlicerMarkupsToModelCurveGeneration::TUBE_LOOP_DEFAULT,
      vtkPoints* outputResampledPoints=NULL,
      double resamplingDistance=RESAMPLING_DISTANCE_DEFUALT );

Obviously this will make things rather messy. What would be the best way to proceed?