Index: mitk/MITKConfig.cmake.in
===================================================================
--- mitk/MITKConfig.cmake.in	(revision 22053)
+++ mitk/MITKConfig.cmake.in	(working copy)
@@ -38,7 +38,9 @@
 INCLUDE("@MITK_SOURCE_DIR@/CMake/ToolExtensionHelpers.cmake")
 APPLY_VTK_FLAGS()
 
+SET(MITK_USE_QT "@MITK_USE_QT@")
 
+
 IF (MITK_USE_BLUEBERRY)
 
   SET(BlueBerry_DIR "@MITK_BINARY_DIR@/BlueBerry")
Index: mint/LesionAnalyzer/Modules/LesionDataModel/CMakeLists.txt
===================================================================
--- mint/LesionAnalyzer/Modules/LesionDataModel/CMakeLists.txt	(revision 22053)
+++ mint/LesionAnalyzer/Modules/LesionDataModel/CMakeLists.txt	(working copy)
@@ -1,11 +1,8 @@
 SET(QT_USE_QTSQL 1)
 MITK_CREATE_MODULE(LesionDataModel
-  DEPENDS PersistenceData
-    CommonDataModel
+  DEPENDS CommonDataModel
+  QT_MODULE
   )
   
-IF(BUILD_TESTING)
 ADD_SUBDIRECTORY(Testing)
-ENDIF(BUILD_TESTING)
 
-
Index: mint/LesionAnalyzer/CMakeLists.txt
===================================================================
--- mint/LesionAnalyzer/CMakeLists.txt	(revision 22053)
+++ mint/LesionAnalyzer/CMakeLists.txt	(working copy)
@@ -1,38 +1,44 @@
+FIND_PACKAGE(Qt 4 REQUIRED)
+IF(QT_FOUND)
+  INCLUDE(${QT_USE_FILE})
 
-MESSAGE("Configuring LesionAnalyzer")
+  ADD_SUBDIRECTORY(Modules)
 
-MITK_USE_MODULE(Mitk)
+  MITK_USE_MODULE(Mitk)
+  MITK_USE_MODULE(LesionDataModel)
+  MITK_USE_MODULE(MintMITKTesting)
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${ALL_INCLUDE_DIRECTORIES})
-#MESSAGE("Link directories: ${ALL_INCLUDE_DIRECTORIES}")
-LINK_DIRECTORIES(${MITK_LINK_DIRECTORIES} ${ALL_INCLUDE_DIRECTORIES})
+  INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${ALL_INCLUDE_DIRECTORIES})
+  LINK_DIRECTORIES(${ALL_LIBRARY_DIRS})
+ 
+  QT4_WRAP_UI(GENERATED_UI_CPP LesionAnalyzer.ui)
+  #QT4_WRAP_CPP(GENERATED_MOC_CPP QmitkPACSDICOMBrowser.h)
+  QT4_ADD_RESOURCES(QRC_FILES ressources/LesionAnalyzer.qrc)
 
-QT4_WRAP_UI(GENERATED_UI_CPP LesionAnalyzer.ui)
-#QT4_WRAP_CPP(GENERATED_MOC_CPP QmitkPACSDICOMBrowser.h)
-QT4_ADD_RESOURCES(QRC_FILES ressources/LesionAnalyzer.qrc)
+  ADD_EXECUTABLE(LesionAnalyzer
+                 LesionAnalyzer.cpp
+                 ${GENERATED_UI_CPP}
+                 ${GENERATED_MOC_CPP}
+                 ${QRC_FILES}
+                )
 
-ADD_EXECUTABLE(LesionAnalyzer
-               LesionAnalyzer.cpp
-               ${GENERATED_UI_CPP}
-               ${GENERATED_MOC_CPP}
-               ${QRC_FILES}
-              )
+  TARGET_LINK_LIBRARIES(LesionAnalyzer 
+                        ${ALL_LIBRARIES}
+                        ${QT_LIBRARIES}
+                       )
 
-TARGET_LINK_LIBRARIES(LesionAnalyzer 
-                      ${ALL_LIBRARIES}
-                      ${QT_LIBRARIES}
-                     )
+  # A custom test: simply load LesionAnalyzer
+  ADD_TEST(ApplicationVersion # name of test
+           ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/LesionAnalyzer --version #commandline
+          )
+  ADD_TEST(ApplicationHelp
+           ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/LesionAnalyzer --help
+          )
+  ADD_TEST(ApplicationVersionHelp
+           ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/LesionAnalyzer --version --help
+          )
+ELSE(QT_FOUND)
+  MESSAGE(FATAL_ERROR "Qt not found. Please set QT_QMAKE_EXECUTABLE to your qmake executable")
+ENDIF(QT_FOUND)
 
