Hi everyone, i'm trying to compare 2 binary images so here's what i'm doing : first I mulitply each of them by a coefficient ( 10 and 100 ). Then I add them so I get an output image which has pixel values in {0,10,100,110}. Next i want to apply a color for each pixel value. But the problem comes with my LookUpTable, it only shows blue and green colors -> 0 and 10 are printed in blue and 100 and 110 are printed in green. Here's my code :
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// vtkSmartPointer<vtkLookupTable> lut_v = vtkSmartPointer<vtkLookupTable>::New(); // lut_v->SetNumberOfTableValues(111); lut_v->SetNumberOfColors(111); lut_v->SetTableValue(0, 0, 0, 1, 1.0); // blue // TRUE NEGATIVE lut_v->SetTableValue(10, 1, 1, 0, 1.0); // yellow // FALSE NEGATIVE lut_v->SetTableValue(100, 1, 0, 1, 1.0); // magenta // FALSE POSITIVE lut_v->SetTableValue(110, 0, 1, 0, 1.0); // green // TRUE POSITIVE lut_v->Build(); mitk::LookupTable::Pointer lut_m = mitk::LookupTable::New(); lut_m->SetVtkLookupTable(lut_v); lut_m->Update(); mitk::LookupTableProperty::Pointer lut_prop = mitk::LookupTableProperty::New(lut_m); /* Here node contains my output image */ node->SetProperty("LookupTable", lut_prop); node->SetBoolProperty("scalar visibility", true); node->SetFloatProperty("ScalarsRangeMaximum", 110.0); node->SetBoolProperty("color mode", true); ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// i've also tried to put SetNumberOfColors(4) and then to put the indexes from 0 to 3 for the different colors but the result was the same. so if anyone has an idea why it doesn't work i'd be glad to learn from my mistakes. Regards, Thomas <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Garanti sans virus. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
_______________________________________________ mitk-users mailing list mitk-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mitk-users