[vtk-developers] Image filter to remap labels to new values

David Thompson david.thompson at kitware.com
Wed Mar 29 13:01:53 EDT 2017


Hi David,

> ... The "labels", in this case, are just scalar values.  The use case is images that represent brain segmentations, where a pixel value of "0" represents nothing, a pixel value of "1" represents one particular region of the brain, a pixel value of "2" represents a different region of the brain, etc.  Such images are commonly used in neuroscience imaging research, and are often called "label images" or, depending on their use, "atlas images".
> 
> So we're talking about simply mapping integer scalar values through a LUT, to get a new set of integer scalar values.

Then I don't see vtkPiecewiseFunction or anything else doing anything you need; a vtkDataArray is probably best, although it might be nice to have a new vtkDataObject subclass (vtkScalarMap?) that takes the table and sorts it so lookups are O(log(N)) instead of O(N). That's not a whole lot of code, though, so I can also see just making it part of vtkImageMapThroughLUT.

	David


More information about the vtk-developers mailing list