-ADD_SUBDIRECTORY(Modules)
 
-# A custom test: simply load LesionAnalyzer
-ADD_TEST(ApplicationVersion # name of test
-         ${CMAKE_CURRENT_BINARY_DIR}/LesionAnalyzer --version #commandline
-        )
-ADD_TEST(ApplicationHelp
-         ${CMAKE_CURRENT_BINARY_DIR}/LesionAnalyzer --help
-        )
-ADD_TEST(ApplicationVersionHelp
-         ${CMAKE_CURRENT_BINARY_DIR}/LesionAnalyzer --version --help
-        )
-
Index: mint/Modules/CommonDataModel/CMakeLists.txt
===================================================================
--- mint/Modules/CommonDataModel/CMakeLists.txt	(revision 22053)
+++ mint/Modules/CommonDataModel/CMakeLists.txt	(working copy)
@@ -1,10 +1,9 @@
 SET(QT_USE_QTSQL 1)
 MITK_CREATE_MODULE(CommonDataModel
   DEPENDS PersistenceData
+  PACKAGE_DEPENDS QT
+  QT_MODULE
   )
   
-IF(BUILD_TESTING)
 ADD_SUBDIRECTORY(Testing)
-ENDIF(BUILD_TESTING)
 
-
Index: mint/Modules/CommonDataModel/Testing/CMakeLists.txt
===================================================================
--- mint/Modules/CommonDataModel/Testing/CMakeLists.txt	(revision 22053)
+++ mint/Modules/CommonDataModel/Testing/CMakeLists.txt	(working copy)
@@ -1,4 +1,4 @@
 MITK_USE_MODULE(Mitk)
 INCLUDE_DIRECTORIES(${ALL_INCLUDE_DIRECTORIES})
 
