Skip to content

Commit

Permalink
Merge pull request #193 from jhlegarreta/FixVTKPolydataIdExtractionWa…
Browse files Browse the repository at this point in the history
…rning

COMP: Prefer using `vtkExtractSelection`
  • Loading branch information
jhlegarreta committed Oct 29, 2023
2 parents ff5b340 + 55ecb00 commit 6c7df6e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Version: $Revision: 1.3 $
#include <vtkAlgorithmOutput.h>
#include <vtkCommand.h>
#include <vtkExtractPolyDataGeometry.h>
#include <vtkExtractSelectedPolyDataIds.h>
#include <vtkExtractSelection.h>
#include <vtkIdTypeArray.h>
#include <vtkInformation.h>
#include <vtkNew.h>
Expand Down Expand Up @@ -104,7 +104,7 @@ vtkMRMLFiberBundleNode::vtkMRMLFiberBundleNode() :
MarkupsNode(NULL),
MarkupsNodeID(NULL),
ExtractFromROI(vtkExtractPolyDataGeometry::New()),
ExtractSubsample(vtkExtractSelectedPolyDataIds::New()),
ExtractSubsample(vtkExtractSelection::New()),
Planes(vtkPlanes::New()),
LocalPassThrough(vtkPassThrough::New())
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include "vtkSlicerTractographyDisplayModuleMRMLExport.h"

class vtkMRMLFiberBundleDisplayNode;
class vtkExtractSelectedPolyDataIds;
class vtkExtractSelection;
class vtkMRMLMarkupsNode;
class vtkIdTypeArray;
class vtkExtractPolyDataGeometry;
Expand Down Expand Up @@ -219,7 +219,7 @@ class VTK_SLICER_TRACTOGRAPHYDISPLAY_MODULE_MRML_EXPORT vtkMRMLFiberBundleNode :

private:
// Pipeline filter objects
vtkExtractSelectedPolyDataIds* ExtractSubsample;
vtkExtractSelection* ExtractSubsample;
vtkPlanes *Planes;
vtkPassThrough* LocalPassThrough;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def rasterizeFibers(self,fiberNode,labelNode,labelValue=1,samplingDistance=0.1):
selectionNode.SetFieldType(vtk.vtkSelectionNode.CELL)
selectionNode.SetContentType(vtk.vtkSelectionNode.INDICES)

extractor = vtk.vtkExtractSelectedPolyDataIds()
extractor = vtk.vtkExtractSelection()
extractor.SetInputData(0, polyData)

resampler = vtk.vtkPolyDataPointSampler()
Expand Down

0 comments on commit 6c7df6e

Please sign in to comment.