diff --git a/Modules/MitkExt/Testing/mitkSurfaceToImageFilterTest.cpp b/Modules/MitkExt/Testing/mitkSurfaceToImageFilterTest.cpp index 904f7d9a04..f98ce70616 100644 --- a/Modules/MitkExt/Testing/mitkSurfaceToImageFilterTest.cpp +++ b/Modules/MitkExt/Testing/mitkSurfaceToImageFilterTest.cpp @@ -1,127 +1,128 @@ /*========================================================================= 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 "mitkSurfaceToImageFilter.h" #include "mitkDataNodeFactory.h" #include "mitkPicFileWriter.h" #include #include int mitkSurfaceToImageFilterTest(int argc, char* argv[]) { mitk::SurfaceToImageFilter::Pointer s2iFilter; std::cout << "Testing mitk::Surface::New(): " << std::flush; s2iFilter = mitk::SurfaceToImageFilter::New(); if (s2iFilter.IsNull()) { std::cout<<"[FAILED]"<SetFileName( argv[1] ); factory->Update(); if(factory->GetNumberOfOutputs()<1) { std::cout<<"file could not be loaded [FAILED]"<GetOutput( 0 ); surface = dynamic_cast(node->GetData()); if(surface.IsNull()) { std::cout<<"file not a surface - test will not be applied [PASSED]"<GetVtkPolyData()->GetNumberOfPoints() == 0) { std::cout<<"number of points is 0 - test will not be applied [PASSED]"<UpdateOutputInformation(); //is not necessary anymore (bug #1536), should never be neccessary image->Initialize( mitk::MakeScalarPixelType(), *surface->GetGeometry()); std::cout << "Testing mitk::SurfaceToImageFilter::MakeOutputBinaryOn(): " << std::flush; s2iFilter->MakeOutputBinaryOn(); std::cout<<"[PASSED]"<SetInput(surface); std::cout<<"[PASSED]"<SetImage(image); std::cout<<"[PASSED]"<Update(); std::cout<<"[PASSED]"<GetOutput()->GetPixelType().GetItkTypeAsString(); + //std::string typeId = s2iFilter->GetOutput()->GetPixelType().GetItkTypeAsString(); + std::string typeId = s2iFilter->GetOutput()->GetPixelType().GetComponentTypeAsString(); std::cout << std::endl << "XXX: " << typeId << std::endl; if( typeId != "unsigned char" ) { if(typeId != "unknown") return EXIT_FAILURE; else std::cout << "Warning: Pixel type can't be resolved." << std::flush; } std::cout<<"[PASSED]"<SetInput(s2iFilter->GetOutput()); //picWriter->SetFileName("SurfaceToImageFilterTestOutput.pic"); //picWriter->Write(); std::cout<<"[TEST DONE]"<