-MITK_CREATE_MODULE_TESTS()
\ No newline at end of file
+#MITK_CREATE_MODULE_TESTS()
Index: mint/Modules/MintMITKTesting/files.cmake
===================================================================
--- mint/Modules/MintMITKTesting/files.cmake	(revision 0)
+++ mint/Modules/MintMITKTesting/files.cmake	(revision 0)
@@ -0,0 +1,13 @@
+SET(CPP_FILES
+  dummy.cpp
+  QmitkRenderingTestHelper.cpp
+)
+
+SET(MODULE_TESTS
+  mitkRenderingTest.cpp
+)
+
+SET(MODULE_CUSTOM_TESTS
+  FrustumClip.cxx
+)
+
Index: mint/Modules/MintMITKTesting/mitkRenderingTest.cpp
===================================================================
--- mint/Modules/MintMITKTesting/mitkRenderingTest.cpp	(revision 0)
+++ mint/Modules/MintMITKTesting/mitkRenderingTest.cpp	(revision 0)
@@ -0,0 +1,123 @@
+/*=========================================================================
+
+Program:   Medical Imaging & Interaction Toolkit
+Language:  C++
+Date:      $Date: 2008-02-25 17:27:17 +0100 (Mo, 25 Feb 2008) $
+Version:   $Revision: 7837 $
+
+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 "mitkDataNodeFactory.h"
+#include "mitkStandaloneDataStorage.h"
+
+#include <vtkImageData.h>
+#include <vtkSmartPointer.h>
+#include <vtkPNGWriter.h>
+#include <vtkRegressionTestImage.h> // nice one
+
+#include <vector>
+#include <algorithm>
+
+#include "QmitkRenderingTestHelper.h"
+
+class mitkRenderingTestHelperClass
+{
+
+public:
+
+static void AddToStorage(const std::string& s)
+{
+  mitk::BaseData::Pointer data = LoadBaseData(s);
+}
+
+static void print(const std::string& s)
+{
+  MITK_TEST_OUTPUT_NO_ENDL( << s)
+}
+
+static mitk::BaseData::Pointer LoadBaseData(const std::string& filename)
+{
+  mitk::DataNodeFactory::Pointer reader = mitk::DataNodeFactory::New();
+  try
+  {
+    reader->SetFileName( filename );
+    reader->Update();
+
+    if(reader->GetNumberOfOutputs()<1)
+    {
+      MITK_TEST_FAILED_MSG(<< "Could not find test data '" << filename << "'");
+    }
+
+    mitk::DataNode::Pointer node = reader->GetOutput( 0 );
+    return node->GetData();
+  }
+  catch ( itk::ExceptionObject & e )
+  {
+    MITK_TEST_FAILED_MSG(<< "Failed loading test data '" << filename << "': " << e.what());
+  }
+}
+
+  static mitk::DataStorage::Pointer s_DataStorage;
+
+}; // end test helper class
+  
+mitk::DataStorage::Pointer mitkRenderingTestHelperClass::s_DataStorage;
+
+int mitkRenderingTest(int argc, char* argv[])
+{
+  // load all arguments into a datastorage, take last argument as reference rendering
+  // setup a renderwindow of fixed size 800x800
+  // render the datastorage
+  // compare rendering to reference image
+
+  MITK_TEST_BEGIN("RenderingTest")
+
+  // enough parameters?
+  if ( argc < 2 )
+  {
+    MITK_TEST_OUTPUT( << "Usage: " << std::string(*argv) << " [file1 file2 ...] outputfile" )
+    MITK_TEST_OUTPUT( << "Will render a central transversal slice of all given files into outputfile" )
+    exit( EXIT_SUCCESS );
+  }
+
+  // parse parameters
+  std::vector<std::string> inputFileNames;
+  for (int i = 1; i < argc-1; ++i)
+  {
+    inputFileNames.push_back( argv[i] );
+  }
+  std::string outputFileName( argv[argc-1] );
+
+  MITK_TEST_OUTPUT_NO_ENDL( << "Rendering files " )
+  std::for_each( inputFileNames.begin(), inputFileNames.end(), mitkRenderingTestHelperClass::print );
+  MITK_TEST_OUTPUT_NO_ENDL( << "\nSaving rendered image as " << outputFileName )
+  
+  // load all input into a data storage
+  mitk::DataNodeFactory::Pointer reader = mitk::DataNodeFactory::New();
+  MITK_TEST_CONDITION_REQUIRED(reader.IsNotNull(),"DataNodeFactory instantiation");
+
+  mitkRenderingTestHelperClass::s_DataStorage = mitk::StandaloneDataStorage::New().GetPointer();
+  MITK_TEST_CONDITION_REQUIRED(mitkRenderingTestHelperClass::s_DataStorage.IsNotNull(),"StandaloneDataStorage instantiation");
+  
+  std::for_each( inputFileNames.begin(), inputFileNames.end(), mitkRenderingTestHelperClass::AddToStorage );
+
+  // create a QmitkRenderWindow, let it render the scene and get the vtkRenderWindow
+  QmitkRenderingTestHelper renderingHelper( argc, argv, 400, 300, mitkRenderingTestHelperClass::s_DataStorage );
+  int retVal = vtkRegressionTestImage( renderingHelper.GetVtkRenderWindow() );
+
+  MITK_TEST_CONDITION( !retVal, "Returning VTK test result" )
+
+  MITK_TEST_END()
+}
+
Index: mint/Modules/MintMITKTesting/QmitkRenderingTestHelper.cpp
===================================================================
--- mint/Modules/MintMITKTesting/QmitkRenderingTestHelper.cpp	(revision 0)
+++ mint/Modules/MintMITKTesting/QmitkRenderingTestHelper.cpp	(revision 0)
@@ -0,0 +1,89 @@
+/*=========================================================================
+
+Program:   Medical Imaging & Interaction Toolkit
+Language:  C++
+Date:      $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
+Version:   $Revision: 21985 $
+
+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 "QmitkRenderingTestHelper.h"
+#include "QmitkRegisterClasses.h"
+#include "QmitkRenderWindow.h"
+
+#include "mitkStandaloneDataStorage.h"
+
+#include <vtkRenderWindow.h>
+#include <vtkPNGWriter.h>
+#include <vtkRenderLargeImage.h>
+
+#include <QApplication>
+
+QmitkRenderingTestHelper::QmitkRenderingTestHelper(int argc, char * argv[],int width,int height,mitk::DataStorage *ds)
+{
+  m_QtApp = new QApplication(argc,argv);
+
+  QmitkRegisterClasses();
+
+  m_RenderWindow = new QmitkRenderWindow();
+
+  m_RenderWindow->GetRenderer()->SetDataStorage(ds);
+
+  /*
+  // Select a slice
+  mitk::SliceNavigationController::Pointer sliceNaviController = renderWindow.GetSliceNavigationController();
+  if (sliceNaviController)
+  sliceNaviController->GetSlice()->SetPos( 0 );
+  */
+  m_RenderWindow->resize( width, height );
+
+  mitk::RenderingManager::GetInstance()->InitializeViews();
+
+  m_RenderWindow->show();
+}      
+
+QmitkRenderingTestHelper::~QmitkRenderingTestHelper()
+{
+  delete m_RenderWindow;
+  delete m_QtApp;
+}
+
+vtkRenderer* QmitkRenderingTestHelper::GetVtkRenderer()
+{
+  return m_RenderWindow->GetRenderer()->GetVtkRenderer();
+}
+
+vtkRenderWindow* QmitkRenderingTestHelper::GetVtkRenderWindow()
+{
+  return m_RenderWindow->GetRenderer()->GetVtkRenderer()->GetRenderWindow();
+}
+
+void QmitkRenderingTestHelper::SaveAsPNG(std::string fileName)
+{
+  vtkRenderer* renderer = GetVtkRenderer();
+  bool doubleBuffering( renderer->GetRenderWindow()->GetDoubleBuffer() );
+  renderer->GetRenderWindow()->DoubleBufferOff();
+
+  vtkRenderLargeImage* magnifier = vtkRenderLargeImage::New();
+  magnifier->SetInput(renderer);
+  magnifier->SetMagnification(1.0);
+
+
+  vtkImageWriter* fileWriter = vtkPNGWriter::New();
+  fileWriter->SetInput(magnifier->GetOutput());
+  fileWriter->SetFileName(fileName.c_str());
+
+
+  fileWriter->Write();  
+  fileWriter->Delete();  
+  renderer->GetRenderWindow()->SetDoubleBuffer(doubleBuffering);
+}
+

