Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <mitkLookupTable.h>
00019
00020 #include "mitkTestingMacros.h"
00021
00022 #include <iostream>
00023
00032 int mitkLookupTableTest(int , char* [])
00033 {
00034
00035 MITK_TEST_BEGIN("LookupTable")
00036
00037
00038 mitk::LookupTable::Pointer myLookupTable = mitk::LookupTable::New();
00039
00040
00041
00042 vtkLookupTable *lut = vtkLookupTable::New();
00043 lut->SetTableValue(0, 0.5, 0.5, 0.5, 1.0);
00044 lut->SetTableValue(0, 0.5, 0.5, 0.5, 0.5);
00045
00046
00047 myLookupTable->SetVtkLookupTable(lut);
00048
00049
00050
00051
00052
00053 vtkLookupTable *lut2 = myLookupTable->GetVtkLookupTable();
00054
00055 MITK_TEST_CONDITION_REQUIRED(lut == lut2,"Input and output table are not equal")
00056
00057 myLookupTable->ChangeOpacityForAll(0.5);
00058
00059 myLookupTable->ChangeOpacityForAll(0.5);
00060
00061 myLookupTable->ChangeOpacity(0, 1.0);
00062
00063
00064
00065
00066
00067
00068 MITK_TEST_CONDITION_REQUIRED(myLookupTable.IsNotNull(),"Testing instantiation")
00069
00070
00071
00072
00073
00074
00075
00076 lut->Delete();
00077
00078 MITK_TEST_END()
00079 }
00080