ctkDICOMQuery.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.commontk.org/LICENSE
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. #ifndef __ctkDICOMQuery_h
  15. #define __ctkDICOMQuery_h
  16. // Qt includes
  17. #include <QObject>
  18. #include <QMap>
  19. #include <QString>
  20. #include <QSqlDatabase>
  21. // CTK includes
  22. #include <ctkPimpl.h>
  23. #include "ctkDICOMCoreExport.h"
  24. #include "ctkDICOMDatabase.h"
  25. class ctkDICOMQueryPrivate;
  26. class CTK_DICOM_CORE_EXPORT ctkDICOMQuery : public QObject
  27. {
  28. Q_OBJECT
  29. Q_PROPERTY(QString callingAETitle READ callingAETitle WRITE setCallingAETitle);
  30. Q_PROPERTY(QString calledAETitle READ calledAETitle WRITE setCallingAETitle);
  31. Q_PROPERTY(int port READ port WRITE setPort);
  32. public:
  33. explicit ctkDICOMQuery();
  34. virtual ~ctkDICOMQuery();
  35. /// Set methods for connectivity
  36. void setCallingAETitle ( QString callingAETitle );
  37. const QString& callingAETitle();
  38. void setCalledAETitle ( QString calledAETitle );
  39. const QString& calledAETitle();
  40. void setHost ( QString host );
  41. const QString& host();
  42. void setPort ( int port );
  43. int port();
  44. /// Query a remote DICOM Image Store SCP
  45. void query(ctkDICOMDatabase& database);
  46. /// Add a StudyInstanceUID to be queried
  47. void addStudyInstanceUID( QString StudyInstanceUID );
  48. /// Access the list of study instance UIDs from the last query
  49. QStringList studyInstanceUIDQueried();
  50. ///
  51. // Filters are keyword/value pairs as generated by
  52. // the ctkDICOMWidgets in a human readable (and editable)
  53. // format. The Query is responsible for converting these
  54. // into the appropriate dicom syntax for the C-Find
  55. void setFilters(QMap<QString,QVariant>);
  56. QMap<QString,QVariant> filters();
  57. protected:
  58. QScopedPointer<ctkDICOMQueryPrivate> d_ptr;
  59. private:
  60. Q_DECLARE_PRIVATE(ctkDICOMQuery);
  61. Q_DISABLE_COPY(ctkDICOMQuery);
  62. };
  63. #endif