I’m applying a vtkLookupTable
via vtkImageSlice->GetProperty()->SetLookupTable(lut)
:
lut->SetNumberOfColors(256);
lut->SetValueRange(0, 255);
lut->SetRange(0, 255);
lut->SetNumberOfTableValues(256);
for (int i = 0; i <= 255; i++) {
double red = [[parsedTable Red][i] doubleValue];
double green = [[parsedTable Green][i] doubleValue];
double blue = [[parsedTable Blue][i] doubleValue];
lut->SetTableValue(i, red, green, blue);
}
I’ve fetched a set of lookup tables from here that I’ve parsed to obtain their RGB values, but when I apply them to my pipeline the result is different from Horos and other viewers (first picture is the expected result, second one is what I’m getting).
Is there some obvious mistake in my code that I’m missing, or are there any settings I can tweak to achieve the expected result?