Medical Imaging Interaction Toolkit
2024.06.99-ccaff7ce
Medical Imaging Interaction Toolkit
|
Namespaces | |
UI | |
Classes | |
class | CheckboxesQuestion |
A Question whose possible responses are represented by checkboxes. More... | |
class | DropdownQuestion |
A Question whose possible responses are represented by a combo box. More... | |
class | Form |
class | IQuestionFactory |
Register subclasses of Question to create instances of them based on their type string. More... | |
class | LinearScaleQuestion |
A Question whose possible responses are represented by a discrete linear scale. More... | |
class | ModuleActivator |
class | MultipleChoiceQuestion |
A Question whose possible responses are represented by radio buttons. More... | |
class | ParagraphQuestion |
A Question whose possible response is free text. More... | |
class | Question |
Abstract base class for all types of questions used in a Form. More... | |
class | QuestionFactory |
class | QuestionWithOptions |
Base class for questions with options to choose from as response. More... | |
class | QuestionWithOtherOption |
Base class for questions with options that may also have a free text option. More... | |
class | ScreenshotQuestion |
class | ShortAnswerQuestion |
A Question whose possible response is a short single-line free text. More... | |
class | TextQuestion |
Functions | |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, CheckboxesQuestion &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const CheckboxesQuestion &q) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, DropdownQuestion &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const DropdownQuestion &q) |
MITKFORMS_EXPORT void | SubmitToCSV (const Form &form, const fs::path &csvPath) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, Form &f) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const Form &f) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, LinearScaleQuestion &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const LinearScaleQuestion &q) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, MultipleChoiceQuestion &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const MultipleChoiceQuestion &q) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, ParagraphQuestion &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const ParagraphQuestion &q) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, Question &q) |
Deserialize from JSON. More... | |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const Question &q) |
Serialize to JSON. More... | |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, QuestionWithOptions &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const QuestionWithOptions &q) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, QuestionWithOtherOption &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const QuestionWithOtherOption &q) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, ScreenshotQuestion &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const ScreenshotQuestion &q) |
MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, ShortAnswerQuestion &q) |
MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const ShortAnswerQuestion &q) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
CheckboxesQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
DropdownQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
Form & | f | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
LinearScaleQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
MultipleChoiceQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
ParagraphQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
Question & | q | ||
) |
Deserialize from JSON.
Polymorphism and the use of base class pointers make it necessary to implement serialization through member functions. Using the pure native approach of the "JSON for Modern C++" library via free functions would lead to partially serialized instances of derived classes.
The actual implementation can and should still be located in a from_json() free function but we also need the indirection through a corresponding member function.
Overloaded functions for derived Question classes should reuse their base class versions of the function.
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
QuestionWithOptions & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
QuestionWithOtherOption & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
ScreenshotQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
ShortAnswerQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::SubmitToCSV | ( | const Form & | form, |
const fs::path & | csvPath | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const CheckboxesQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const DropdownQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const Form & | f | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const LinearScaleQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const MultipleChoiceQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const ParagraphQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const Question & | q | ||
) |
Serialize to JSON.
Polymorphism and the use of base class pointers make it necessary to implement serialization through member functions. Using the pure native approach of the "JSON for Modern C++" library via free functions would lead to partially serialized instances of derived classes.
The actual implementation can and should still be located in a to_json() free function but we also need the indirection through a corresponding member function.
Overloaded functions for derived Question classes should reuse their base class versions of the function.
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const QuestionWithOptions & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const QuestionWithOtherOption & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const ScreenshotQuestion & | q | ||
) |
MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
const ShortAnswerQuestion & | q | ||
) |