Medical Imaging Interaction Toolkit
2025.12.02
Medical Imaging Interaction Toolkit
mitkScreenshotQuestion.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 mitkScreenshotQuestion_h
14
#define mitkScreenshotQuestion_h
15
16
#include <
mitkQuestion.h
>
17
#include <
mitkFileSystem.h
>
18
19
#include <set>
20
21
namespace
mitk::Forms
22
{
23
class
MITKFORMS_EXPORT
ScreenshotQuestion
:
public
Question
24
{
25
public
:
26
~ScreenshotQuestion
()
override
;
27
28
std::string
GetType
()
const override
;
29
Question
*
CreateAnother
()
const override
;
30
31
void
FromJSON
(
const
nlohmann::ordered_json& j)
override
;
32
void
ToJSON
(nlohmann::ordered_json& j)
const override
;
33
34
std::vector<std::string>
GetResponsesAsStrings
()
const override
;
35
void
ClearResponses
()
override
;
36
37
bool
IsComplete
()
const override
;
38
39
bool
HasFileResponses
()
const override
;
40
std::vector<fs::path>
SubmitFileResponses
(
const
fs::path& basePath)
const override
;
41
42
void
AddScreenshot
(
const
fs::path& path);
43
void
RemoveScreenshot
(
const
fs::path& path);
44
45
private
:
46
std::set<fs::path> m_Responses;
47
};
48
49
MITKFORMS_EXPORT
void
from_json
(
const
nlohmann::ordered_json& j,
ScreenshotQuestion
& q);
50
MITKFORMS_EXPORT
void
to_json
(nlohmann::ordered_json& j,
const
ScreenshotQuestion
& q);
51
}
52
53
#endif
MITKFORMS_EXPORT
#define MITKFORMS_EXPORT
Definition:
MitkFormsExports.h:15
mitk::Forms::Question
Abstract base class for all types of questions used in a Form.
Definition:
mitkQuestion.h:32
mitk::Forms::ScreenshotQuestion
Definition:
mitkScreenshotQuestion.h:24
mitk::Forms::ScreenshotQuestion::ToJSON
void ToJSON(nlohmann::ordered_json &j) const override
Serialize to JSON.
mitk::Forms::ScreenshotQuestion::CreateAnother
Question * CreateAnother() const override
Create a new instance of the derived question class type.
mitk::Forms::ScreenshotQuestion::ClearResponses
void ClearResponses() override
Clear the/all response(s).
mitk::Forms::ScreenshotQuestion::RemoveScreenshot
void RemoveScreenshot(const fs::path &path)
mitk::Forms::ScreenshotQuestion::IsComplete
bool IsComplete() const override
Check if a question is considered to be answered completely.
mitk::Forms::ScreenshotQuestion::SubmitFileResponses
std::vector< fs::path > SubmitFileResponses(const fs::path &basePath) const override
Attach response files to submission.
mitk::Forms::ScreenshotQuestion::~ScreenshotQuestion
~ScreenshotQuestion() override
mitk::Forms::ScreenshotQuestion::FromJSON
void FromJSON(const nlohmann::ordered_json &j) override
Deserialize from JSON.
mitk::Forms::ScreenshotQuestion::GetType
std::string GetType() const override
Return the type of a question as string, e.g. "Multiple choice" or "Drop-down".
mitk::Forms::ScreenshotQuestion::GetResponsesAsStrings
std::vector< std::string > GetResponsesAsStrings() const override
Return the question's response(s) as strings.
mitk::Forms::ScreenshotQuestion::HasFileResponses
bool HasFileResponses() const override
Query whether the responses given to this question are file paths.
mitk::Forms::ScreenshotQuestion::AddScreenshot
void AddScreenshot(const fs::path &path)
mitkFileSystem.h
mitkQuestion.h
mitk::Forms
Definition:
mitkCheckboxesQuestion.h:19
mitk::Forms::to_json
MITKFORMS_EXPORT void to_json(nlohmann::ordered_json &j, const CheckboxesQuestion &q)
mitk::Forms::from_json
MITKFORMS_EXPORT void from_json(const nlohmann::ordered_json &j, CheckboxesQuestion &q)
src
MITK
Modules
Forms
include
mitkScreenshotQuestion.h
Generated on Mon Feb 23 2026 23:28:11 for Medical Imaging Interaction Toolkit by
1.9.1