|
Medical Imaging Interaction Toolkit
2026.06.00
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 |
| A form consisting of questions possibly divided into multiple sections/pages. More... | |
| 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 | MultipleChoiceQuestion |
| A Question whose possible responses are represented by radio buttons. More... | |
| class | ParagraphQuestion |
| A Question whose possible response is multi-line free text. More... | |
| class | Question |
| Abstract base class for all types of questions used in a Form. More... | |
| 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 |
| A Question whose responses are screenshot image files. More... | |
| class | ShortAnswerQuestion |
| A Question whose possible response is a short single-line free text. More... | |
| class | TextQuestion |
| Abstract base class for questions with a single free-text response. More... | |
| class | ModuleActivator |
| Module activator for the Forms module. More... | |
| class | QuestionFactory |
| Default implementation of IQuestionFactory using prototype-based creation. More... | |
Functions | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, CheckboxesQuestion &q) |
| Deserialize a CheckboxesQuestion from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const CheckboxesQuestion &q) |
| Serialize a CheckboxesQuestion to JSON. More... | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, DropdownQuestion &q) |
| Deserialize a DropdownQuestion from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const DropdownQuestion &q) |
| Serialize a DropdownQuestion to JSON. More... | |
| MITKFORMS_EXPORT void | SubmitToCSV (const Form &form, const fs::path &csvPath) |
| Submit form responses to a CSV file. More... | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, Form &f) |
| Deserialize a Form from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const Form &f) |
| Serialize a Form to JSON. More... | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, LinearScaleQuestion &q) |
| Deserialize a LinearScaleQuestion from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const LinearScaleQuestion &q) |
| Serialize a LinearScaleQuestion to JSON. More... | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, MultipleChoiceQuestion &q) |
| Deserialize a MultipleChoiceQuestion from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const MultipleChoiceQuestion &q) |
| Serialize a MultipleChoiceQuestion to JSON. More... | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, ParagraphQuestion &q) |
| Deserialize a ParagraphQuestion from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const ParagraphQuestion &q) |
| Serialize a ParagraphQuestion to JSON. More... | |
| 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) |
| Deserialize a QuestionWithOptions from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const QuestionWithOptions &q) |
| Serialize a QuestionWithOptions to JSON. More... | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, QuestionWithOtherOption &q) |
| Deserialize a QuestionWithOtherOption from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const QuestionWithOtherOption &q) |
| Serialize a QuestionWithOtherOption to JSON. More... | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, ScreenshotQuestion &q) |
| Deserialize a ScreenshotQuestion from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const ScreenshotQuestion &q) |
| Serialize a ScreenshotQuestion to JSON. More... | |
| MITKFORMS_EXPORT void | from_json (const nlohmann::ordered_json &j, ShortAnswerQuestion &q) |
| Deserialize a ShortAnswerQuestion from JSON. More... | |
| MITKFORMS_EXPORT void | to_json (nlohmann::ordered_json &j, const ShortAnswerQuestion &q) |
| Serialize a ShortAnswerQuestion to JSON. More... | |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| CheckboxesQuestion & | q | ||
| ) |
Deserialize a CheckboxesQuestion from JSON.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The CheckboxesQuestion to populate. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| DropdownQuestion & | q | ||
| ) |
Deserialize a DropdownQuestion from JSON.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The DropdownQuestion to populate. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| Form & | f | ||
| ) |
Deserialize a Form from JSON.
Expects the JSON to contain a "FileFormat" field set to "MITK Form" and a "Version" field set to 1. Questions are created via IQuestionFactory based on their "Type" field.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | f | The Form object to populate. |
| mitk::Exception | If the file format or version is invalid. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| LinearScaleQuestion & | q | ||
| ) |
Deserialize a LinearScaleQuestion from JSON.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The LinearScaleQuestion to populate. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| MultipleChoiceQuestion & | q | ||
| ) |
Deserialize a MultipleChoiceQuestion from JSON.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The MultipleChoiceQuestion to populate. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| ParagraphQuestion & | q | ||
| ) |
Deserialize a ParagraphQuestion from JSON.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The ParagraphQuestion to populate. |
| 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.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The Question object to populate. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| QuestionWithOptions & | q | ||
| ) |
Deserialize a QuestionWithOptions from JSON.
Deserializes the base Question fields and the "Options" array.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The QuestionWithOptions object to populate. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| QuestionWithOtherOption & | q | ||
| ) |
Deserialize a QuestionWithOtherOption from JSON.
Deserializes the QuestionWithOptions fields and enables the "Other" option if the "Other" key is present and true.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The QuestionWithOtherOption object to populate. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| ScreenshotQuestion & | q | ||
| ) |
Deserialize a ScreenshotQuestion from JSON.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The ScreenshotQuestion to populate. |
| MITKFORMS_EXPORT void mitk::Forms::from_json | ( | const nlohmann::ordered_json & | j, |
| ShortAnswerQuestion & | q | ||
| ) |
Deserialize a ShortAnswerQuestion from JSON.
| [in] | j | The JSON object to deserialize from. |
| [in,out] | q | The ShortAnswerQuestion to populate. |
| MITKFORMS_EXPORT void mitk::Forms::SubmitToCSV | ( | const Form & | form, |
| const fs::path & | csvPath | ||
| ) |
Submit form responses to a CSV file.
If the CSV file does not exist, it is created with a header row containing a timestamp column, supplement columns, and a column for each question. If the file already exists, a new row of responses is appended.
Questions whose HasFileResponses() returns true have their files copied via SubmitFileResponses() and the resulting relative paths are written instead.
| [in] | form | The form whose responses are submitted. |
| [in] | csvPath | The path to the CSV file. |
| mitk::Exception | If the CSV file cannot be opened or created. |
| MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
| const CheckboxesQuestion & | q | ||
| ) |
Serialize a CheckboxesQuestion to JSON.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The CheckboxesQuestion to serialize. |
| MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
| const DropdownQuestion & | q | ||
| ) |
Serialize a DropdownQuestion to JSON.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The DropdownQuestion to serialize. |
| 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 | ||
| ) |
Serialize a LinearScaleQuestion to JSON.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The LinearScaleQuestion to serialize. |
| MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
| const MultipleChoiceQuestion & | q | ||
| ) |
Serialize a MultipleChoiceQuestion to JSON.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The MultipleChoiceQuestion to serialize. |
| MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
| const ParagraphQuestion & | q | ||
| ) |
Serialize a ParagraphQuestion to JSON.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The ParagraphQuestion to serialize. |
| 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.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The Question object to serialize. |
| MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
| const QuestionWithOptions & | q | ||
| ) |
Serialize a QuestionWithOptions to JSON.
Serializes the base Question fields and the "Options" array.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The QuestionWithOptions object to serialize. |
| MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
| const QuestionWithOtherOption & | q | ||
| ) |
Serialize a QuestionWithOtherOption to JSON.
Serializes the QuestionWithOptions fields and adds an "Other" key if enabled.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The QuestionWithOtherOption object to serialize. |
| MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
| const ScreenshotQuestion & | q | ||
| ) |
Serialize a ScreenshotQuestion to JSON.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The ScreenshotQuestion to serialize. |
| MITKFORMS_EXPORT void mitk::Forms::to_json | ( | nlohmann::ordered_json & | j, |
| const ShortAnswerQuestion & | q | ||
| ) |
Serialize a ShortAnswerQuestion to JSON.
| [out] | j | The JSON object to serialize into. |
| [in] | q | The ShortAnswerQuestion to serialize. |