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

David Gobbi david.gobbi at gmail.com
Wed Mar 29 13:01:27 EDT 2017


On Wed, Mar 29, 2017 at 10:53 AM, David Gobbi <david.gobbi at gmail.com> wrote:

> On Wed, Mar 29, 2017 at 10:42 AM, David Thompson <
> david.thompson at kitware.com> wrote:
>
>> Hi David,
>>
>> > ...I'm planning to add a new image filter to VTK, and will name it
>> something like vtkImageMapThroughLUT.  The operation of this filter will be
>> as follows:
>> >
>> > - It will take, as input, any image that uses an integer scalar type
>> > - The scalars will be mapped though a lookup table to generate the
>> output image
>> >
>> > For the "lookup table" or (LUT), I was planning to use a plain-old
>> vtkDataArray.  I cannot use vtkLookupTable as the LUT, since vtkLookupTable
>> can only produce "unsigned char" output and is meant to be used for
>> generating color data.
>> >
>> > My question to the list is as follows: is vtkDataArray the best object
>> to use for storing such a LUT?
>>
>> You might consider vtkPiecewiseFunction (in Common/DataModel).
>>
>> > Also, is there already a class in the VTK geometry pipeline that allows
>> labels to be remapped to new label values via a LUT?
>>
>> I don't know of any; what format are the labels in?
>>
>
> 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.
>

To put it another way, the labels that I'm referring to are categorical
values, where all voxels with value "n" belong to "category n".

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170329/bbcef7f4/attachment.html>


More information about the vtk-developers mailing list