ctkDICOMQuery.cpp

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Library:   CTK
00004  
00005   Copyright (c) 2010  Kitware Inc.
00006 
00007   Licensed under the Apache License, Version 2.0 (the "License");
00008   you may not use this file except in compliance with the License.
00009   You may obtain a copy of the License at
00010 
00011       http://www.commontk.org/LICENSE
00012 
00013   Unless required by applicable law or agreed to in writing, software
00014   distributed under the License is distributed on an "AS IS" BASIS,
00015   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016   See the License for the specific language governing permissions and
00017   limitations under the License.
00018  
00019 =========================================================================*/
00020 
00021 // Qt includes
00022 #include <QSqlQuery>
00023 #include <QSqlRecord>
00024 #include <QVariant>
00025 #include <QDate>
00026 #include <QStringList>
00027 #include <QSet>
00028 #include <QFile>
00029 #include <QDirIterator>
00030 #include <QFileInfo>
00031 #include <QDebug>
00032 
00033 // ctkDICOM includes
00034 #include "ctkDICOMQuery.h"
00035 
00036 // DCMTK includes
00037 #ifndef WIN32
00038   #define HAVE_CONFIG_H 
00039 #endif
00040 #include "dcmtk/dcmnet/dimse.h"
00041 #include "dcmtk/dcmnet/diutil.h"
00042 
00043 #include <dcmtk/dcmdata/dcfilefo.h>
00044 #include <dcmtk/dcmdata/dcfilefo.h>
00045 #include <dcmtk/dcmdata/dcdeftag.h>
00046 #include <dcmtk/dcmdata/dcdatset.h>
00047 #include <dcmtk/ofstd/ofcond.h>
00048 #include <dcmtk/ofstd/ofstring.h>
00049 #include <dcmtk/ofstd/ofstd.h>        /* for class OFStandard */
00050 #include <dcmtk/dcmdata/dcddirif.h>   /* for class DicomDirInterface */
00051 
00052 #include <dcmtk/dcmnet/scu.h>
00053 
00054 //------------------------------------------------------------------------------
00055 class ctkDICOMQueryPrivate: public ctkPrivate<ctkDICOMQuery>
00056 {
00057 public:
00058   ctkDICOMQueryPrivate();
00059   ~ctkDICOMQueryPrivate();
00060   QString CallingAETitle;
00061   QString CalledAETitle;
00062   int Port;
00063 
00064 };
00065 
00066 //------------------------------------------------------------------------------
00067 // ctkDICOMQueryPrivate methods
00068 
00069 //------------------------------------------------------------------------------
00070 ctkDICOMQueryPrivate::ctkDICOMQueryPrivate()
00071 {
00072 }
00073 
00074 //------------------------------------------------------------------------------
00075 ctkDICOMQueryPrivate::~ctkDICOMQueryPrivate()
00076 {
00077 }
00078 
00079 //------------------------------------------------------------------------------
00080 // ctkDICOMQuery methods
00081 
00082 //------------------------------------------------------------------------------
00083 ctkDICOMQuery::ctkDICOMQuery()
00084 {
00085 }
00086 
00087 //------------------------------------------------------------------------------
00088 ctkDICOMQuery::~ctkDICOMQuery()
00089 {
00090 }
00091 
00093 void ctkDICOMQuery::setCallingAETitle ( QString callingAETitle )
00094 {
00095   CTK_D(ctkDICOMQuery);
00096   d->CallingAETitle = callingAETitle;
00097 }
00098 const QString& ctkDICOMQuery::callingAETitle() 
00099 {
00100   CTK_D(ctkDICOMQuery);
00101   return d->CallingAETitle;
00102 }
00103 void ctkDICOMQuery::setCalledAETitle ( QString calledAETitle )
00104 {
00105   CTK_D(ctkDICOMQuery);
00106   d->CalledAETitle = calledAETitle;
00107 }
00108 const QString& ctkDICOMQuery::calledAETitle()
00109 {
00110   CTK_D(ctkDICOMQuery);
00111   return d->CalledAETitle;
00112 }
00113 void ctkDICOMQuery::setPort ( int port ) 
00114 {
00115   CTK_D(ctkDICOMQuery);
00116   d->Port = port;
00117 }
00118 int ctkDICOMQuery::port()
00119 {
00120   CTK_D(ctkDICOMQuery);
00121   return d->Port;
00122 }
00123 
00124 
00125 
00126 //------------------------------------------------------------------------------
00127 void ctkDICOMQuery::query(QSqlDatabase database, QString callingAETitle, QString calledAETitle, int port )
00128 {
00129   QSqlDatabase db = database;
00130     OFString patientsName, patientID, patientsBirthDate, patientsBirthTime, patientsSex,
00131       patientComments, patientsAge;
00132 
00133     OFString studyInstanceUID, studyID, studyDate, studyTime,
00134       accessionNumber, modalitiesInStudy, institutionName, performingPhysiciansName, referringPhysician, studyDescription;
00135 
00136     OFString seriesInstanceUID, seriesDate, seriesTime,
00137       seriesDescription, bodyPartExamined, frameOfReferenceUID,
00138       contrastAgent, scanningSequence;
00139     OFString instanceNumber;
00140 
00141   // db.commit();
00142   // db.close();
00143 
00144 }
00145 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1