Skip to content

Commit 9b1a037

Browse files
committed
Add DCMTK 3.6.0 support to CTK application.
Since the ctkDICOMUtil method have been updated in commit 12c052f to work with DCMTK 3.6.0, this commit update the application code to use it. See commontk#405
1 parent 483dca0 commit 9b1a037

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Applications/ctkDICOMQueryRetrieve/ctkDICOMQueryRetrieveMain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
// CTK Core
2828
#include <ctkDICOMDatabase.h>
29+
#include <ctkDICOMUtil.h>
2930

3031
// CTK widget includes
3132
#include <ctkDICOMQueryRetrieveWidget.h>
@@ -40,8 +41,7 @@
4041
int main(int argc, char** argv)
4142
{
4243
// Set the DCMTK log level to debug
43-
dcmtk::log4cplus::Logger rootLogger = dcmtk::log4cplus::Logger::getRoot();
44-
rootLogger.setLogLevel(dcmtk::log4cplus::DEBUG_LOG_LEVEL);
44+
ctk::setDICOMLogLevel(ctkErrorLogLevel::Debug);
4545

4646
QApplication app(argc, argv);
4747

Applications/ctkDICOMRetrieve/ctkDICOMRetrieveMain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
// CTK includes
2626
#include <ctkDICOMRetrieve.h>
27+
#include <ctkDICOMUtil.h>
2728
#include <ctkDICOMDatabase.h>
2829
#include "ctkLogger.h"
2930

@@ -51,8 +52,7 @@ int main(int argc, char** argv)
5152
ctkLogger logger ( "org.commontk.dicom.DICOMRetieveApp" );
5253

5354
// Set the DCMTK log level to debug
54-
dcmtk::log4cplus::Logger rootLogger = dcmtk::log4cplus::Logger::getRoot();
55-
rootLogger.setLogLevel(dcmtk::log4cplus::DEBUG_LOG_LEVEL);
55+
ctk::setDICOMLogLevel(ctkErrorLogLevel::Debug);
5656

5757
if (argc < 9)
5858
{

Libs/DICOM/Core/ctkDICOMQuery.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232

3333
// ctkDICOMCore includes
3434
#include "ctkDICOMQuery.h"
35+
#include "ctkDICOMUtil.h"
3536
#include "ctkLogger.h"
3637

3738
// DCMTK includes
@@ -237,9 +238,8 @@ QStringList ctkDICOMQuery::studyInstanceUIDQueried()const
237238
//------------------------------------------------------------------------------
238239
bool ctkDICOMQuery::query(ctkDICOMDatabase& database )
239240
{
240-
//// turn on logging if needed for debug:
241-
//dcmtk::log4cplus::Logger log = dcmtk::log4cplus::Logger::getRoot();
242-
//log.setLogLevel(OFLogger::DEBUG_LOG_LEVEL);
241+
// turn on logging if needed for debug:
242+
//ctk::setDICOMLogLevel(ctkErrorLogLevel::Debug);
243243

244244
// ctkDICOMDatabase::setDatabase ( database );
245245
Q_D(ctkDICOMQuery);

0 commit comments

Comments
 (0)