ctkDICOMRetrieve.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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.apache.org/licenses/LICENSE-2.0.txt
  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 __ctkDICOMRetrieve_h
  15. #define __ctkDICOMRetrieve_h
  16. // Qt includes
  17. #include <QObject>
  18. #include <QDir>
  19. #include <QSharedPointer>
  20. #include "ctkDICOMCoreExport.h"
  21. // CTK Core includes
  22. #include "ctkDICOMDatabase.h"
  23. class ctkDICOMRetrievePrivate;
  24. class CTK_DICOM_CORE_EXPORT ctkDICOMRetrieve : public QObject
  25. {
  26. Q_OBJECT
  27. Q_PROPERTY(QString callingAETitle READ callingAETitle WRITE setCallingAETitle);
  28. Q_PROPERTY(QString calledAETitle READ calledAETitle WRITE setCallingAETitle);
  29. Q_PROPERTY(QString host READ host WRITE setHost);
  30. Q_PROPERTY(int calledPort READ calledPort WRITE setCalledPort);
  31. Q_PROPERTY(QString moveDestinationAETitle READ moveDestinationAETitle WRITE setMoveDestinationAETitle)
  32. public:
  33. explicit ctkDICOMRetrieve();
  34. virtual ~ctkDICOMRetrieve();
  35. /// Set methods for connectivity
  36. /// CTK_AE
  37. void setCallingAETitle( const QString& callingAETitle );
  38. QString callingAETitle() const;
  39. /// CTK_AE
  40. void setCalledAETitle( const QString& calledAETitle );
  41. QString calledAETitle() const;
  42. /// localhost
  43. void setHost( const QString& host );
  44. QString host() const;
  45. /// [0, 65365] 11112
  46. void setCalledPort( int port );
  47. int calledPort() const;
  48. /// Typically CTK_CLIENT_AE
  49. void setMoveDestinationAETitle( const QString& moveDestinationAETitle );
  50. QString moveDestinationAETitle() const;
  51. void setKeepAssociationOpen(const bool keepOpen);
  52. bool keepAssociationOpen();
  53. /// method for database
  54. void setRetrieveDatabase(QSharedPointer<ctkDICOMDatabase> dicomDatabase);
  55. QSharedPointer<ctkDICOMDatabase> retrieveDatabase()const;
  56. // Could be a slot...
  57. bool retrieveSeries( const QString& studyInstanceUID,
  58. const QString& seriesInstanceUID );
  59. bool retrieveStudy( const QString& studyInstanceUID );
  60. protected:
  61. QScopedPointer<ctkDICOMRetrievePrivate> d_ptr;
  62. private:
  63. void retrieve( QDir directory );
  64. Q_DECLARE_PRIVATE(ctkDICOMRetrieve);
  65. Q_DISABLE_COPY(ctkDICOMRetrieve);
  66. };
  67. #endif