Property changes on: mint/Modules/MintMITKTesting/QmitkRenderingTestHelper.cpp
___________________________________________________________________
Added: svn:executable
   + *

Index: mint/Modules/MintMITKTesting/Data/black-512-512.png
===================================================================
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream

Property changes on: mint/Modules/MintMITKTesting/Data/black-512-512.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Index: mint/Modules/MintMITKTesting/QmitkRenderingTestHelper.h
===================================================================
--- mint/Modules/MintMITKTesting/QmitkRenderingTestHelper.h	(revision 0)
+++ mint/Modules/MintMITKTesting/QmitkRenderingTestHelper.h	(revision 0)
@@ -0,0 +1,54 @@
+/*=========================================================================
+
+Program:   Medical Imaging & Interaction Toolkit
+Language:  C++
+Date:      $Date: 2010-03-31 17:34:48 +0200 (Wed, 31 Mar 2010) $
+Version:   $Revision: 21985 $
+
+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.
+
+=========================================================================*/
+
+#ifndef QmitkRenderingTestHelper_h
+#define QmitkRenderingTestHelper_h
+
+#include <string>
+
+class QApplication;
+class QmitkRenderWindow;
+class vtkRenderWindow;
+class vtkRenderer;
+
+namespace mitk
+{
+  class DataStorage;
+}
+
+class QmitkRenderingTestHelper
+{
+  public:
+
+    QmitkRenderingTestHelper( int argc, char* argv[],
+                              int width, int height,
+                              mitk::DataStorage* ds);
+
+    ~QmitkRenderingTestHelper();
+    
+    vtkRenderer* GetVtkRenderer();
+    vtkRenderWindow* GetVtkRenderWindow();
+    void SaveAsPNG(std::string fileName);
+  
+  protected:
+
+    QApplication* m_QtApp;
+    QmitkRenderWindow* m_RenderWindow;
+};
+
+#endif
+

Property changes on: mint/Modules/MintMITKTesting/QmitkRenderingTestHelper.h
___________________________________________________________________
Added: svn:executable
   + *

