瀏覽代碼

ctkDICOMOBjectModelTest1 added to the project

Alireza Mehrtash 11 年之前
父節點
當前提交
cb267ca868

+ 1 - 0
Libs/DICOM/Core/Testing/Cpp/CMakeLists.txt

@@ -9,6 +9,7 @@ create_test_sourcelist(Tests ${KIT}CppTests.cpp
   ctkDICOMItemTest1.cpp
   ctkDICOMIndexerTest1.cpp
   ctkDICOMModelTest1.cpp
+  ctkDICOMObjectModelTest1.cpp
   ctkDICOMPersonNameTest1.cpp
   ctkDICOMQueryTest1.cpp
   ctkDICOMQueryTest2.cpp

+ 1 - 0
Libs/DICOM/Core/Testing/Cpp/Testing/Temporary/CTestCostData.txt

@@ -0,0 +1 @@
+---

+ 3 - 0
Libs/DICOM/Core/Testing/Cpp/Testing/Temporary/LastTest.log

@@ -0,0 +1,3 @@
+Start testing: Sep 09 13:27 Eastern Daylight Time
+----------------------------------------------------------
+End testing: Sep 09 13:27 Eastern Daylight Time

+ 9 - 21
Libs/DICOM/Core/Testing/Cpp/ctkDICOMObjectModelTest1.cpp

@@ -21,40 +21,28 @@
 // STD includes
 #include <iostream>
 #include <algorithm>
-#include <limits>
 
 // Qt includes
 #include <QApplication>
 #include <QFileDialog>
 #include <QHeaderView>
 #include <QString>
+#include <QTimer>
 #include <QTreeView>
 
 // CTK Core
 #include "ctkDICOMObjectModel.h"
 
-int main(int argv, char** argc)
+int ctkDICOMObjectModelTest1( int argc, char * argv [] )
 {
-  QApplication app(argv, argc);
-
+  QApplication app(argc, argv);
   QString fileName;
-
-  if( QApplication::argc() > 1)
-    {
-    fileName = QApplication::argv()[1];
-    }
-  else
-    {
-    fileName = QFileDialog::getOpenFileName( 0,
-    "Choose an image file", ".","DCM (*)" );
-    if( fileName.size() == 0 )
-	    {
-	    return EXIT_SUCCESS;
-	    }
-    }
+  //TODO: Add the option for reading the test file from argv
+  fileName = QFileDialog::getOpenFileName( 0,
+    "Choose a DCM File", ".","DCM (*)" );
   ctkDICOMObjectModel dcmInfoModel;
   dcmInfoModel.setFile(fileName);
-  
+
   QTreeView *viewer = new QTreeView();
   viewer->setModel( &dcmInfoModel);
   viewer->expandAll();
@@ -63,6 +51,6 @@ int main(int argv, char** argc)
   viewer->header()->setResizeMode( QHeaderView::Stretch);
   viewer->show();
   viewer->raise();
-  
+
   return app.exec();
-}
+}