Medical Imaging Interaction Toolkit  2024.12.00
Medical Imaging Interaction Toolkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
mitkShortAnswerQuestion.h
Go to the documentation of this file.
1 /*============================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center (DKFZ)
6 All rights reserved.
7 
8 Use of this source code is governed by a 3-clause BSD license that can be
9 found in the LICENSE file.
10 
11 ============================================================================*/
12 
13 #ifndef mitkShortAnswerQuestion_h
14 #define mitkShortAnswerQuestion_h
15 
16 #include <mitkTextQuestion.h>
17 
18 namespace mitk::Forms
19 {
25  {
26  public:
27  ~ShortAnswerQuestion() override;
28 
29  std::string GetType() const override;
30  Question* CreateAnother() const override;
31 
32  void FromJSON(const nlohmann::ordered_json& j) override;
33  void ToJSON(nlohmann::ordered_json& j) const override;
34  };
35 
36  MITKFORMS_EXPORT void from_json(const nlohmann::ordered_json& j, ShortAnswerQuestion& q);
37  MITKFORMS_EXPORT void to_json(nlohmann::ordered_json& j, const ShortAnswerQuestion& q);
38 }
39 
40 #endif
mitk::FromJSON
MITKCORE_EXPORT void FromJSON(const nlohmann::json &j, AffineTransform3D::Pointer transform)
Read transform from JSON array (16 elements, resp. 4x4 matrix).
mitk::Forms::ShortAnswerQuestion
A Question whose possible response is a short single-line free text.
Definition: mitkShortAnswerQuestion.h:24
mitk::Forms::TextQuestion
Definition: mitkTextQuestion.h:20
mitk::Forms::to_json
MITKFORMS_EXPORT void to_json(nlohmann::ordered_json &j, const CheckboxesQuestion &q)
mitk::Forms
Definition: mitkCheckboxesQuestion.h:18
mitk::Forms::from_json
MITKFORMS_EXPORT void from_json(const nlohmann::ordered_json &j, CheckboxesQuestion &q)
mitkTextQuestion.h
mitk::ToJSON
MITKCORE_EXPORT void ToJSON(nlohmann::json &j, AffineTransform3D::ConstPointer transform)
Write transform (4x4 matrix) as JSON array with 16 elements.
mitk::Forms::Question
Abstract base class for all types of questions used in a Form.
Definition: mitkQuestion.h:31
MITKFORMS_EXPORT
#define MITKFORMS_EXPORT
Definition: MitkFormsExports.h:15