ctkXnatReconstruction.cpp 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. /*=============================================================================
  2. Plugin: org.commontk.xnat
  3. Copyright (c) University College London,
  4. Centre for Medical Image Computing
  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. #include "ctkXnatReconstruction.h"
  16. #include "ctkXnatConnection.h"
  17. #include "ctkXnatReconstructionResource.h"
  18. class ctkXnatReconstructionPrivate
  19. {
  20. public:
  21. QString reconstructedImageId;
  22. QString id;
  23. QString type;
  24. QString quality;
  25. QString baseScanType;
  26. QString note;
  27. QString seriesDescription;
  28. QString uri;
  29. };
  30. ctkXnatReconstruction::ctkXnatReconstruction(ctkXnatObject* parent)
  31. : ctkXnatObject(parent)
  32. , d_ptr(new ctkXnatReconstructionPrivate())
  33. {
  34. }
  35. ctkXnatReconstruction::~ctkXnatReconstruction()
  36. {
  37. }
  38. const QString& ctkXnatReconstruction::reconstructedImageId() const
  39. {
  40. Q_D(const ctkXnatReconstruction);
  41. return d->reconstructedImageId;
  42. }
  43. void ctkXnatReconstruction::setReconstructedImageId(const QString& reconstructeImageId)
  44. {
  45. Q_D(ctkXnatReconstruction);
  46. d->reconstructedImageId = reconstructeImageId;
  47. }
  48. const QString& ctkXnatReconstruction::id() const
  49. {
  50. Q_D(const ctkXnatReconstruction);
  51. return d->id;
  52. }
  53. void ctkXnatReconstruction::setId(const QString& id)
  54. {
  55. Q_D(ctkXnatReconstruction);
  56. d->id = id;
  57. }
  58. const QString& ctkXnatReconstruction::type() const
  59. {
  60. Q_D(const ctkXnatReconstruction);
  61. return d->type;
  62. }
  63. void ctkXnatReconstruction::setType(const QString& type)
  64. {
  65. Q_D(ctkXnatReconstruction);
  66. d->type = type;
  67. }
  68. const QString& ctkXnatReconstruction::baseScanType() const
  69. {
  70. Q_D(const ctkXnatReconstruction);
  71. return d->baseScanType;
  72. }
  73. void ctkXnatReconstruction::setBaseScanType(const QString& baseScanType)
  74. {
  75. Q_D(ctkXnatReconstruction);
  76. d->baseScanType = baseScanType;
  77. }
  78. const QString& ctkXnatReconstruction::uri() const
  79. {
  80. Q_D(const ctkXnatReconstruction);
  81. return d->uri;
  82. }
  83. void ctkXnatReconstruction::setUri(const QString& uri)
  84. {
  85. Q_D(ctkXnatReconstruction);
  86. d->uri = uri;
  87. }
  88. void ctkXnatReconstruction::fetch(ctkXnatConnection* connection)
  89. {
  90. connection->fetch(this);
  91. }
  92. void ctkXnatReconstruction::download(ctkXnatConnection* connection, const QString& zipFileName)
  93. {
  94. connection->downloadReconstruction(this, zipFileName);
  95. }
  96. void ctkXnatReconstruction::add(ctkXnatConnection* connection, const QString& resource)
  97. {
  98. connection->addReconstructionResource(this, resource);
  99. }
  100. void ctkXnatReconstruction::remove(ctkXnatConnection* connection)
  101. {
  102. connection->removeReconstruction(this);
  103. }
  104. QString ctkXnatReconstruction::getKind() const
  105. {
  106. return "resource";
  107. }
  108. bool ctkXnatReconstruction::holdsFiles() const
  109. {
  110. return true;
  111. }
  112. bool ctkXnatReconstruction::receivesFiles() const
  113. {
  114. return true;
  115. }
  116. bool ctkXnatReconstruction::isDeletable() const
  117. {
  118. return true;
  119. }