Index: mint/Modules/MintMITKTesting/dummy.cpp
===================================================================
--- mint/Modules/MintMITKTesting/dummy.cpp	(revision 0)
+++ mint/Modules/MintMITKTesting/dummy.cpp	(revision 0)
@@ -0,0 +1 @@
+#include <iostream>
Index: mint/Modules/MintMITKTesting/CMakeLists.txt
===================================================================
--- mint/Modules/MintMITKTesting/CMakeLists.txt	(revision 0)
+++ mint/Modules/MintMITKTesting/CMakeLists.txt	(revision 0)
@@ -0,0 +1,11 @@
+MITK_CREATE_MODULE(MintMITKTesting
+  DEPENDS Qmitk 
+  )
+
+SET(MINT_TEST_DATA_DIR ${CMAKE_CURRENT_SOURCE_DIR})
+SET(MINT_TEST_OUTPUT_DIR ${PROJECT_BINARY_DIR})
+
+MITK_CREATE_MODULE_TESTS()
+  
+ADD_TEST(FrustumClip_1 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} FrustumClip  -T ${PROJECT_BINARY_DIR}/Testing/Temporary -V ${CMAKE_CURRENT_SOURCE_DIR}/Data/black-512-512.png)
+ADD_TEST(FrustumClip_2 ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${TESTDRIVER} FrustumClip  -T ${PROJECT_BINARY_DIR}/Testing/Temporary -V ${CMAKE_CURRENT_SOURCE_DIR}/Data/black-512-512.png)
Index: mint/Modules/MintMITKTesting/FrustumClip.cxx
===================================================================
--- mint/Modules/MintMITKTesting/FrustumClip.cxx	(revision 0)
+++ mint/Modules/MintMITKTesting/FrustumClip.cxx	(revision 0)
@@ -0,0 +1,108 @@
+/*=========================================================================
+
+  Program:   Visualization Toolkit
+  Module:    $RCSfile: FrustumClip.cxx,v $
+
+  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+  All rights reserved.
+  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 notice for more information.
+
+=========================================================================*/
+#include "vtkActor.h"
+#include "vtkCamera.h"
+#include "vtkClipPolyData.h"
+#include "vtkDebugLeaks.h"
+#include "vtkPlanes.h"
+#include "vtkPolyDataMapper.h"
+#include "vtkProperty.h"
+#include "vtkRegressionTestImage.h"
+#include "vtkRenderWindow.h"
+#include "vtkRenderWindowInteractor.h"
+#include "vtkRenderer.h"
+#include "vtkRenderer.h"
+#include "vtkSphereSource.h"
+
+// Generate a sphere. Create a view frustum looking at the sphere
+// Clip anything inside the frustum, then back away and view result
+
+int FrustumClip( int argc, char *argv[] )
+{
+  vtkRenderer *renderer = vtkRenderer::New();
+  vtkRenderWindow *renWin = vtkRenderWindow::New();
+    renWin->AddRenderer(renderer);
+  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
+    iren->SetRenderWindow(renWin);
+
+  vtkSphereSource *sphere = vtkSphereSource::New();
+    sphere->SetThetaResolution(36);
+    sphere->SetPhiResolution(18);
+    sphere->SetRadius(1);
+
+  vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New();
+  sphereMapper->SetInputConnection( sphere->GetOutputPort());
+
+  vtkActor *sphereActor = vtkActor::New();
+    sphereActor->SetMapper(sphereMapper);
+
+  renderer->AddActor(sphereActor);
+  renderer->SetBackground(1,1,1);
+  renWin->SetSize(400,300);
+
+  vtkCamera *camera = renderer->GetActiveCamera();
+  camera->SetPosition(1.5, 0.0, 0.0);
+  renderer->ResetCameraClippingRange();
+
+  // Display once with camera in position 1
+  // Ensures clipping planes are initialized (camera matrix really).
+  renWin->Render();
+
+  // Now get the camera frustum and then move the camera away to see the
+  // clipped away stuff
+  double aspect=400.0/300.0, planeequations[24];
+  camera->GetFrustumPlanes(aspect, planeequations);
+
+  vtkPlanes *implictplanes = vtkPlanes::New();
+  // TODO cleanup
+  double ped[24];
+  int i;
+  for (i = 0; i < 24; ++i)
+    {
+    ped[i] = planeequations[i];
+    }
+  implictplanes->SetFrustumPlanes(ped);
+
+  vtkClipPolyData *clipper = vtkClipPolyData::New();
+  clipper->SetInputConnection(sphere->GetOutputPort());
+  clipper->SetClipFunction(implictplanes);
+  clipper->SetGenerateClipScalars(1);
+  clipper->SetInsideOut(0);
+  sphereMapper->SetInputConnection( clipper->GetOutputPort());
+
+  camera->SetPosition(-4.0, 0.25, 0.25);
+  renderer->ResetCameraClippingRange();
+
+  sphereActor->GetProperty()->SetColor(0.0,0.0,0.0);
+  renWin->Render();
+
+  int retVal = vtkRegressionTestImage( renWin );
+
+  if ( retVal == vtkRegressionTester::DO_INTERACTOR)
+    {
+    iren->Start();
+    }
+  // Clean up
+  renderer->Delete();
+  renWin->Delete();
+  iren->Delete();
+  sphere->Delete();
+  sphereMapper->Delete();
+  sphereActor->Delete();
+  implictplanes->Delete();
+  clipper->Delete();
+
+  return !retVal;
+}
Index: mint/Modules/CMakeLists.txt
===================================================================
--- mint/Modules/CMakeLists.txt	(revision 22053)
+++ mint/Modules/CMakeLists.txt	(working copy)
@@ -1,2 +1,3 @@
+ADD_SUBDIRECTORY(MintMITKTesting)
 ADD_SUBDIRECTORY(PersistenceData)
