I need to display the segmentation of MRI volume with use of Freesurfer LUT color table.
In my case, only selected regions are represented with different label values (integers) - the data array contains unevenly distributed uint16 values in range [2, 2035],
eg. [2,4,5,6,7,8,9,10,12,…, 1024,1025, 2034,2035].
In total this is 114 labels with assigned colors.
I created RGBPoint for each label value and associated color according to Freesurfer LUT.
vtkColorTransferFunction.addRGBPoint(value, r, g, b);
Then I applied vtkColorTransferFunction to vtkImageSlice actor and the result was bad.
It seems like almost every second color is shifted.
I tried to set parameters as mappingRange, indexedLookup, annotations but it did not help at all.
Is there a way that I could create (and apply to ImageSlice) Lookup table with indexed colors to labels?