ctkXnatSubject.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. /*=============================================================================
  2. Library: XNAT/Core
  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. #ifndef ctkXnatSubject_h
  16. #define ctkXnatSubject_h
  17. #include "ctkXNATCoreExport.h"
  18. #include "ctkXnatObject.h"
  19. #include "ctkXnatDefaultSchemaTypes.h"
  20. class ctkXnatProject;
  21. class ctkXnatSubjectPrivate;
  22. /**
  23. * @ingroup XNAT_Core
  24. */
  25. class CTK_XNAT_CORE_EXPORT ctkXnatSubject : public ctkXnatObject
  26. {
  27. public:
  28. ctkXnatSubject(ctkXnatObject* parent = 0, const QString& schemaType = ctkXnatDefaultSchemaTypes::XSI_SUBJECT);
  29. virtual ~ctkXnatSubject();
  30. ctkXnatProject* getPrimaryProject() const;
  31. QList<ctkXnatProject*> getProjects() const;
  32. /// Sets the name, i.e. the label of the subject
  33. virtual void setName(const QString &name);
  34. /// Returns the name, i.e. the label of the subject
  35. virtual QString name() const;
  36. void setLabel(const QString &label);
  37. QString label() const;
  38. const QString& insertDate() const;
  39. /// @warning does not overwrite the insert date on the server, since this is read only
  40. void setInsertDate(const QString& insertDate);
  41. const QString& insertUser() const;
  42. /// @warning does not overwrite the insert user on the server, since this is read only
  43. void setInsertUser(const QString& insertUser);
  44. QString projectID() const;
  45. void setProjectID(const QString& projectID);
  46. QString dateOfBirth() const;
  47. void setDateOfBirth(const QString& dateOfBirth);
  48. QString gender() const;
  49. void setGender(const QString& gender);
  50. QString handedness() const;
  51. void setHandedness(const QString& handedness);
  52. QString weight() const;
  53. void setWeight(const QString& weight);
  54. QString height() const;
  55. void setHeight(const QString& height);
  56. virtual QString resourceUri() const;
  57. void reset();
  58. static const QString PROJECT_ID;
  59. static const QString DATE_OF_BIRTH;
  60. static const QString GENDER;
  61. static const QString HANDEDNESS;
  62. static const QString WEIGHT;
  63. static const QString HEIGHT;
  64. static const QString INSERT_DATE;
  65. static const QString INSERT_USER;
  66. private:
  67. friend class qRestResult;
  68. virtual void fetchImpl();
  69. QList<ctkXnatObject*> fetchImageSessionData();
  70. QList<ctkXnatObject*> fetchSubjectVariablesData();
  71. virtual void downloadImpl(const QString&);
  72. Q_DECLARE_PRIVATE(ctkXnatSubject)
  73. };
  74. #endif