ctkXnatReconstructionResource.cpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 "ctkXnatReconstructionResource.h"
  16. #include "ctkXnatConnection.h"
  17. #include "ctkXnatObjectPrivate.h"
  18. class ctkXnatReconstructionResourcePrivate : public ctkXnatObjectPrivate
  19. {
  20. public:
  21. ctkXnatReconstructionResourcePrivate()
  22. : ctkXnatObjectPrivate()
  23. {
  24. }
  25. void reset()
  26. {
  27. // uri.clear();
  28. }
  29. // QString uri;
  30. };
  31. ctkXnatReconstructionResource::ctkXnatReconstructionResource()
  32. : ctkXnatObject(*new ctkXnatReconstructionResourcePrivate())
  33. {
  34. }
  35. ctkXnatReconstructionResource::~ctkXnatReconstructionResource()
  36. {
  37. }
  38. QString ctkXnatReconstructionResource::resourceUri() const
  39. {
  40. return QString("%1/resources/%2").arg(parent()->resourceUri(), this->property("label"));
  41. }
  42. void ctkXnatReconstructionResource::reset()
  43. {
  44. ctkXnatObject::reset();
  45. }
  46. void ctkXnatReconstructionResource::fetchImpl()
  47. {
  48. this->connection()->fetch(this);
  49. }
  50. void ctkXnatReconstructionResource::download(const QString& filename)
  51. {
  52. this->connection()->download(this, filename);
  53. }