PerkLab/PolySeg

Make closed surface to binary labelmap converter more efficient

Opened this issue · 1 comments

David Gobbi's comment on the VTK mailing list:

it would be more efficient to use vtkImageStencilToImage instead of vtkImageStencil and vtkImageCast. The vtkImageStencilToImage filter requires only one input (the stencil), i.e. it doesn't require 'binaryLabelMap' as input. Also, you can set the data type of the image that it produces as output, so it doesn't have to be followed by a cast

Also: "you could call imageStencilToImage->SetOutput(binaryLabelMap) before calling imageStencilToImage->Update()."