-ADD_SUBDIRECTORY(CommonDataModel)
\ No newline at end of file
+ADD_SUBDIRECTORY(CommonDataModel)
Index: mint/Modules/PersistenceData/CMakeLists.txt
===================================================================
--- mint/Modules/PersistenceData/CMakeLists.txt	(revision 22053)
+++ mint/Modules/PersistenceData/CMakeLists.txt	(working copy)
@@ -1,13 +1,10 @@
-SET(QT_USE_QTSQL TRUE)
-
+SET(QT_USE_QTSQL 1)
+  
 MITK_CREATE_MODULE(PersistenceData
   DEPENDS Mitk 
   PACKAGE_DEPENDS QT
+  QT_MODULE
   )
   
-
-IF(BUILD_TESTING)
 ADD_SUBDIRECTORY(Testing)
-ENDIF(BUILD_TESTING)
 
-
Index: mint/CMakeLists.txt
===================================================================
--- mint/CMakeLists.txt	(revision 22053)
+++ mint/CMakeLists.txt	(working copy)
@@ -7,31 +7,24 @@
 FIND_PACKAGE(MITK REQUIRED)
 
 SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${MITK_BIN_DIR})
-MESSAGE("MITK_SOURCE_DIR: ${MITK_SOURCE_DIR} CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
 
-# find Qt
-FIND_PACKAGE(Qt 4 REQUIRED)
-IF(QT_FOUND)
-  INCLUDE(${QT_USE_FILE})
+# actually start defining our project
 
-  IF(MITK_FOUND)
-    MESSAGE("MITK found:\n  source dir ${MITK_SOURCE_DIR} \n  libraries ${MITK_LIBRARIES}\n  libraries in ${MITK_LINK_DIRECTORIES}\n  ITK from ${ITK_DIR}\n  VTK from ${VTK_DIR}")
-  ENDIF(MITK_FOUND)
+IF(MITK_FOUND)
+  #MESSAGE("MITK_SOURCE_DIR: ${MITK_SOURCE_DIR} CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
+  #MESSAGE("MITK found:\n  source dir ${MITK_SOURCE_DIR} \n  libraries ${MITK_LIBRARIES}\n  libraries in ${MITK_LINK_DIRECTORIES}\n  ITK from ${ITK_DIR}\n  VTK from ${VTK_DIR}")
+  #MESSAGE("MITK_MODULES_CONF_DIR ${MITK_MODULES_CONF_DIR}")
+  LINK_DIRECTORIES(${MITK_LINK_DIRECTORIES})
+ENDIF(MITK_FOUND)
 
-  OPTION(BUILD_SHARED_LIBS "Build shared libraries (not static)" ON)
+OPTION(BUILD_SHARED_LIBS "Build shared libraries (not static)" ON)
 
-  SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
-  SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
+SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
+SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
 
-  ADD_SUBDIRECTORY(Modules)
-  ADD_SUBDIRECTORY(LesionAnalyzer)
-ELSE(QT_FOUND)
-  MESSAGE(FATAL_ERROR "Qt not found. Please set QT_QMAKE_EXECUTABLE to your qmake executable")
+ADD_SUBDIRECTORY(Modules)
+ADD_SUBDIRECTORY(LesionAnalyzer)
 
-ADD_SUBDIRECTORY(Liver)
-
-ENDIF(QT_FOUND)
-
 # Doxygen documentation
 FIND_PACKAGE(Doxygen)
 IF(DOXYGEN_FOUND)
