diff --git a/Core/Code/DataManagement/mitkLookupTable.cpp b/Core/Code/DataManagement/mitkLookupTable.cpp index c8d9f5dfb9..8edd8739aa 100644 --- a/Core/Code/DataManagement/mitkLookupTable.cpp +++ b/Core/Code/DataManagement/mitkLookupTable.cpp @@ -1,294 +1,298 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "mitkLookupTable.h" #include #include #include mitk::LookupTable::LookupTable() { m_LookupTable = vtkLookupTable::New(); this->SetRequestedRegionToLargestPossibleRegion(); } mitk::LookupTable::~LookupTable() { if ( m_LookupTable ) { m_LookupTable->Delete(); m_LookupTable = NULL; } } void mitk::LookupTable::SetVtkLookupTable( vtkLookupTable* lut ) { if(m_LookupTable == lut) { return; } if(m_LookupTable) { m_LookupTable->UnRegister(NULL); m_LookupTable = NULL; } if(lut) { lut->Register(NULL); } m_LookupTable = lut; this->Modified(); } void mitk::LookupTable::ChangeOpacityForAll( float opacity ) { int noValues = m_LookupTable->GetNumberOfTableValues (); vtkFloatingPointType rgba[ 4 ]; for ( int i = 0;i < noValues;i++ ) { m_LookupTable->GetTableValue ( i, rgba ); rgba[ 3 ] = opacity; m_LookupTable->SetTableValue ( i, rgba ); } this->Modified(); // need to call modiefied, since LookupTableProperty seems to be unchanged so no widget-updat is executed } void mitk::LookupTable::ChangeOpacity(int index, float opacity ) { int noValues = m_LookupTable->GetNumberOfTableValues (); if (index>noValues) { MITK_INFO << "could not change opacity. index exceed size of lut ... " << std::endl; return; } vtkFloatingPointType rgba[ 4 ]; m_LookupTable->GetTableValue ( index, rgba ); rgba[ 3 ] = opacity; m_LookupTable->SetTableValue ( index, rgba ); this->Modified(); // need to call modiefied, since LookupTableProperty seems to be unchanged so no widget-updat is executed } vtkLookupTable* mitk::LookupTable::GetVtkLookupTable() const { return m_LookupTable; }; mitk::LookupTable::RawLookupTableType * mitk::LookupTable::GetRawLookupTable() const { if (m_LookupTable==NULL) MITK_INFO << "uuups..." << std::endl; return m_LookupTable->GetPointer( 0 ); }; /*! * \brief equality operator inplementation */ bool mitk::LookupTable::operator==( const mitk::LookupTable& other ) const { if ( m_LookupTable == other.GetVtkLookupTable()) return true; vtkLookupTable* olut = other.GetVtkLookupTable(); if (olut == NULL) return false; bool equal = (m_LookupTable->GetNumberOfColors() == olut->GetNumberOfColors()) && (m_LookupTable->GetTableRange()[0] == olut->GetTableRange()[0]) && (m_LookupTable->GetTableRange()[1] == olut->GetTableRange()[1]) && (m_LookupTable->GetHueRange()[0] == olut->GetHueRange()[0]) && (m_LookupTable->GetHueRange()[1] == olut->GetHueRange()[1]) && (m_LookupTable->GetSaturationRange()[0] == olut->GetSaturationRange()[0]) && (m_LookupTable->GetSaturationRange()[1] == olut->GetSaturationRange()[1]) && (m_LookupTable->GetValueRange()[0] == olut->GetValueRange()[0]) && (m_LookupTable->GetValueRange()[1] == olut->GetValueRange()[1]) && (m_LookupTable->GetAlphaRange()[0] == olut->GetAlphaRange()[0]) && (m_LookupTable->GetAlphaRange()[1] == olut->GetAlphaRange()[1]) && (m_LookupTable->GetRamp() == olut->GetRamp()) && (m_LookupTable->GetScale() == olut->GetScale()) && (m_LookupTable->GetAlpha() == olut->GetAlpha()) && (m_LookupTable->GetTable()->GetNumberOfTuples() == olut->GetTable()->GetNumberOfTuples()); if (equal == false) return false; //for (vtkIdType i=0; i < m_LookupTable->GetTable()->GetNumberOfTuples(); i++) //{ // if (m_LookupTable->GetTable()->GetTuple(i) != olut->GetTable()->GetTuple(i)) // return false; //} for (vtkIdType i=0; i < m_LookupTable->GetNumberOfTableValues(); i++) { + double v0_1 = m_LookupTable->GetTableValue(i)[0]; double v0_2 = olut->GetTableValue(i)[0]; + double v1_1 = m_LookupTable->GetTableValue(i)[1]; double v1_2 = olut->GetTableValue(i)[1]; + double v2_1 = m_LookupTable->GetTableValue(i)[2]; double v2_2 = olut->GetTableValue(i)[2]; + double v3_1 = m_LookupTable->GetTableValue(i)[3]; double v3_2 = olut->GetTableValue(i)[3]; bool tvequal = (m_LookupTable->GetTableValue(i)[0] == olut->GetTableValue(i)[0]) && (m_LookupTable->GetTableValue(i)[1] == olut->GetTableValue(i)[1]) && (m_LookupTable->GetTableValue(i)[2] == olut->GetTableValue(i)[2]) && (m_LookupTable->GetTableValue(i)[3] == olut->GetTableValue(i)[3]); if (tvequal == false) return false; } return true; } /*! * \brief un-equality operator implementation */ bool mitk::LookupTable::operator!=( const mitk::LookupTable& other ) const { return !(*this == other); } /*! * \brief assignment operator implementation */ mitk::LookupTable& mitk::LookupTable::operator=( const mitk::LookupTable& LookupTable ) { if ( this == &LookupTable ) { return * this; } else { m_LookupTable = LookupTable.GetVtkLookupTable(); return *this; } } void mitk::LookupTable::UpdateOutputInformation( ) { if ( this->GetSource( ) ) { this->GetSource( ) ->UpdateOutputInformation( ); } } void mitk::LookupTable::SetRequestedRegionToLargestPossibleRegion( ) {} bool mitk::LookupTable::RequestedRegionIsOutsideOfTheBufferedRegion( ) { return false; } bool mitk::LookupTable::VerifyRequestedRegion( ) { //normally we should check if the requested region lies within the //largest possible region. Since for lookup-tables we assume, that the //requested region is always the largest possible region, we can always //return true! return true; } void mitk::LookupTable::SetRequestedRegion( itk::DataObject *) { //not implemented, since we always want to have the RequestedRegion //to be set to LargestPossibleRegion } void mitk::LookupTable::CreateColorTransferFunction(vtkColorTransferFunction*& colorFunction) { if(colorFunction==NULL) colorFunction = vtkColorTransferFunction::New(); mitk::LookupTable::RawLookupTableType *rgba = GetRawLookupTable(); int i, num_of_values=m_LookupTable->GetNumberOfTableValues(); vtkFloatingPointType *cols; vtkFloatingPointType *colsHead; colsHead=cols=(vtkFloatingPointType *)malloc(sizeof(vtkFloatingPointType)*num_of_values*3); for(i=0;iBuildFunctionFromTable(m_LookupTable->GetTableRange()[0], m_LookupTable->GetTableRange()[1], num_of_values-1, colsHead); free(colsHead); } void mitk::LookupTable::CreateOpacityTransferFunction(vtkPiecewiseFunction*& opacityFunction) { if(opacityFunction==NULL) opacityFunction = vtkPiecewiseFunction::New(); mitk::LookupTable::RawLookupTableType *rgba = GetRawLookupTable(); int i, num_of_values=m_LookupTable->GetNumberOfTableValues(); vtkFloatingPointType *alphas; vtkFloatingPointType *alphasHead; alphasHead=alphas=(vtkFloatingPointType*)malloc(sizeof(vtkFloatingPointType)*num_of_values); rgba+=3; for(i=0;iBuildFunctionFromTable(m_LookupTable->GetTableRange()[0], m_LookupTable->GetTableRange()[1], num_of_values-1, alphasHead); free(alphasHead); } void mitk::LookupTable::CreateGradientTransferFunction(vtkPiecewiseFunction*& gradientFunction) { if(gradientFunction==NULL) gradientFunction = vtkPiecewiseFunction::New(); mitk::LookupTable::RawLookupTableType *rgba = GetRawLookupTable(); int i, num_of_values=m_LookupTable->GetNumberOfTableValues(); vtkFloatingPointType *alphas; vtkFloatingPointType *alphasHead; alphasHead=alphas=(vtkFloatingPointType*)malloc(sizeof(vtkFloatingPointType)*num_of_values); rgba+=3; for(i=0;iBuildFunctionFromTable(m_LookupTable->GetTableRange()[0], m_LookupTable->GetTableRange()[1], num_of_values-1, alphasHead); free(alphasHead); } void mitk::LookupTable::PrintSelf(std::ostream &os, itk::Indent indent) const { os << indent; m_LookupTable->PrintHeader(os, vtkIndent()); } diff --git a/Core/Code/Testing/mitkPropertyTest.cpp b/Core/Code/Testing/mitkPropertyTest.cpp index b758018f98..38567a5b2f 100644 --- a/Core/Code/Testing/mitkPropertyTest.cpp +++ b/Core/Code/Testing/mitkPropertyTest.cpp @@ -1,374 +1,376 @@ /*========================================================================= Program: Medical Imaging & Interaction Toolkit Language: C++ Date: $Date$ Version: $Revision$ Copyright (c) German Cancer Research Center, Division of Medical and Biological Informatics. All rights reserved. See MITKCopyright.txt or http://www.mitk.org/copyright.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*/ #include "mitkTestingMacros.h" #include #include #include #include #include #include #include #include #include #include #include #include struct PropertyModifiedListener { typedef itk::SimpleMemberCommand CmdType; PropertyModifiedListener() : m_Modified(false), m_Cmd(CmdType::New()) { m_Cmd->SetCallbackFunction(this, &PropertyModifiedListener::Modified); } void Modified() { m_Modified = true; } bool Pop() { bool b = m_Modified; m_Modified = false; return b; } bool m_Modified; CmdType::Pointer m_Cmd; }; template void TestPropInequality(T prop, T prop2) { mitk::BaseProperty::Pointer baseProp2(prop2.GetPointer()); MITK_TEST_CONDITION_REQUIRED(!(*prop == *prop2), "Test inequality 1"); MITK_TEST_CONDITION_REQUIRED(!(*prop == *baseProp2), "Test polymorphic inequality 1"); MITK_TEST_CONDITION_REQUIRED(!(*baseProp2 == *prop), "Test polymorphic inequality 2"); } template void TestPropAssignment(T prop, T prop2, const std::string& strProp) { PropertyModifiedListener l; unsigned long tag = prop->AddObserver(itk::ModifiedEvent(), l.m_Cmd.GetPointer()); mitk::BaseProperty::Pointer baseProp2(prop2.GetPointer()); *prop = *baseProp2; MITK_TEST_CONDITION_REQUIRED(l.Pop(), "Test modified event"); std::string msg = std::string("Test assignment [") + prop->GetValueAsString() + " == " + strProp + "]"; MITK_TEST_CONDITION_REQUIRED(prop->GetValueAsString() == strProp, msg); MITK_TEST_CONDITION_REQUIRED(*prop == *prop2, "Test equality"); MITK_TEST_CONDITION_REQUIRED(*prop == *baseProp2, "Test equality"); MITK_TEST_CONDITION_REQUIRED(*baseProp2 == *prop, "Test polymorphic equality"); prop->RemoveObserver(tag); } template void TestPropPolymorphicAssignment(T prop, T prop2, const std::string& strProp) { mitk::BaseProperty::Pointer baseProp(prop.GetPointer()); PropertyModifiedListener l; unsigned long tag = baseProp->AddObserver(itk::ModifiedEvent(), l.m_Cmd.GetPointer()); *baseProp = *prop2; MITK_TEST_CONDITION_REQUIRED(l.Pop(), "Test modified event"); std::string msg = std::string("Test polymorphic assignment [") + baseProp->GetValueAsString() + " == " + strProp + "]"; MITK_TEST_CONDITION_REQUIRED(baseProp->GetValueAsString() == strProp, msg); MITK_TEST_CONDITION_REQUIRED(*prop == *prop2, "Test equality"); MITK_TEST_CONDITION_REQUIRED(*prop2 == *baseProp, "Test equality"); MITK_TEST_CONDITION_REQUIRED(*baseProp == *prop2, "Test polymorphic equality"); baseProp->RemoveObserver(tag); } template void TestProperty(const typename T::ValueType& v1, const typename T::ValueType& v2, const std::string& strV1, const std::string& strV2) { PropertyModifiedListener l; typename T::Pointer prop = T::New(v1); MITK_TEST_OUTPUT(<< "**** Test [" << prop->GetNameOfClass() << "] ****"); MITK_TEST_CONDITION_REQUIRED(prop->GetValue() == v1, "Test constructor"); std::string msg = std::string("Test GetValueAsString() [") + prop->GetValueAsString() + " == " + strV1 + "]"; MITK_TEST_CONDITION_REQUIRED(prop->GetValueAsString() == strV1, msg); typename T::Pointer prop2 = T::New(); prop2->AddObserver(itk::ModifiedEvent(), l.m_Cmd.GetPointer()); MITK_TEST_CONDITION_REQUIRED(!l.m_Modified, "Test modified"); prop2->SetValue(v2); MITK_TEST_CONDITION_REQUIRED(l.Pop(), "Test modified"); MITK_TEST_CONDITION_REQUIRED(prop2->GetValue() == v2, "Test SetValue()"); prop2->SetValue(v2); MITK_TEST_CONDITION_REQUIRED(!l.Pop(), "Test for no modification"); TestPropInequality(prop, prop2); TestPropAssignment(prop, prop2, strV2); prop->SetValue(v1); TestPropPolymorphicAssignment(prop2, prop, strV1); } void TestGenericProperties() { TestProperty(false, true, "0", "1"); TestProperty(3, 5, "3", "5"); TestProperty(0.3f, -23.5f, "0.3", "-23.5"); TestProperty(64.1f, 2.34f, "64.1", "2.34"); { mitk::Vector3D p1; p1[0] = 2.0; p1[1] = 3.0; p1[2] = 4.0; mitk::Vector3D p2; p2[0] =-1.0; p2[1] = 2.0; p2[2] = 3.0; TestProperty(p1, p2, "[2, 3, 4]", "[-1, 2, 3]"); } { mitk::Point3D p1; p1[0] = 2.0; p1[1] = 3.0; p1[2] = 4.0; mitk::Point3D p2; p2[0] =-1.0; p2[1] = 2.0; p2[2] = 3.0; TestProperty( p1, p2, "[2, 3, 4]", "[-1, 2, 3]"); } { mitk::Point4D p1; p1[0] = 2.0; p1[1] = 3.0; p1[2] = 4.0; p1[3] =-2.0; mitk::Point4D p2; p2[0] =-1.0; p2[1] = 2.0; p2[2] = 3.0; p2[3] = 5.0; TestProperty(p1, p2, "[2, 3, 4, -2]", "[-1, 2, 3, 5]"); } { mitk::Point3I p1; p1[0] = 2; p1[1] = 3; p1[2] = 4; mitk::Point3I p2; p2[0] = 8; p2[1] = 7; p2[2] = 6; TestProperty(p1, p2, "[2, 3, 4]", "[8, 7, 6]"); } { mitk::FloatLookupTable lut1; lut1.SetTableValue(1, 0.3f); lut1.SetTableValue(4, 323.7f); mitk::FloatLookupTable lut2; lut2.SetTableValue(6, -0.3f); lut2.SetTableValue(2, 25.7f); TestProperty(lut1, lut2, "[1 -> 0.3, 4 -> 323.7]", "[2 -> 25.7, 6 -> -0.3]"); } { mitk::BoolLookupTable lut1; lut1.SetTableValue(3, false); lut1.SetTableValue(5, true); mitk::BoolLookupTable lut2; lut2.SetTableValue(1, false); lut2.SetTableValue(2, false); TestProperty(lut1, lut2, "[3 -> 0, 5 -> 1]", "[1 -> 0, 2 -> 0]"); } { mitk::IntLookupTable lut1; lut1.SetTableValue(5, -12); lut1.SetTableValue(7, 3); mitk::IntLookupTable lut2; lut2.SetTableValue(4, -6); lut2.SetTableValue(8, -45); TestProperty(lut1, lut2, "[5 -> -12, 7 -> 3]", "[4 -> -6, 8 -> -45]"); } { mitk::StringLookupTable lut1; lut1.SetTableValue(0, "a"); lut1.SetTableValue(2, "b"); mitk::StringLookupTable lut2; lut2.SetTableValue(0, "a"); lut2.SetTableValue(2, "c"); TestProperty(lut1, lut2, "[0 -> a, 2 -> b]", "[0 -> a, 2 -> c]"); } } void TestAnnotationProperty() { PropertyModifiedListener l; std::string label1("Label1"); mitk::Point3D point1; point1[0] = 3; point1[1] = 5; point1[2] = -4; std::string str1 = "Label1[3, 5, -4]"; std::string label2("Label2"); mitk::Point3D point2; point2[0] = -2; point2[1] = 8; point2[2] = -4; std::string str2 = "Label2[-2, 8, -4]"; mitk::AnnotationProperty::Pointer prop = mitk::AnnotationProperty::New(label1, point1); MITK_TEST_OUTPUT(<< "**** Test [" << prop->GetNameOfClass() << "] ****"); MITK_TEST_CONDITION_REQUIRED(prop->GetLabel() == label1 && prop->GetPosition() == point1, "Test constructor"); std::string msg = std::string("Test GetValueAsString() [") + prop->GetValueAsString() + " == " + str1 + "]"; MITK_TEST_CONDITION_REQUIRED(prop->GetValueAsString() == str1, msg); mitk::AnnotationProperty::Pointer prop2 = mitk::AnnotationProperty::New(); prop2->AddObserver(itk::ModifiedEvent(), l.m_Cmd.GetPointer()); MITK_TEST_CONDITION_REQUIRED(!l.m_Modified, "Test not modified"); prop2->SetLabel(label2); MITK_TEST_CONDITION_REQUIRED(l.Pop(), "Test modified"); prop2->SetPosition(point2); MITK_TEST_CONDITION_REQUIRED(l.Pop(), "Test modified"); MITK_TEST_CONDITION_REQUIRED(prop2->GetLabel() == label2 && prop2->GetPosition() == point2, "Test Setter"); prop2->SetLabel(label2); MITK_TEST_CONDITION_REQUIRED(!l.Pop(), "Test for no modification"); prop2->SetPosition(point2); MITK_TEST_CONDITION_REQUIRED(!l.Pop(), "Test for no modification"); TestPropInequality(prop, prop2); TestPropAssignment(prop, prop2, str2); prop->SetLabel(label1); prop->SetPosition(point1); TestPropPolymorphicAssignment(prop2, prop, str1); } void TestClippingProperty() { PropertyModifiedListener l; bool enabled1 = true; mitk::Point3D point1; point1[0] = 3; point1[1] = 5; point1[2] = -4; mitk::Vector3D vec1; vec1[0] = 0; vec1[1] = 2; vec1[2] = -1; std::string str1 = "1[3, 5, -4][0, 2, -1]"; bool enabled2 = false; mitk::Point3D point2; point2[0] = -2; point2[1] = 8; point2[2] = -4; mitk::Vector3D vec2; vec2[0] = 0; vec2[1] = 2; vec2[2] = 4; std::string str2 = "0[-2, 8, -4][0, 2, 4]"; mitk::ClippingProperty::Pointer prop = mitk::ClippingProperty::New(point1, vec1); MITK_TEST_OUTPUT(<< "**** Test [" << prop->GetNameOfClass() << "] ****"); MITK_TEST_CONDITION_REQUIRED(prop->GetClippingEnabled() == enabled1 && prop->GetOrigin() == point1 && prop->GetNormal() == vec1, "Test constructor"); std::string msg = std::string("Test GetValueAsString() [") + prop->GetValueAsString() + " == " + str1 + "]"; MITK_TEST_CONDITION_REQUIRED(prop->GetValueAsString() == str1, msg); mitk::ClippingProperty::Pointer prop2 = mitk::ClippingProperty::New(); prop2->AddObserver(itk::ModifiedEvent(), l.m_Cmd.GetPointer()); MITK_TEST_CONDITION_REQUIRED(!l.m_Modified, "Test not modified"); prop2->SetClippingEnabled(enabled2); MITK_TEST_CONDITION_REQUIRED(!l.Pop(), "Test not modified"); prop2->SetOrigin(point2); MITK_TEST_CONDITION_REQUIRED(l.Pop(), "Test modified"); prop2->SetNormal(vec2); MITK_TEST_CONDITION_REQUIRED(l.Pop(), "Test modified"); MITK_TEST_CONDITION_REQUIRED(prop2->GetClippingEnabled() == enabled2 && prop2->GetOrigin() == point2 && prop2->GetNormal() == vec2, "Test Setter"); prop2->SetClippingEnabled(enabled2); MITK_TEST_CONDITION_REQUIRED(!l.Pop(), "Test for no modification"); prop2->SetOrigin(point2); MITK_TEST_CONDITION_REQUIRED(!l.Pop(), "Test for no modification"); prop2->SetNormal(vec2); MITK_TEST_CONDITION_REQUIRED(!l.Pop(), "Test for no modification"); TestPropInequality(prop, prop2); TestPropAssignment(prop, prop2, str2); prop->SetClippingEnabled(enabled1); prop->SetOrigin(point1); prop->SetNormal(vec1); TestPropPolymorphicAssignment(prop2, prop, str1); } int mitkPropertyTest(int /* argc */, char* /*argv*/[]) { MITK_TEST_BEGIN("Testing MITK Properties") TestGenericProperties(); TestAnnotationProperty(); TestClippingProperty(); mitk::Color c1; c1[0] = 0.2; c1[1] = 0.6; c1[2] = 0.8; mitk::Color c2; c2[0] = 0.2; c2[1] = 0.4; c2[2] = 0.1; TestProperty(c1, c2, "0.2 0.6 0.8", "0.2 0.4 0.1"); mitk::LevelWindow lw1(50, 100); mitk::LevelWindow lw2(120, 30); TestProperty(lw1, lw2, "L:50 W:100", "L:120 W:30"); { itk::Object::Pointer sp1 = itk::Object::New(); itk::Object::Pointer sp2 = itk::Object::New(); // to generate the UIDs, we set the smartpointers mitk::SmartPointerProperty::Pointer spp1 = mitk::SmartPointerProperty::New(sp1.GetPointer()); mitk::SmartPointerProperty::Pointer spp2 = mitk::SmartPointerProperty::New(sp2.GetPointer()); TestProperty(sp1, sp2, spp1->GetReferenceUIDFor(sp1), spp2->GetReferenceUIDFor(sp2)); } TestProperty("1", "2", "1", "2"); { mitk::TransferFunction::Pointer tf1 = mitk::TransferFunction::New(); mitk::TransferFunction::Pointer tf2 = mitk::TransferFunction::New(); tf2->AddScalarOpacityPoint(0.4, 0.8); std::stringstream ss; ss << tf1; std::string strTF1 = ss.str(); ss.str(""); ss << tf2; std::string strTF2 = ss.str(); TestProperty(tf1, tf2, strTF1, strTF2); } { itk::Object::Pointer sp1 = itk::Object::New(); itk::Object::Pointer sp2 = itk::Object::New(); mitk::WeakPointerProperty::ValueType wp1 = sp1.GetPointer(); mitk::WeakPointerProperty::ValueType wp2 = sp2.GetPointer(); std::stringstream ss; ss << sp1.GetPointer(); std::string str1 = ss.str(); ss.str(""); ss << sp2.GetPointer(); std::string str2 = ss.str(); TestProperty(wp1, wp2, str1, str2); } { mitk::LookupTable::Pointer lut1 = mitk::LookupTable::New(); + lut1->GetVtkLookupTable()->SetTableValue(0, 0.2, 0.3, 0.4); mitk::LookupTable::Pointer lut2 = mitk::LookupTable::New(); + lut2->GetVtkLookupTable()->SetTableValue(0, 0.2, 0.4, 0.4); std::stringstream ss; ss << lut1; std::string strLUT1 = ss.str(); ss.str(""); ss << lut2; std::string strLUT2 = ss.str(); TestProperty(lut1, lut2, strLUT1, strLUT2); } MITK_TEST_END() }