ctkDicomHostInterface.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. /*=============================================================================
  2. Library: CTK
  3. Copyright (c) German Cancer Research Center,
  4. Division of Medical and Biological Informatics
  5. Licensed under the Apache License, Version 2.0 (the "License");
  6. you may not use this file except in compliance with the License.
  7. You may obtain a copy of the License at
  8. http://www.apache.org/licenses/LICENSE-2.0
  9. Unless required by applicable law or agreed to in writing, software
  10. distributed under the License is distributed on an "AS IS" BASIS,
  11. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. See the License for the specific language governing permissions and
  13. limitations under the License.
  14. =============================================================================*/
  15. #ifndef CTKDICOMHOSTINTERFACE_H
  16. #define CTKDICOMHOSTINTERFACE_H
  17. #include "ctkDicomExchangeInterface.h"
  18. struct ctkDicomHostInterface : public virtual ctkDicomExchangeInterface
  19. {
  20. // Host interface methods
  21. /**
  22. * Returns a newly created DICOM UID that the Hosted Application might use, e.g., to create new data
  23. * objects and structures.
  24. */
  25. virtual QString generateUID() = 0;
  26. /**
  27. * The Hosted Application supplies its preferred screen size in the appPreferredScreen parameter. The
  28. * Hosting System may utilize this information as a hint, but may return a window location and size that best
  29. * suits the Hosting System's GUI.
  30. */
  31. virtual QRect getAvailableScreen(const QRect& preferredScreen) = 0;
  32. /**
  33. * This method returns a URI that a Hosted Application may use to store output that it may provide back to
  34. * the Hosting System (e.g. in response to a getData() call).
  35. * \return a URI that a Hosted Application may use to store output.
  36. */
  37. virtual QString getOutputLocation(const QStringList& preferredProtocols) = 0;
  38. /**
  39. * The Hosted Application shall invoke this method each time the Hosted Application successfully transitions
  40. * to a new state. The new state is passed in the state parameter.
  41. */
  42. virtual void notifyStateChanged(ctkDicomAppHosting::State state) = 0;
  43. /**
  44. * Method used by the Hosted Application to inform the Hosting System of notable events that occur during execution.
  45. * The Hosted Application invoks this method, passing the information in the status parameter.
  46. */
  47. virtual void notifyStatus(const ctkDicomAppHosting::Status& status) = 0;
  48. // Data exchange interface methods
  49. // inherited from ctkDicomExchangeInterface
  50. };
  51. Q_DECLARE_INTERFACE(ctkDicomHostInterface, "org.commontk.dah.core.HostInterface")
  52. #endif // CTKDICOMHOSTINTERFACE_H