|
@@ -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();
|
|
|
-}
|
|
|
+}
|